|
||||||||||
| 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.DimensionFloat
public class DimensionFloat
DimensionFloat Stores objects of type float.
| Constructor Summary | |
|---|---|
DimensionFloat(int position,
float value)
Creates a new DimensionFloat object. |
|
| Method Summary | |
|---|---|
int |
compareTo(DimensionFloat other)
Compares this object with other. |
static float |
euclidean(float[] a,
float[] b)
Calculates the euc distance for two tuples |
static float[] |
getBasicTuple(OBFloat[] pivots,
OBFloat object)
Creates a float array from the given pivots and the given object. |
static float[] |
getPrimitiveTuple(long[] pivots,
long objectId,
Index<? extends OBFloat> index)
Calculates the smap tuple for the given objectId, and the given pivots |
static float[] |
getPrimitiveTuple(OBFloat[] pivots,
OBFloat object)
Calculates the smap tuple for the given objectId, and the given pivots |
static DimensionFloat[] |
getTuple(long[] pivots,
long objectId,
Index<? extends OBFloat> index)
Creates a dimension array from the given pivots and the given object id. |
static DimensionFloat[] |
getTuple(OBFloat[] pivots,
OBFloat object)
Creates a dimension array from the given pivots and the given object. |
float |
getValue()
|
static float |
lInfinite(float[] a,
float[] b)
Calculates L-inf for two float tuples. |
static float |
minDistance(List<Long> objects,
Index<OBFloat> 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<OBFloat> index,
cern.colt.list.LongArrayList excludes,
float minDistance)
Selects k random elements from the given source. |
static DimensionFloat[] |
transformPrimitiveTuple(float[] 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 DimensionFloat(int position,
float value)
position - The position of this dimension.value - The value of this dimension.| Method Detail |
|---|
public static DimensionFloat[] getTuple(OBFloat[] pivots,
OBFloat 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<OBFloat> index,
cern.colt.list.LongArrayList excludes,
float 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 float minDistance(List<Long> objects,
Index<OBFloat> index)
throws IllegalIdException,
OBException,
IllegalAccessException,
InstantiationException
objects -
IllegalIdException
OBException
IllegalAccessException
InstantiationException
public static float[] getBasicTuple(OBFloat[] pivots,
OBFloat 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 DimensionFloat[] getTuple(long[] pivots,
long objectId,
Index<? extends OBFloat> index)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
IllegalIdException
IllegalAccessException
InstantiationException
OBExceptionpublic int compareTo(DimensionFloat other)
compareTo in interface Comparable<DimensionFloat>public float getValue()
public static float[] getPrimitiveTuple(long[] pivots,
long objectId,
Index<? extends OBFloat> index)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
pivots - objectId -
IllegalIdException
IllegalAccessException
InstantiationException
OBExceptionpublic static DimensionFloat[] transformPrimitiveTuple(float[] tuple)
tuple - The tuple that will be transformed.
public static float[] getPrimitiveTuple(OBFloat[] pivots,
OBFloat object)
throws IllegalIdException,
IllegalAccessException,
InstantiationException,
OBException
pivots - objectId -
IllegalIdException
IllegalAccessException
InstantiationException
OBException
public static float lInfinite(float[] a,
float[] b)
a - tupleb - tuple
public static float euclidean(float[] a,
float[] b)
a - tupleb - tuple
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||