|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.obsearch.index.OBVectorInt
public class OBVectorInt
L1 distance implementation for ints.
Constructor Summary | |
---|---|
OBVectorInt()
Default constructor must be provided by every object that implements the interface OB. |
|
OBVectorInt(int[] data)
|
|
OBVectorInt(Random r,
int dim)
Creates a new vector with dim dimensions created by Random.nextInt() |
Method Summary | |
---|---|
int |
distance(OBInt object)
Calculates the similarity of "this" and "object". |
boolean |
equals(Object o)
|
void |
load(byte[] input)
Populates the object's internal properties from the given byte stream. |
byte[] |
store()
Stores this object in a byte array. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OBVectorInt()
public OBVectorInt(int[] data)
public OBVectorInt(Random r, int dim)
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int distance(OBInt object) throws OBException
OBInt
distance
in interface OBInt
object
- The object of type OBInt to be compared
OBException
- User generated exceptionpublic void load(byte[] input) throws OBException, IOException
Storable
load
in interface Storable
input
- byte array from where we will load data.
OBException
- if the data cannot be loaded.
IOException
public byte[] store() throws OBException, IOException
Storable
store
in interface Storable
OBException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |