Class HeapSort
java.lang.Object
dataAnalysis.sorting.HeapSort
- All Implemented Interfaces:
SortAlgorithm
Sorting algorithm for vectors of data.
- Version:
- Date: 24-lug-2003 Time: 14.27.55
- Author:
- Federico Granata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsort(double[] data) Sorts data in a data vector & substitutes it.
-
Constructor Details
-
HeapSort
public HeapSort()
-
-
Method Details
-
sort
public void sort(double[] data) Sorts data in a data vector & substitutes it. NOTE: This algorithm treats the array as 1-indexed (ignores index 0).- Specified by:
sortin interfaceSortAlgorithm- Parameters:
data- the array to sort
-