Package elki.data
Class VectorUtil.SortVectorsBySingleDimension
- java.lang.Object
-
- elki.data.VectorUtil.SortVectorsBySingleDimension
-
- All Implemented Interfaces:
java.util.Comparator<NumberVector>
- Enclosing class:
- VectorUtil
public static class VectorUtil.SortVectorsBySingleDimension extends java.lang.Object implements java.util.Comparator<NumberVector>
Compare number vectors by a single dimension.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private intdDimension to sort with.
-
Constructor Summary
Constructors Constructor Description SortVectorsBySingleDimension()Constructor.SortVectorsBySingleDimension(int dim)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(NumberVector o1, NumberVector o2)intgetDimension()Get the dimension to sort by.voidsetDimension(int d2)Set the dimension to sort by.
-
-
-
Method Detail
-
getDimension
public int getDimension()
Get the dimension to sort by.- Returns:
- Dimension to sort with
-
setDimension
public void setDimension(int d2)
Set the dimension to sort by.- Parameters:
d2- Dimension to sort with
-
compare
public int compare(NumberVector o1, NumberVector o2)
- Specified by:
comparein interfacejava.util.Comparator<NumberVector>
-
-