PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ partition()

static double* partition ( double *  left,
double *  right,
double  pivot 
)
static

Definition at line 66 of file rt_statistics.c.

References SWAP.

Referenced by quicksort().

66  {
67  while (left <= right) {
68  while (*left < pivot) ++left;
69  while (*right >= pivot) --right;
70 
71  if (left < right) {
72  SWAP(*left, *right);
73  ++left;
74  --right;
75  }
76  }
77 
78  return left;
79 }
#define SWAP(x, y)
Definition: rt_statistics.c:37
static double pivot(double *left, double *right)
Definition: rt_statistics.c:40
Here is the caller graph for this function: