Package elki.data
Class VectorUtil.SortDBIDsBySingleDimension
- java.lang.Object
-
- elki.data.VectorUtil.SortDBIDsBySingleDimension
-
- All Implemented Interfaces:
java.util.Comparator<DBIDRef>
- Direct Known Subclasses:
MinimalisticMemoryKDTree.CountSortAccesses
- Enclosing class:
- VectorUtil
public static class VectorUtil.SortDBIDsBySingleDimension extends java.lang.Object implements java.util.Comparator<DBIDRef>
Compare number vectors by a single dimension.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private intdDimension to sort with.private Relation<? extends NumberVector>dataThe relation to sort.
-
Constructor Summary
Constructors Constructor Description SortDBIDsBySingleDimension(Relation<? extends NumberVector> data)Constructor.SortDBIDsBySingleDimension(Relation<? extends NumberVector> data, int dim)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(DBIDRef id1, DBIDRef id2)intgetDimension()Get the dimension to sort by.voidsetDimension(int d2)Set the dimension to sort by.
-
-
-
Field Detail
-
d
private int d
Dimension to sort with.
-
data
private Relation<? extends NumberVector> data
The relation to sort.
-
-
Constructor Detail
-
SortDBIDsBySingleDimension
public SortDBIDsBySingleDimension(Relation<? extends NumberVector> data, int dim)
Constructor.- Parameters:
data- Vector data sourcedim- Dimension to sort by
-
SortDBIDsBySingleDimension
public SortDBIDsBySingleDimension(Relation<? extends NumberVector> data)
Constructor.- Parameters:
data- Vector data source
-
-