Documentation of 'smile.sort.HeapSort' Java class
HeapSort
smile.sort

Class HeapSort



  • public class HeapSort
    extends java.lang.Object
    Heapsort is a comparison-based sorting algorithm, and is part of the selection sort family. Although somewhat slower in practice on most machines than a good implementation of quicksort, it has the advantage of a worst-case O(n log n) runtime. In fact, its worst case is only 20% or so worse than its average running time. Heapsort is an in-place algorithm, but is not a stable sort.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void sort(double[] arr)
      Sorts the specified array into ascending numerical order.
      static void sort(float[] arr)
      Sorts the specified array into ascending numerical order.
      static void sort(int[] arr)
      Sorts the specified array into ascending numerical order.
      static <T extends java.lang.Comparable<? super T>>
      void
      sort(T[] arr)
      Sorts the specified array into ascending order.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sort

        public static void sort(int[] arr)
        Sorts the specified array into ascending numerical order.
      • sort

        public static void sort(float[] arr)
        Sorts the specified array into ascending numerical order.
      • sort

        public static void sort(double[] arr)
        Sorts the specified array into ascending numerical order.
      • sort

        public static <T extends java.lang.Comparable<? super T>> void sort(T[] arr)
        Sorts the specified array into ascending order.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.