public final class IteratingBufferedRunningLengthWord extends java.lang.Object implements IteratingRLW, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
private BufferedRunningLengthWord |
brlw |
private Buffer |
buffer |
private EWAHIterator |
iterator |
private int |
literalWordStartPosition |
| Constructor and Description |
|---|
IteratingBufferedRunningLengthWord(EWAHCompressedBitmap bitmap)
Instantiates a new iterating buffered running length word.
|
IteratingBufferedRunningLengthWord(EWAHIterator iterator)
Instantiates a new iterating buffered running length word.
|
| Modifier and Type | Method and Description |
|---|---|
IteratingBufferedRunningLengthWord |
clone() |
void |
discardFirstWords(long x)
Discard first words, iterating to the next running length word if
needed.
|
void |
discardRunningWords()
Discard all running words
|
void |
discharge(BitmapStorage container)
Write out the remaining words
|
long |
discharge(BitmapStorage container,
long max)
Write out up to max words, returns how many were written
|
private static void |
discharge(BufferedRunningLengthWord initialWord,
EWAHIterator iterator,
BitmapStorage container)
For internal use.
|
void |
dischargeAsEmpty(BitmapStorage container)
Write out the remain words, transforming them to zeroes.
|
long |
dischargeNegated(BitmapStorage container,
long max)
Write out up to max words (negated), returns how many were written
|
long |
getLiteralWordAt(int index)
Get the nth literal word for the current running length word
|
int |
getNumberOfLiteralWords()
Gets the number of literal words for the current running length word.
|
boolean |
getRunningBit()
Gets the running bit.
|
long |
getRunningLength()
Gets the running length.
|
boolean |
next()
Move to the next RunningLengthWord
|
long |
size()
Size in uncompressed words of the current running length word.
|
void |
writeLiteralWords(int numWords,
BitmapStorage container)
write the first N literal words to the target bitmap.
|
void |
writeNegatedLiteralWords(int numWords,
BitmapStorage container)
write the first N literal words (negated) to the target bitmap.
|
private BufferedRunningLengthWord brlw
private final Buffer buffer
private int literalWordStartPosition
private EWAHIterator iterator
public IteratingBufferedRunningLengthWord(EWAHIterator iterator)
iterator - iteratorpublic IteratingBufferedRunningLengthWord(EWAHCompressedBitmap bitmap)
bitmap - over which we want to iteratepublic void discardFirstWords(long x)
discardFirstWords in interface IteratingRLWx - the number of words to be discardedpublic void discardRunningWords()
IteratingRLWdiscardRunningWords in interface IteratingRLWpublic boolean next()
next in interface IteratingRLWpublic long discharge(BitmapStorage container, long max)
container - target for writesmax - maximal number of writespublic long dischargeNegated(BitmapStorage container, long max)
container - target for writesmax - maximal number of writespublic void dischargeAsEmpty(BitmapStorage container)
container - target for writespublic void discharge(BitmapStorage container)
container - target for writespublic long getLiteralWordAt(int index)
getLiteralWordAt in interface IteratingRLWindex - zero based indexpublic int getNumberOfLiteralWords()
getNumberOfLiteralWords in interface IteratingRLWpublic boolean getRunningBit()
getRunningBit in interface IteratingRLWpublic long getRunningLength()
getRunningLength in interface IteratingRLWpublic long size()
size in interface IteratingRLWpublic void writeLiteralWords(int numWords,
BitmapStorage container)
numWords - number of words to be writtencontainer - where we writepublic void writeNegatedLiteralWords(int numWords,
BitmapStorage container)
numWords - number of words to be writtencontainer - where we writeprivate static void discharge(BufferedRunningLengthWord initialWord, EWAHIterator iterator, BitmapStorage container)
initialWord - the initial worditerator - the iteratorcontainer - the containerpublic IteratingBufferedRunningLengthWord clone() throws java.lang.CloneNotSupportedException
clone in interface IteratingRLWclone in class java.lang.Objectjava.lang.CloneNotSupportedException - this should not be thrown in theory