public class RankedAbstractMetaObject extends RankedAbstractObject
MetaObject
.
This class holds an AbstractObject
and its distance.
It is used as a return value for all the query operations
.comparator
Constructor and Description |
---|
RankedAbstractMetaObject(AbstractObject object,
float distance,
float[] subDistances)
Creates a new instance of RankedAbstractObject for the object its measured distance.
|
Modifier and Type | Method and Description |
---|---|
float |
getSubDistance(int index)
Returns the distance to the sub-object
index of the encapsulated object. |
float[] |
getSubDistances()
Returns the array of distances to respective sub-objects of the encapsulated object.
|
int |
getSubDistancesCount()
Returns the number of sub-object distances stored in this object.
|
java.lang.String |
toString() |
clearSurplusData, clone
compareTo, equals, getDistance, getObject, getObjectsIterator, hashCode
public RankedAbstractMetaObject(AbstractObject object, float distance, float[] subDistances)
object
- the measured objectdistance
- the measured distancesubDistances
- the distances to respective sub-objects of the object
public float[] getSubDistances()
public int getSubDistancesCount()
public float getSubDistance(int index) throws java.lang.IndexOutOfBoundsException
index
of the encapsulated object.index
- the index of the sub-object the distance of which to getjava.lang.IndexOutOfBoundsException
- if the given index is not validpublic java.lang.String toString()
toString
in class DistanceRankedObject<AbstractObject>