MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / quickSort

Function quickSort

Algorithms/redcap.cpp:98–111  ·  view source on GitHub ↗

The main function that implements QuickSort arr[] --> Array to be sorted, low --> Starting index, high --> Ending index */

Source from the content-addressed store, hash-verified

96low --> Starting index,
97high --> Ending index */
98void quickSort(std::vector<Edge*>& arr, int low, int high)
99{
100 if (low < high)
101 {
102 /* pi is partitioning index, arr[p] is now
103 at right place */
104 int pi = partition(arr, low, high);
105
106 // Separately sort elements before
107 // partition and after partition
108 quickSort(arr, low, pi - 1);
109 quickSort(arr, pi + 1, high);
110 }
111}
112
113/////////////////////////////////////////////////////////////////////////
114//

Callers 1

ClusteringMethod · 0.85

Calls 1

partitionFunction · 0.85

Tested by

no test coverage detected