/** this = this AND other */ public void and(FixedBitSet other) { and(other.bits, other.numWords); }
/** * Sets {@link #tempSet} to be a bitset with a "1" in the position of every dimension * in the {@link #votingRecord} that exactly matches the target number. */ private synchronized void setTempSetToExactMatches(int target) { if (target == 0) { tempSet.set(0, dimension); tempSet.xor(votingRecord.get(0)); for (int x = 1; x < votingRecord.size(); x++) tempSet.andNot(votingRecord.get(x)); } else { String inbinary = reverse(Integer.toBinaryString(target)); tempSet.xor(tempSet); try { tempSet.xor(votingRecord.get(inbinary.indexOf("1"))); //this requires error checking, it is throwing an index out of bounds exception } catch (Exception e) { e.printStackTrace(); } for (int q =0; q < votingRecord.size(); q++) { if (q < inbinary.length() && inbinary.charAt(q) == '1') tempSet.and(votingRecord.get(q)); else tempSet.andNot(votingRecord.get(q)); } } }
/** this = this AND other */ public void and(FixedBitSet other) { and(other.bits, other.numWords); }
tempSet.and(votingRecord.get(x));
/** this = this AND other */ public void and(FixedBitSet other) { and(other.bits, other.numWords); }
/** this = this AND other */ public void and(FixedBitSet other) { and(other.bits, other.numWords); }
/** * Removes from this builder documents that are not contained in <code>it</code>. */ @Deprecated public void and(DocIdSetIterator it) throws IOException { if (denseSet != null) { denseSet.and(it); } else if (sparseSet != null) { sparseSet.and(it); } }
/** * Removes from this builder documents that are not contained in <code>it</code>. */ @Deprecated public void and(DocIdSetIterator it) throws IOException { if (denseSet != null) { denseSet.and(it); } else if (sparseSet != null) { sparseSet.and(it); } }
public synchronized void selectedDecrement(int floor) { tempSet.set(0, dimension); for (int q = floor; q < votingRecord.size(); q++) { votingRecord.get(q).xor(tempSet); tempSet.and(votingRecord.get(q)); } }
/** * Decrement every dimension. Assumes at least one count in each dimension * i.e: no underflow check currently - will wreak havoc with zero counts */ public synchronized void decrement() { tempSet.set(0, dimension); for (int q = 0; q < votingRecord.size(); q++) { votingRecord.get(q).xor(tempSet); tempSet.and(votingRecord.get(q)); } }
private static FixedBitSet applyANDOnBitSets(final List<FixedBitSet> filtersData) { //Start by cloning the first, as that's giving you the upper bound for the set ids FixedBitSet first = filtersData.get( 0 ); FixedBitSet toreturn = first.clone(); for ( FixedBitSet bits : filtersData ) { toreturn.and( bits ); } return toreturn; }
@Override public void and(DocIdSetIterator iter) throws IOException { if (BitSetIterator.getFixedBitSetOrNull(iter) != null) { assertUnpositioned(iter); final FixedBitSet bits = BitSetIterator.getFixedBitSetOrNull(iter); and(bits); } else { super.and(iter); } }
@Override public void and(DocIdSetIterator iter) throws IOException { if (BitSetIterator.getFixedBitSetOrNull(iter) != null) { assertUnpositioned(iter); final FixedBitSet bits = BitSetIterator.getFixedBitSetOrNull(iter); and(bits); } else { super.and(iter); } }
FixedBitSet definitePositives2 = concludeVote(remainder, row_floor-1); possiblePositives.and(definitePositives2); definitePositives.or(possiblePositives); return definitePositives;