jsat.linear.vectorcollection
Class IndexDistPair
- java.lang.Object
-
- jsat.linear.vectorcollection.IndexDistPair
-
- All Implemented Interfaces:
- java.lang.Comparable<IndexDistPair>
public class IndexDistPair extends java.lang.Object implements java.lang.Comparable<IndexDistPair>
This class exists as a helper method for use with nearest neighbor implementations. It stores an integer to represent the index of a vector, and a double to store the distance of the index to a given query.
-
-
Constructor Summary
Constructors Constructor and Description IndexDistPair(int indx, double dist)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareTo(IndexDistPair o)doublegetDist()intgetIndex()voidsetDist(double dist)voidsetIndex(int indx)
-
-
-
Method Detail
-
getIndex
public int getIndex()
-
setIndex
public void setIndex(int indx)
-
getDist
public double getDist()
-
setDist
public void setDist(double dist)
-
compareTo
public int compareTo(IndexDistPair o)
- Specified by:
compareToin interfacejava.lang.Comparable<IndexDistPair>
-
-
DataMelt 3.0 © DataMelt by jWork.ORG