public void clear(int i) { if (V != null) { V.remove(i); } }
public void clear(int i) { if (V != null) { V.remove(i); } }
public void clear(int i) { if (V != null) { V.remove(i); } }
@Override public void intersectWith(IntSet set) { if (set instanceof MutableSharedBitVectorIntSet) { intersectWithInternal((MutableSharedBitVectorIntSet) set); } else if (set instanceof BitVectorIntSet) { intersectWithInternal(new MutableSharedBitVectorIntSet((BitVectorIntSet) set)); } else { // this is really slow. optimize as needed. for (IntIterator it = intIterator(); it.hasNext();) { int x = it.next(); if (!set.contains(x)) { remove(x); } } } if (DEBUG) { if (privatePart != null && sharedPart != null) assert privatePart.intersection(sharedPart).isEmpty(); } }
@Override public void intersectWith(IntSet set) { if (set instanceof MutableSharedBitVectorIntSet) { intersectWithInternal((MutableSharedBitVectorIntSet) set); } else if (set instanceof BitVectorIntSet) { intersectWithInternal(new MutableSharedBitVectorIntSet((BitVectorIntSet) set)); } else { // this is really slow. optimize as needed. for (IntIterator it = intIterator(); it.hasNext();) { int x = it.next(); if (!set.contains(x)) { remove(x); } } } if (DEBUG) { if (privatePart != null && sharedPart != null) assert privatePart.intersection(sharedPart).isEmpty(); } }
@Override public void intersectWith(IntSet set) { if (set instanceof MutableSharedBitVectorIntSet) { intersectWithInternal((MutableSharedBitVectorIntSet) set); } else if (set instanceof BitVectorIntSet) { intersectWithInternal(new MutableSharedBitVectorIntSet((BitVectorIntSet) set)); } else { // this is really slow. optimize as needed. for (IntIterator it = intIterator(); it.hasNext();) { int x = it.next(); if (!set.contains(x)) { remove(x); } } } if (DEBUG) { if (privatePart != null && sharedPart != null) assert privatePart.intersection(sharedPart).isEmpty(); } }
public void removeTarget(CGNode target) { allTargets.remove(getCallGraph().getNumber(target)); for (IntIterator it = targets.safeIterateIndices(); it.hasNext();) { int pc = it.next(); Object value = targets.get(pc); if (value instanceof CGNode) { if (value.equals(target)) { targets.remove(pc); } } else { MutableIntSet s = (MutableIntSet) value; int n = getCallGraph().getNumber(target); if (s.size() > 2) { s.remove(n); } else { assert s.size() == 2; if (s.contains(n)) { s.remove(n); int i = s.intIterator().next(); targets.set(pc, getCallGraph().getNode(i)); } } } } }
public void removeTarget(CGNode target) { allTargets.remove(getCallGraph().getNumber(target)); for (IntIterator it = targets.safeIterateIndices(); it.hasNext();) { int pc = it.next(); Object value = targets.get(pc); if (value instanceof CGNode) { if (value.equals(target)) { targets.remove(pc); } } else { MutableIntSet s = (MutableIntSet) value; int n = getCallGraph().getNumber(target); if (s.size() > 2) { s.remove(n); } else { assert s.size() == 2; if (s.contains(n)) { s.remove(n); int i = s.intIterator().next(); targets.set(pc, getCallGraph().getNode(i)); } } } } }