Package generic.lsh.vector
Class IDFLookup
java.lang.Object
generic.lsh.vector.IDFLookup
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
empty()
int
int
getCount
(int hash) int
getRawCount
(int pos) int
getRawHash
(int pos) void
restoreXml
(XmlPullParser parser) void
void
set
(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
-