Searched refs:pivot (Results 1 - 11 of 11) sorted by relevance

/openjdk7/jdk/src/share/classes/com/sun/tools/hat/internal/util/
H A DArraySorter.java95 Object pivot = arr[from]; // Simple-minded, but reasonable
101 // arr[i] <= pivot for all i < low
102 // arr[i] > pivot for all i > high
106 int cmp = c.compare(arr[low], pivot);
107 if (cmp <= 0) { // arr[low] <= pivot
115 // arr[high] > pivot:
116 c2 = c.compare(arr[high], pivot);
141 // pivot == pivot, so ensure algorithm terminates
H A DVectorSorter.java96 Object pivot = v.elementAt(from);
103 // v[i] <= pivot for all i < low
104 // v[i] > pivot for all i > high
108 int cmp = c.compare(v.elementAt(low), pivot);
109 if (cmp <= 0) { // v[low] <= pivot
117 c2 = c.compare(v.elementAt(high), pivot);
118 // v[high] > pivot:
142 // pivot == pivot, so ensure algorithm terminates
/openjdk7/hotspot/src/share/vm/utilities/
H A DquickSort.hpp42 // As pivot we use the median of the first, last and middle elements.
44 // means that this method not only returns the index of the pivot
65 // of the fist, last and middle values. Use this as pivot.
70 static int partition(T* array, int pivot, int length, C comparator) { argument
73 T pivot_val = array[pivot];
101 int pivot = find_pivot(array, length, comparator); local
103 // arrays up to length 3 will be sorted after finding the pivot
106 int split = partition<T, C, idempotent>(array, pivot, length, comparator);
/openjdk7/jaxp/src/com/sun/org/apache/xml/internal/utils/
H A DNodeVector.java671 * Pick a pivot and move it out of the way
673 int pivot = a[(lo + hi) / 2];
676 a[hi] = pivot;
683 * is greater than the pivot or lo >= hi
685 while (a[lo] <= pivot && lo < hi)
692 * is less than the pivot, or lo >= hi
694 while (pivot <= a[hi] && lo < hi)
721 a[hi] = pivot;
725 * equal to pivot, elements a[hi+1] to a[hi0] are greater than
726 * pivot
[all...]
/openjdk7/jdk/src/share/classes/javax/swing/
H A DSizeSequence.java297 int pivot = a[m];
298 if (position < pivot) {
302 return getIndex(m + 1, to, position - pivot);
/openjdk7/jdk/src/share/classes/java/util/
H A DDualPivotQuicksort.java33 * faster than traditional (one-pivot) Quicksort implementations.
272 * pivot selection as described below. The choice for spacing
324 * Skip elements, which are less or greater than pivot values.
391 * swap internal pivot values to ends.
395 * Skip elements, which are equal to pivot values.
461 } else { // Partitioning with one pivot
463 * Use the third of the five sorted elements as pivot.
466 int pivot = a[e3];
474 * | < pivot | == pivot |
[all...]
H A DComparableTimSort.java219 Comparable<Object> pivot = (Comparable) a[start];
221 // Set left (and right) to the index where a[start] (pivot) belongs
227 * pivot >= all in [lo, left).
228 * pivot < all in [right, start).
232 if (pivot.compareTo(a[mid]) < 0)
240 * The invariants still hold: pivot >= all in [lo, left) and
241 * pivot < all in [left, start), so pivot belongs at left. Note
242 * that if there are elements equal to pivot, left points to the
244 * Slide elements over to make room for pivot
[all...]
H A DTimSort.java252 T pivot = a[start];
254 // Set left (and right) to the index where a[start] (pivot) belongs
260 * pivot >= all in [lo, left).
261 * pivot < all in [right, start).
265 if (c.compare(pivot, a[mid]) < 0)
273 * The invariants still hold: pivot >= all in [lo, left) and
274 * pivot < all in [left, start), so pivot belongs at left. Note
275 * that if there are elements equal to pivot, left points to the
277 * Slide elements over to make room for pivot
[all...]
/openjdk7/jdk/src/share/classes/sun/tools/asm/
H A DConstantPool.java150 String pivot = ss[left];
154 while (l <= right && ss[l].compareTo(pivot) <= 0)
156 while (r >= left && ss[r].compareTo(pivot) > 0)
/openjdk7/jdk/src/share/classes/com/sun/crypto/provider/
H A DAESCrypt.java242 byte pivot, tmp;
245 pivot = AA[i][i];
246 if (pivot == 0) {
260 pivot = AA[i][i];
266 alog[(255 + log[AA[i][j] & 0xFF] - log[pivot & 0xFF])
/openjdk7/langtools/src/share/classes/com/sun/tools/javac/jvm/
H A DGen.java1257 int pivot = keys[(i+j)/2];
1259 while (keys[i] < pivot) i++;
1260 while (pivot < keys[j]) j--;

Completed in 54 milliseconds