use of org.trie4j.bv.BytesRank0OnlySuccinctBitVector in project trie4j by takawitter.
the class BytesConstantTimeSelect0TailLOUDSPPTrieWithSuffixTrieDenseTailArrayWikipediaSerializeTest method secondTrie.
@Override
protected Trie secondTrie(Trie firstTrie) {
Trie t = new TailLOUDSTrie(firstTrie, new LOUDSPPBvTree(new BytesRank0OnlySuccinctBitVector(), new BytesConstantTimeSelect0SuccinctBitVector()), new SuffixTrieDenseTailArrayBuilder());
t.trimToSize();
return t;
}
use of org.trie4j.bv.BytesRank0OnlySuccinctBitVector in project trie4j by takawitter.
the class TrieWriter method writeSuccinctBitVector.
public void writeSuccinctBitVector(SuccinctBitVector sbv) throws IOException {
if (sbv instanceof BytesSuccinctBitVector) {
dos.writeShort(TYPE_SBV_BYTES);
writeBytesSuccinctBitVector((BytesSuccinctBitVector) sbv);
} else if (sbv instanceof BytesRank0OnlySuccinctBitVector) {
dos.writeShort(TYPE_SBV_RANK0ONLY);
writeRank0OnlySuccinctBitVector((BytesRank0OnlySuccinctBitVector) sbv);
} else if (sbv instanceof BytesRank1OnlySuccinctBitVector) {
dos.writeShort(TYPE_SBV_RANK1ONLY);
writeRank1OnlySuccinctBitVector((BytesRank1OnlySuccinctBitVector) sbv);
} else if (sbv instanceof BytesRank1OnlySuccinctBitVector) {
dos.writeShort(TYPE_SBV_LONGS);
writeLongsSuccinctBitVector((LongsSuccinctBitVector) sbv);
} else {
throw new IOException("unknown sbv: " + sbv.getClass().getName());
}
}
Aggregations