PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ uniq()

static int uniq ( double *  vals,
int  nvals 
)
static

Definition at line 1099 of file lwlinearreferencing.c.

1100 {
1101  int i, last = 0;
1102  for (i = 1; i < nvals; ++i)
1103  {
1104  // lwnotice("(I%d):%g", i, vals[i]);
1105  if (vals[i] != vals[last])
1106  {
1107  vals[++last] = vals[i];
1108  // lwnotice("(O%d):%g", last, vals[last]);
1109  }
1110  }
1111  return last + 1;
1112 }

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

Here is the caller graph for this function: