messif.objects.impl
Class ObjectFloatUnitVectorL2
java.lang.Object
messif.objects.UniqueID
messif.objects.AbstractObject
messif.objects.LocalAbstractObject
messif.objects.impl.ObjectFloatVector
messif.objects.impl.ObjectFloatUnitVector
messif.objects.impl.ObjectFloatUnitVectorL2
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<UniqueID>, BinarySerializable, Clearable
public class ObjectFloatUnitVectorL2
- extends ObjectFloatUnitVector
- See Also:
- Serialized Form
Method Summary |
protected float |
getDistanceImpl(LocalAbstractObject obj,
float distThreshold)
Metric function
Implements euclidean distance measure (so-called L2 metric) |
float |
getMaxDistance()
Returns a maximal possible distance for this class. |
Methods inherited from class messif.objects.impl.ObjectFloatVector |
binarySerialize, cloneRandomlyModify, dataEquals, dataHashCode, getBinarySize, getDimensionality, getMinMaxForEveryCoord, getMinMaxOverCoords, getMinMaxOverCoords, getSize, getVectorData, toString, translateToUnitCube, translateToUnitCube, writeData |
Methods inherited from class messif.objects.LocalAbstractObject |
clearSurplusData, clone, clone, create, create, createMetaDistancesHolder, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceUpperBound, getDistanceUpperBoundImpl, getNormDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, readObjectComments, unchainFilter, write, write |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ObjectFloatUnitVectorL2
public ObjectFloatUnitVectorL2(float[] data)
- Creates a new instance of object
ObjectFloatUnitVectorL2
public ObjectFloatUnitVectorL2(int dimension)
- Creates a new instance of randomly generated object
ObjectFloatUnitVectorL2
public ObjectFloatUnitVectorL2(java.io.BufferedReader stream)
throws java.io.IOException,
java.lang.NumberFormatException
- Creates a new instance of object from stream
- Throws:
java.io.IOException
java.lang.NumberFormatException
ObjectFloatUnitVectorL2
protected ObjectFloatUnitVectorL2(BinaryInput input,
BinarySerializator serializator)
throws java.io.IOException
- Creates a new instance of ObjectFloatUnitVector loaded from binary input buffer.
- Parameters:
input
- the buffer to read the ObjectFloatVector fromserializator
- the serializator used to write objects
- Throws:
java.io.IOException
- if there was an I/O error reading from the buffer
getDistanceImpl
protected float getDistanceImpl(LocalAbstractObject obj,
float distThreshold)
- Metric function
Implements euclidean distance measure (so-called L2 metric)
- Specified by:
getDistanceImpl
in class LocalAbstractObject
- Parameters:
obj
- the object to compute distance todistThreshold
- the threshold value on the distance
- Returns:
- the actual distance between obj and this if the distance is lower than distThreshold
getMaxDistance
public float getMaxDistance()
- Description copied from class:
LocalAbstractObject
- Returns a maximal possible distance for this class.
This method must return the same value for all instances of this class.
Default implementation returns
LocalAbstractObject.MAX_DISTANCE
.
- Overrides:
getMaxDistance
in class LocalAbstractObject
- Returns:
- a maximal possible distance for this class