@Override @SuppressWarnings("unchecked") public long getLong(final Object o) { if (size == 0) return defRetValue; final BitVector bv = transform.toBitVector((T)o).fast(); final long bucket = distributor.getLong(bv); return (bucket << log2BucketSize) + offset.getLong(bv); }
@Override @SuppressWarnings("unchecked") public long getLong(final Object o) { if (size <= 1) return defRetValue; final BitVector bv = transform.toBitVector((T)o).fast(); final long bucket = distributor.getLong(bv); // TODO: could use offset's return value to return defRetValue. return (bucket << log2BucketSize) + offset.getLong(bv); }
@Override @SuppressWarnings("unchecked") public long getLong(final Object o) { if (size == 0) return defRetValue; final BitVector bv = transform.toBitVector((T)o).fast(); final long bucket = distributor.getLong(bv); return (bucket == 0 ? 0 : select.select(bucket - 1)) + offset.getLong(bv); }
@Override @SuppressWarnings("unchecked") public long getLong(final Object o) { if (size == 0) return defRetValue; final BitVector bv = transform.toBitVector((T)o).fast(); final long state[] = Hashes.preprocessSpooky4(bv, seed); final long[] triple = new long[3]; Hashes.spooky4(bv, bv.length(), seed, state, triple); final long bucket = distributor.getLongByBitVectorTripleAndState(bv, triple, state); final long result = (bucket << log2BucketSize) + offset.getLongByTriple(triple); if (signatureMask != 0) return result < 0 || result >= size || signatures.getLong(result) != (triple[0] & signatureMask) ? defRetValue : result; // Out-of-set strings can generate bizarre 3-hyperedges. return result < 0 || result >= size ? defRetValue : result; }
@Override @SuppressWarnings("unchecked") public long getLong(final Object o) { if (n == 0) return defRetValue; final BitVector bitVector = transform.toBitVector((T)o).fast(); final long[] triple = new long[3]; Hashes.spooky4(bitVector, seed, triple); final long prefix = lcpLengths.getLongByTriple(triple); if (prefix == -1 || prefix > bitVector.length()) return defRetValue; final long result = (lcp2Bucket.getLong(bitVector.subVector(0, prefix)) << log2BucketSize) + offsets.getLongByTriple(triple); if (signatureMask != 0) return result < 0 || result >= n || signatures.getLong(result) != (triple[0] & signatureMask) ? defRetValue : result; // Out-of-set strings can generate bizarre 3-hyperedges. return result < 0 || result >= n ? defRetValue : result; }
@Override @SuppressWarnings("unchecked") public long getLong(final Object o) { if (n == 0) return defRetValue; final BitVector bitVector = transform.toBitVector((T)o).fast(); final long[] triple = new long[3]; Hashes.spooky4(transform.toBitVector((T)o), seed, triple); final long index = mph.getLongByTriple(triple); if (index == -1) return defRetValue; final long prefix = lcpLengths.getLong(index); if (prefix == -1 || prefix > bitVector.length()) return defRetValue; return (lcp2Bucket.getLong(bitVector.subVector(0, prefix)) << log2BucketSize) + offsets.getLong(index); }
final BitVector bitVector = transform.toBitVector((T)object).fast(); long p = 1; final long length = bitVector.length();
try { if (DEBUG) System.err.println("Getting " + o + "..."); final BitVector v = transformationStrategy.toBitVector((T)o).fast(); final long length = v.length(); @SuppressWarnings("resource")
try { if (DEBUG) System.err.println("Getting " + o + "..."); final BitVector v = transformationStrategy.toBitVector((T)o).fast(); final long length = v.length(); @SuppressWarnings("resource")
int mistakes = 0; while(iterator.hasNext()) { final BitVector curr = iterator.next().fast(); if (DEBUG) System.err.println("Checking element number " + c + ((c + 1) % (1L << log2BucketSize) == 0 ? " (bucket)" : "")); if (getNodeStringLength(curr) != intermediateTrie.externalParentRepresentations.getInt(c)){
public long getLong(final Object o) { if (size == 0) return 0; final BitVector bitVector = transformationStrategy.toBitVector((T)o).fast(); final LongArrayBitVector key = LongArrayBitVector.getInstance(); BitVector fragment = null;