Package elki.data

Class 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 int d
      Dimension to sort with.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(NumberVector o1, NumberVector o2)  
      int getDimension()
      Get the dimension to sort by.
      void setDimension​(int d2)
      Set the dimension to sort by.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Field Detail

      • d

        private int d
        Dimension to sort with.
    • Constructor Detail

      • SortVectorsBySingleDimension

        public SortVectorsBySingleDimension​(int dim)
        Constructor.
        Parameters:
        dim - Dimension to sort by.
      • SortVectorsBySingleDimension

        public SortVectorsBySingleDimension()
        Constructor.
    • 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