|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.obsearch.dimension.AbstractDimension
net.obsearch.dimension.DimensionShort
public class DimensionShort
DimensionShort Stores objects of type short.
| Constructor Summary | |
|---|---|
DimensionShort(int position,
short value)
Creates a new DimensionShort object. |
|
| Method Summary | |
|---|---|
int |
compareTo(DimensionShort other)
Compares this object with other. |
static short |
euclidean(short[] a,
short[] b)
Calculates the euc distance for two tuples |
static short[] |
getBasicTuple(OBShort[] pivots,
OBShort object)
Creates a short array from the given pivots and the given object. |
static short[] |
getPrimitiveTuple(long[] pivots,
long objectId,
Index<? extends OBShort> index)
Calculates the smap tuple for the given objectId, and the given pivots |
static short[] |
getPrimitiveTuple(OBShort[] pivots,
OBShort object)
Calculates the smap tuple for the given objectId, and the given pivots |
static DimensionShort[] |
getTuple(long[] pivots,
long objectId,
Index<? extends OBShort> index)
Creates a dimension array from the given pivots and the given object id. |
static DimensionShort[] |
getTuple(OBShort[] pivots,
OBShort object)
Creates a dimension array from the given pivots and the given object. |
short |
getValue()
|
static short |
lInfinite(short[] a,
short[] b)
Calculates L-inf for two short tuples. |
static short |
minDistance(List<Long> objects,
Index<OBShort> index)
Calculate the minimum distance of the given objects (all objects compared against all objects) |
static long[] |
select(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<OBShort> index,
cern.colt.list.LongArrayList excludes,
short minDistance)
Selects k random elements from the given source. |
static DimensionShort[] |
transformPrimitiveTuple(short[] tuple)
Transform the given primitive tuple into a Dimension tuple. |
| Methods inherited from class net.obsearch.dimension.AbstractDimension |
|---|
getOrder, mapId, max, select |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DimensionShort(int position,
short value)
position - The position of this dimension.value - The value of this dimension.| Method Detail |
|---|
public static DimensionShort[] getTuple(OBShort[] pivots,
OBShort object)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
pivots - The pivots used for the embedding.object - The object to be projected.
IllegalIdException
IllegalAccessException
InstantiationException
OBException
public static long[] select(int k,
Random r,
cern.colt.list.LongArrayList source,
Index<OBShort> index,
cern.colt.list.LongArrayList excludes,
short minDistance)
throws IllegalIdException,
OBException,
IllegalAccessException,
InstantiationException
k - number of elements to selectr - Random object used to randomly select objects.source - The source of item ids.index - underlying index.will - not add pivots included in excludes.minDistance - The min distance required by the objects.
IllegalIdException
OBException
IllegalAccessException
InstantiationException
public static short minDistance(List<Long> objects,
Index<OBShort> index)
throws IllegalIdException,
OBException,
IllegalAccessException,
InstantiationException
objects -
IllegalIdException
OBException
IllegalAccessException
InstantiationException
public static short[] getBasicTuple(OBShort[] pivots,
OBShort object)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
pivots - The pivots used for the embedding.object - The object to be projected.
IllegalIdException
IllegalAccessException
InstantiationException
OBException
public static DimensionShort[] getTuple(long[] pivots,
long objectId,
Index<? extends OBShort> index)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
IllegalIdException
IllegalAccessException
InstantiationException
OBExceptionpublic int compareTo(DimensionShort other)
compareTo in interface Comparable<DimensionShort>public short getValue()
public static short[] getPrimitiveTuple(long[] pivots,
long objectId,
Index<? extends OBShort> index)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
pivots - objectId -
IllegalIdException
IllegalAccessException
InstantiationException
OBExceptionpublic static DimensionShort[] transformPrimitiveTuple(short[] tuple)
tuple - The tuple that will be transformed.
public static short[] getPrimitiveTuple(OBShort[] pivots,
OBShort object)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
pivots - objectId -
IllegalIdException
IllegalAccessException
InstantiationException
OBException
public static short lInfinite(short[] a,
short[] b)
a - tupleb - tuple
public static short euclidean(short[] a,
short[] b)
a - tupleb - tuple
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||