/** * @throws IllegalArgumentException if set is null */ public MutableSharedBitVectorIntSet(MutableSharedBitVectorIntSet set) { if (set == null) { throw new IllegalArgumentException("set is null"); } if (set.privatePart != null) { this.privatePart = MutableSparseIntSet.make(set.privatePart); } this.sharedPart = set.sharedPart; }
@Override public IntSet getSuccNodeNumbers(T node) { int number = getNumber(node); IntSet s = normalEdgeManager.getSuccNodeNumbers(node); MutableSparseIntSet result = s == null ? MutableSparseIntSet.makeEmpty() : MutableSparseIntSet.make(s); s = exceptionalEdgeManager.getSuccNodeNumbers(node); if (s != null) { result.addAll(s); } if (normalToExit.get(number) || exceptionalToExit.get(number)) { result.add(exit.getNumber()); } if (fallThru.get(number)) { result.add(number + 1); } return result; }
/** * @throws IllegalArgumentException if set is null */ public MutableSharedBitVectorIntSet(MutableSharedBitVectorIntSet set) { if (set == null) { throw new IllegalArgumentException("set is null"); } if (set.privatePart != null) { this.privatePart = MutableSparseIntSet.make(set.privatePart); } this.sharedPart = set.sharedPart; }
@Override public IntSet getSuccNodeNumbers(T node) { int number = getNumber(node); IntSet s = normalEdgeManager.getSuccNodeNumbers(node); MutableSparseIntSet result = s == null ? MutableSparseIntSet.makeEmpty() : MutableSparseIntSet.make(s); s = exceptionalEdgeManager.getSuccNodeNumbers(node); if (s != null) { result.addAll(s); } if (normalToExit.get(number) || exceptionalToExit.get(number)) { result.add(exit.getNumber()); } if (fallThru.get(number)) { result.add(number + 1); } return result; }
@Override public MutableSparseIntSet makeCopy(IntSet x) throws IllegalArgumentException { if (x == null) { throw new IllegalArgumentException("x == null"); } return MutableSparseIntSet.make(x); }
@Override public MutableSparseIntSet makeCopy(IntSet x) throws IllegalArgumentException { if (x == null) { throw new IllegalArgumentException("x == null"); } return MutableSparseIntSet.make(x); }
/** * @throws IllegalArgumentException if set is null */ public MutableSharedBitVectorIntSet(MutableSharedBitVectorIntSet set) { if (set == null) { throw new IllegalArgumentException("set is null"); } if (set.privatePart != null) { this.privatePart = MutableSparseIntSet.make(set.privatePart); } this.sharedPart = set.sharedPart; }
@Override public MutableSparseIntSet makeCopy(IntSet x) throws IllegalArgumentException { if (x == null) { throw new IllegalArgumentException("x == null"); } return MutableSparseIntSet.make(x); }
/** * This iteration _will_ cover all indices even when remove is called while * the iterator is active. */ public IntIterator safeIterateIndices() { return MutableSparseIntSet.make(indices).intIterator(); }
/** * This iteration _will_ cover all indices even when remove is called while * the iterator is active. */ public IntIterator safeIterateIndices() { return MutableSparseIntSet.make(indices).intIterator(); }
/** * This iteration _will_ cover all indices even when remove is called while * the iterator is active. */ public IntIterator safeIterateIndices() { return MutableSparseIntSet.make(indices).intIterator(); }
public ConstantFlowFunction(IFDSTaintDomain<E> domain, Set<DomainElement> elts) { result = MutableSparseIntSet.make(TaintTransferFunctions.ZERO_SET); for (DomainElement de : elts) { result.add(domain.getMappedIndex(de)); } }
/** * @throws IllegalArgumentException if s is null */ public MutableSharedBitVectorIntSet(SparseIntSet s) { if (s == null) { throw new IllegalArgumentException("s is null"); } if (s.size() == 0) { return; } this.privatePart = MutableSparseIntSet.make(s); checkOverflow(); if (PARANOID) { checkIntegrity(); } }
/** * @throws IllegalArgumentException if s is null */ public MutableSharedBitVectorIntSet(SparseIntSet s) { if (s == null) { throw new IllegalArgumentException("s is null"); } if (s.size() == 0) { return; } this.privatePart = MutableSparseIntSet.make(s); checkOverflow(); if (PARANOID) { checkIntegrity(); } }
/** * @throws IllegalArgumentException if s is null */ public MutableSharedBitVectorIntSet(SparseIntSet s) { if (s == null) { throw new IllegalArgumentException("s is null"); } if (s.size() == 0) { return; } this.privatePart = MutableSparseIntSet.make(s); checkOverflow(); if (PARANOID) { checkIntegrity(); } }
/** * @return a new sparse int set which adds j to s * @throws IllegalArgumentException if s == null */ public static IntSet add(IntSet s, int j) throws IllegalArgumentException { if (s == null) { throw new IllegalArgumentException("s == null"); } if (s instanceof SparseIntSet) { SparseIntSet sis = (SparseIntSet) s; return SparseIntSet.add(sis, j); } else { // really slow. optimize as needed. MutableSparseIntSet result = MutableSparseIntSet.make(s); result.add(j); return result; } }
/** * @return a new sparse int set which adds j to s * @throws IllegalArgumentException if s == null */ public static IntSet add(IntSet s, int j) throws IllegalArgumentException { if (s == null) { throw new IllegalArgumentException("s == null"); } if (s instanceof SparseIntSet) { SparseIntSet sis = (SparseIntSet) s; return SparseIntSet.add(sis, j); } else { // really slow. optimize as needed. MutableSparseIntSet result = MutableSparseIntSet.make(s); result.add(j); return result; } }
/** * @return a new sparse int set which adds j to s * @throws IllegalArgumentException if s == null */ public static IntSet add(IntSet s, int j) throws IllegalArgumentException { if (s == null) { throw new IllegalArgumentException("s == null"); } if (s instanceof SparseIntSet) { SparseIntSet sis = (SparseIntSet) s; return SparseIntSet.add(sis, j); } else { // really slow. optimize as needed. MutableSparseIntSet result = MutableSparseIntSet.make(s); result.add(j); return result; } }
@Override public void copySet(IntSet set) { if (set instanceof MutableSharedBitVectorIntSet) { MutableSharedBitVectorIntSet other = (MutableSharedBitVectorIntSet) set; if (other.privatePart != null) { this.privatePart = MutableSparseIntSet.make(other.privatePart); } else { this.privatePart = null; } this.sharedPart = other.sharedPart; } else { // really slow. optimize as needed. clear(); addAll(set); } if (PARANOID) { checkIntegrity(); } }
@Override public void copySet(IntSet set) { if (set instanceof MutableSharedBitVectorIntSet) { MutableSharedBitVectorIntSet other = (MutableSharedBitVectorIntSet) set; if (other.privatePart != null) { this.privatePart = MutableSparseIntSet.make(other.privatePart); } else { this.privatePart = null; } this.sharedPart = other.sharedPart; } else { // really slow. optimize as needed. clear(); addAll(set); } if (PARANOID) { checkIntegrity(); } }