/** * Remove the watches, and return the number of watches being removed. */ public synchronized int remove(Set<Integer> bitSet, BitSet bits) { cache.removeAll(bitSet); elementBits.andNot(bits); int elementCountBefore = elementCount; elementCount = elementBits.cardinality(); return elementCountBefore - elementCount; }
private static boolean subset(BitSet sub, BitSet sup) { BitSet subcopy = (BitSet) sub.clone(); subcopy.andNot(sup); return subcopy.isEmpty(); }
public void andNot(MutableBitmap mutableBitmap) { if (mutableBitmap instanceof WrappedBitSetBitmap) { WrappedBitSetBitmap bitSet = (WrappedBitSetBitmap) mutableBitmap; this.bitmap.andNot(bitSet.bitmap); } else { throw new IAE( "Unknown class type: %s expected %s", mutableBitmap.getClass().getCanonicalName(), WrappedBitSetBitmap.class.getCanonicalName() ); } }
void intersect( BitSet set, boolean inverse ) { if ( inverse ) { candidates.andNot( set ); } else { candidates.and( set ); } checkEmpty(); }
/** Returns true if there are dead states that reach an accept state. */ public static boolean hasDeadStatesToAccept(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromAccept.andNot(reachableFromInitial); return reachableFromAccept.isEmpty() == false; }
@Override public boolean isSubSet(FlowSet<T> other) { if (other == this) { return true; } if (sameType(other)) { ArrayPackedSet<T> o = (ArrayPackedSet<T>) other; BitSet tmp = (BitSet) o.bits.clone(); tmp.andNot(bits); return tmp.isEmpty(); } return super.isSubSet(other); }
/** Returns true if there are dead states reachable from an initial state. */ public static boolean hasDeadStatesFromInitial(Automaton a) { BitSet reachableFromInitial = getLiveStatesFromInitial(a); BitSet reachableFromAccept = getLiveStatesToAccept(a); reachableFromInitial.andNot(reachableFromAccept); return reachableFromInitial.isEmpty() == false; }
@Override protected void merge(ArrayState in1, ArrayState in2, ArrayState out) { out.active.clear(); out.active.or(in1.active); out.active.or(in2.active); BitSet in2_excl = (BitSet) in2.active.clone(); in2_excl.andNot(in1.active); for (int i = in1.active.nextSetBit(0); i >= 0; i = in1.active.nextSetBit(i + 1)) { if (in1.state[i] == null) { out.state[i] = null; } else if (in2.active.get(i)) { if (in2.state[i] == null) { out.state[i] = null; } else { out.state[i] = mergeTypeStates(in1.state[i], in2.state[i]); } } else { out.state[i] = in1.state[i]; } } for (int i = in2_excl.nextSetBit(0); i >= 0; i = in2_excl.nextSetBit(i + 1)) { out.state[i] = in2.state[i]; } }
public ImmutableBitSet andNot(ImmutableBitSet another) { BitSet mutable = mutable(); mutable.andNot(another.set); return new ImmutableBitSet(mutable); }
newIn.or(liveIn[successors.get(s).getId()]); newIn.andNot(defs[blockId]); newIn.or(uses[blockId]); if (!prevIn.equals(newIn)) {
/** * Return true if bs1 dominates bs2 - meaning that at least all of the bits set in bs2 are set in * bs1. * */ private boolean dominates(BitSet bs1, BitSet bs2) { // bs1 dominates bs2 if it has set at least all of the bits in bs1. BitSet copy = new BitSet(); // Make copy a copy of bit set 2 copy.or(bs2); // Clear all of the bits in copy that are set in bit set 1 copy.andNot(bs1); // If all of the bits have been cleared in copy, that means // bit set 1 had at least all of the bits set that were set in // bs2 return copy.isEmpty(); }
for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) { BlockNode dom = basicBlocks.get(i); bs.andNot(dom.getDoms());
@Override public void difference(FlowSet<T> otherFlow, FlowSet<T> destFlow) { if (sameType(otherFlow) && sameType(destFlow)) { ArrayPackedSet<T> other = (ArrayPackedSet<T>) otherFlow; ArrayPackedSet<T> dest = (ArrayPackedSet<T>) destFlow; copyBitSet(dest).andNot(other.bits); } else { super.difference(otherFlow, destFlow); } }
outs.andNot(b.getDomFrontier()); if (b.contains(AFlag.LOOP_START)) { outs.clear(b.getId());
gtfsStorage.getStopSequences().put(boardEdge.getEdge(), stopTime.stop_sequence); gtfsStorage.getTripDescriptors().put(boardEdge.getEdge(), tripDescriptor.toByteArray()); accumulatorValidity.andNot(lastTrip.tripWithStopTimes.validOnDay);