|
||||||||||
| 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.BucketObjectShort<O>
public class BucketObjectShort<O extends OBShort>
BucketObjectShort extends BucketObject by adding an SMAP vector used to minimize
the number of distance computations required per object.
| Constructor Summary | |
|---|---|
BucketObjectShort()
|
|
BucketObjectShort(short[] smapVector,
long id)
Creates a new bucket short with |
|
BucketObjectShort(short[] smapVector,
long id,
O object)
Creates a new bucket short with |
|
| Method Summary | |
|---|---|
int |
compareTo(BucketObjectShort o)
|
static short[] |
convertTuple(OBShort object,
OBShort[] pivots)
|
boolean |
equals(Object other)
|
int |
getPivotSize()
Returns the # of pivots. |
short[] |
getSmapVector()
|
short |
lInf(BucketObjectShort b)
Execute l-inf between this object and b. |
static short |
lInf(short[] smapVector,
short[] other)
|
void |
read(ByteBuffer in,
int pivots)
Reads the given # of pivots from the given bytebuffer. |
void |
setSmapVector(short[] 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 BucketObjectShort()
public BucketObjectShort(short[] 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 BucketObjectShort(short[] 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 Objectpublic short lInf(BucketObjectShort b)
b -
public static short lInf(short[] smapVector,
short[] other)
public static short[] convertTuple(OBShort object,
OBShort[] pivots)
throws OBException
OBExceptionpublic short[] 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 OBShort>out - pivots - public void setSmapVector(short[] smapVector)
smapVector - the smapVector to setpublic int getPivotSize()
BucketObject
getPivotSize in class BucketObject<O extends OBShort>public int compareTo(BucketObjectShort o)
compareTo in interface Comparable<BucketObjectShort>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||