Package elki.svm.data
Interface DataSet
-
- All Known Implementing Classes:
ByteWeightedArrayDataSet
,DoubleWeightedDataSet
,SimilarityQueryAdapter
public interface DataSet
API 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 int
classnum(int i)
Get the class number of the ith element.double
similarity(int i, int j)
Get the ith element.int
size()
Size of data set.void
swap(int i, int j)
Swap two elements.double
value(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
-
-