use of org.trie4j.bv.LongsSuccinctBitVector 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());
}
}
use of org.trie4j.bv.LongsSuccinctBitVector in project trie4j by takawitter.
the class LongsTailLOUDSPPTrieWithSuffixTrieDenseTailArrayWikipediaSerializeTest method secondTrie.
@Override
protected Trie secondTrie(Trie firstTrie) {
Trie t = new TailLOUDSTrie(firstTrie, new LOUDSPPBvTree(new LongsRank0OnlySuccinctBitVector(), new LongsSuccinctBitVector()), new SuffixTrieDenseTailArrayBuilder());
t.trimToSize();
return t;
}
Aggregations