Package elki.svm.data
Class SimilarityQueryAdapter
- java.lang.Object
-
- elki.svm.data.SimilarityQueryAdapter
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DBIDArrayIter
i1
Iterators to offset into the ids.(package private) DBIDArrayIter
i2
Iterators to offset into the ids.(package private) ArrayModifiableDBIDs
ids
Object ids to process.(package private) SimilarityQuery<?>
sim
Similarity query
-
Constructor Summary
Constructors Constructor Description SimilarityQueryAdapter(SimilarityQuery<?> sim, DBIDs ids)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
classnum(int i)
Get the class number of the ith element.DBIDArrayIter
iter()
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.
-
-
-
Field Detail
-
sim
SimilarityQuery<?> sim
Similarity query
-
ids
ArrayModifiableDBIDs ids
Object ids to process.
-
i1
DBIDArrayIter i1
Iterators to offset into the ids.
-
i2
DBIDArrayIter i2
Iterators to offset into the ids.
-
-
Constructor Detail
-
SimilarityQueryAdapter
public SimilarityQueryAdapter(SimilarityQuery<?> sim, DBIDs ids)
-
-
Method Detail
-
size
public int size()
Description copied from interface:DataSet
Size of data set.
-
similarity
public double similarity(int i, int j)
Description copied from interface:DataSet
Get the ith element.- Specified by:
similarity
in interfaceDataSet
- Parameters:
i
- Element offsetj
- Element offset- Returns:
- Element
-
value
public double value(int i)
Description copied from interface:DataSet
Get the value of the ith element.
-
classnum
public int classnum(int i)
Description copied from interface:DataSet
Get the class number of the ith element.
-
swap
public void swap(int i, int j)
Description copied from interface:DataSet
Swap two elements.
-
iter
public DBIDArrayIter iter()
-
-