Definition at line 38 of file MaxHeap.java.
Public Methods | |
MaxHeap () | |
Creates an empty MaxHeap. | |
MaxHeap (Comparator c) | |
Use given Comparator for all comparisons between elements in this MaxHeap. | |
MaxHeap (int capacity) | |
Creates an empty MaxHeap with the given capacity. | |
MaxHeap (Collection c) | |
Create a new MaxHeap containing the elements of the given Collection. | |
Object | deleteMax () |
Delete the largest element of this MaxHeap. | |
Protected Methods | |
int | cmp (int node1, int node2) |
Compare two Objects in this heap - wrapper around compareTo/Comparator.compare. |
|
Use given Comparator for all comparisons between elements in this MaxHeap. Otherwise rely on compareTo methods and Comparable Objects. Definition at line 53 of file MaxHeap.java. |