org.roaringbitmap.art.ForwardShuttle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of RoaringBitmap Show documentation
Show all versions of RoaringBitmap Show documentation
Roaring bitmaps are compressed bitmaps (also called bitsets) which tend to outperform
conventional compressed bitmaps such as WAH or Concise.
package org.roaringbitmap.art;
/**
* visit the leaf node space in ascending order.
*/
public class ForwardShuttle extends AbstractShuttle {
ForwardShuttle(Art art, Containers containers) {
super(art, containers);
}
@Override
protected boolean currentBeforeHigh(long current, long high) {
return current < high;
}
@Override
protected int visitedNodeNextPosition(Node node, int pos) {
return node.getNextLargerPos(pos);
}
@Override
protected int boundaryNodePosition(Node node, boolean inRunDirection) {
if (inRunDirection) {
return node.getMaxPos();
} else {
return node.getMinPos();
}
}
@Override
protected boolean prefixMismatchIsInRunDirection(byte nodeValue, byte highValue) {
return Byte.toUnsignedInt(nodeValue) < Byte.toUnsignedInt(highValue);
}
@Override
protected int searchMissNextPosition(SearchResult result) {
return result.getNextLargerPos();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy