MCPcopy Index your code
hub / github.com/processing/processing / partition

Method partition

core/src/processing/data/Sort.java:31–40  ·  view source on GitHub ↗
(int left, int right)

Source from the content-addressed store, hash-verified

29
30
31 protected int partition(int left, int right) {
32 int pivot = right;
33 do {
34 while (compare(++left, pivot) < 0) { }
35 while ((right != 0) && (compare(--right, pivot) > 0)) { }
36 swap(left, right);
37 } while (left < right);
38 swap(left, right);
39 return left;
40 }
41
42
43 abstract public int size();

Callers 1

sortMethod · 0.95

Calls 2

compareMethod · 0.95
swapMethod · 0.95

Tested by

no test coverage detected