|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.obsearch.index.bucket.BucketObject<O>
net.obsearch.index.bucket.impl.BucketObjectInt<O>
public class BucketObjectInt<O extends OBInt>
BucketObjectInt extends BucketObject
by adding an SMAP vector used to minimize
the number of distance computations required per object.
Constructor Summary | |
---|---|
BucketObjectInt()
|
|
BucketObjectInt(int[] smapVector,
long id)
Creates a new bucket int with |
|
BucketObjectInt(int[] smapVector,
long id,
O object)
Creates a new bucket int with |
Method Summary | |
---|---|
int |
compareTo(BucketObjectInt o)
|
static int[] |
convertTuple(OBInt object,
OBInt[] pivots)
|
boolean |
equals(Object other)
|
int |
getPivotSize()
Returns the # of pivots. |
int[] |
getSmapVector()
|
int |
lInf(BucketObjectInt b)
Execute l-inf between this object and b. |
static int |
lInf(int[] smapVector,
int[] other)
|
void |
read(ByteBuffer in,
int pivots)
Reads the given # of pivots from the given bytebuffer. |
void |
setSmapVector(int[] smapVector)
|
String |
toString()
|
void |
write(ByteBuffer out)
Writes itself into the given data buffer. |
Methods inherited from class net.obsearch.index.bucket.BucketObject |
---|
getId, getObject, setId, setObject |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BucketObjectInt()
public BucketObjectInt(int[] smapVector, long id)
bucket
- Bucket number.level
- Level within the hash table.smapVector
- The distances of the corresponding object and the pivots
for the given level.exclusionBucket
- If true, the corresponding object is in the exclusion
zone.id
- Optional id of the given object. Not always used.public BucketObjectInt(int[] smapVector, long id, O object)
bucket
- Bucket number.level
- Level within the hash table.smapVector
- The distances of the corresponding object and the pivots
for the given level.exclusionBucket
- If true, the corresponding object is in the exclusion
zone.id
- Optional id of the given object. Not always used.Method Detail |
---|
public boolean equals(Object other)
equals
in class Object
public int lInf(BucketObjectInt b)
b
-
public static int lInf(int[] smapVector, int[] other)
public static int[] convertTuple(OBInt object, OBInt[] pivots) throws OBException
OBException
public int[] getSmapVector()
public void write(ByteBuffer out)
data
- The ByteBuffer that will be modified.public void read(ByteBuffer in, int pivots)
read
in class BucketObject<O extends OBInt>
out
- pivots
- public void setSmapVector(int[] smapVector)
smapVector
- the smapVector to setpublic int getPivotSize()
BucketObject
getPivotSize
in class BucketObject<O extends OBInt>
public int compareTo(BucketObjectInt o)
compareTo
in interface Comparable<BucketObjectInt>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |