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