|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.obsearch.index.OBVectorShort
public class OBVectorShort
L1 distance implementation for shorts.
Constructor Summary | |
---|---|
OBVectorShort()
Default constructor must be provided by every object that implements the interface OB. |
|
OBVectorShort(Random r,
int dim)
Creates a new vector with dim dimensions created by Random.nextShort() |
|
OBVectorShort(short[] data)
|
Method Summary | |
---|---|
short |
distance(OBShort object)
Calculates the similarity of "this" and "object". |
boolean |
equals(Object o)
|
void |
load(byte[] input)
|
byte[] |
store()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OBVectorShort()
public OBVectorShort(short[] data)
public OBVectorShort(Random r, int dim)
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public short distance(OBShort object) throws net.obsearch.exception.OBException
OBShort
distance
in interface OBShort
object
- The object of type OBShort to be compared
net.obsearch.exception.OBException
- User generated exceptionpublic void load(byte[] input) throws net.obsearch.exception.OBException, IOException
load
in interface net.obsearch.Storable
net.obsearch.exception.OBException
IOException
public byte[] store() throws net.obsearch.exception.OBException, IOException
store
in interface net.obsearch.Storable
net.obsearch.exception.OBException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |