PostGIS  2.1.10dev-r@@SVN_REVISION@@
static double* partition ( double *  left,
double *  right,
double  pivot 
)
static

Definition at line 168 of file rt_api.c.

References SWAP.

Referenced by quicksort().

168  {
169  while (left <= right) {
170  while (*left < pivot) ++left;
171  while (*right >= pivot) --right;
172 
173  if (left < right) {
174  SWAP(*left, *right);
175  ++left;
176  --right;
177  }
178  }
179 
180  return left;
181 }
#define SWAP(x, y)
Definition: rt_api.c:139
static double pivot(double *left, double *right)
Definition: rt_api.c:142

Here is the caller graph for this function: