PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ partition()

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

Definition at line 66 of file rt_statistics.c.

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

References pivot(), and SWAP.

Referenced by quicksort().

Here is the call graph for this function:
Here is the caller graph for this function: