Package generic.lsh.vector
Class IDFLookup
java.lang.Object
generic.lsh.vector.IDFLookup
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanempty()intintgetCount(int hash) intgetRawCount(int pos) intgetRawHash(int pos) voidrestoreXml(XmlPullParser parser) voidvoidset(int[] hashCountPair) Set from an array of hash/count pairs.int[]toArray()Collapse IDFLookup into an int array, suitable for storage
-
Constructor Details
-
IDFLookup
public IDFLookup()
-
-
Method Details
-
empty
public boolean empty() -
getCount
public int getCount(int hash) -
getCapacity
public int getCapacity() -
getRawHash
public int getRawHash(int pos) -
getRawCount
public int getRawCount(int pos) -
saveXml
- Throws:
IOException
-
restoreXml
-
toArray
public int[] toArray()Collapse IDFLookup into an int array, suitable for storage- Returns:
- int[]
-
set
public void set(int[] hashCountPair) Set from an array of hash/count pairs. Every even index is a hash, every odd index is a count- Parameters:
hashCountPair- is the pair array
-