Package gnu.kawa.util

Class HeapSort<T,​C>

  • Direct Known Subclasses:
    HeapSort.IndexSort

    public abstract class HeapSort<T,​C>
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  HeapSort.IndexSort
      Sort an error of integer indexes based on a lookup object.
    • Constructor Summary

      Constructors 
      Constructor Description
      HeapSort()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract int compare​(T a, int i, int j, C comparator)  
      void heapSort​(T a, int count, C comparator)  
      protected abstract void swap​(T a, int i, int j)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HeapSort

        public HeapSort()
    • Method Detail

      • heapSort

        public void heapSort​(T a,
                             int count,
                             C comparator)
      • swap

        protected abstract void swap​(T a,
                                     int i,
                                     int j)
      • compare

        protected abstract int compare​(T a,
                                       int i,
                                       int j,
                                       C comparator)