Package generic.lsh.vector
Class IDFLookup
- java.lang.Object
-
- generic.lsh.vector.IDFLookup
-
public class IDFLookup extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
IDFLookup.IDFEntry
-
Constructor Summary
Constructors Constructor Description IDFLookup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
empty()
int
getCapacity()
int
getCount(int hash)
int
getRawCount(int pos)
int
getRawHash(int pos)
void
restoreXml(XmlPullParser parser)
void
saveXml(java.io.Writer fwrite)
void
set(int[] hashCountPair)
Set from an array of hash/count pairs.int[]
toArray()
Collapse IDFLookup into an int array, suitable for storage
-
-
-
Method Detail
-
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
public void saveXml(java.io.Writer fwrite) throws java.io.IOException
- Throws:
java.io.IOException
-
restoreXml
public void restoreXml(XmlPullParser parser)
-
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
-
-