public class NgramTrieBitarr
extends java.lang.Object
| Constructor and Description |
|---|
NgramTrieBitarr(int memLen) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getArr()
Getter for byte array, so it can be filled with actual data
|
float |
readFloat(int memPtr,
int bitOffset)
Reads float from byte array for specified memory pointer
and offset from this pointer.
|
int |
readInt(int memPtr,
int bitOffset,
int mask)
Reads integer from byte array for specified memory pointer,
offset from this pointer and mask of value that is read.
|
float |
readNegativeFloat(int memPtr,
int bitOffset)
Reads negative float from byte array for specified memory pointer
and offset from this pointer.
|
public byte[] getArr()
public int readInt(int memPtr,
int bitOffset,
int mask)
memPtr - - memory pointer for specific ngram orderbitOffset - - offset from memPtr that is calculated
according to ngram index and type of value that is read.mask - - bit mask of value that is readpublic float readNegativeFloat(int memPtr,
int bitOffset)
memPtr - - memory pointer for specific ngram orderbitOffset - - offset from memPtrpublic float readFloat(int memPtr,
int bitOffset)
memPtr - - memory pointer for specific ngram orderbitOffset - - offset from memPtr