Package elki.svm.data
Interface DataSet
-
- All Known Implementing Classes:
ByteWeightedArrayDataSet,DoubleWeightedDataSet,SimilarityQueryAdapter
public interface DataSetAPI to plug in custom data representations into libSVM.- Since:
- 0.8.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intclassnum(int i)Get the class number of the ith element.doublesimilarity(int i, int j)Get the ith element.intsize()Size of data set.voidswap(int i, int j)Swap two elements.doublevalue(int i)Get the value of the ith element.
-
-
-
Method Detail
-
size
int size()
Size of data set.- Returns:
- Data set size.
-
similarity
double similarity(int i, int j)Get the ith element.- Parameters:
i- Element offsetj- Element offset- Returns:
- Element
-
value
double value(int i)
Get the value of the ith element.- Parameters:
i- Element offset- Returns:
- Value
-
classnum
int classnum(int i)
Get the class number of the ith element.- Parameters:
i- Element offset- Returns:
- Class number
-
swap
void swap(int i, int j)Swap two elements.- Parameters:
i- First positionj- Second position
-
-