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