messif.objects.impl
Class ObjectFloatVectorL2
java.lang.Object
messif.objects.UniqueID
messif.objects.AbstractObject
messif.objects.LocalAbstractObject
messif.objects.impl.ObjectFloatVector
messif.objects.impl.ObjectFloatVectorL2
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<UniqueID>, BinarySerializable, Clearable
public class ObjectFloatVectorL2
- extends ObjectFloatVector
- See Also:
- Serialized Form
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, getMaxDistance, getNormDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, readObjectComments, unchainFilter, write, write |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
ObjectFloatVectorL2
public ObjectFloatVectorL2(float[] data)
- Creates a new instance of object
ObjectFloatVectorL2
public ObjectFloatVectorL2(int dimension,
float min,
float max)
- Creates a new instance of randomly generated object
ObjectFloatVectorL2
public ObjectFloatVectorL2(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
ObjectFloatVectorL2
protected ObjectFloatVectorL2(BinaryInput input,
BinarySerializator serializator)
throws java.io.IOException
- Creates a new instance of ObjectFloatVectorL2 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