PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ uniq()

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

Definition at line 1087 of file lwlinearreferencing.c.

1088 {
1089  int i, last = 0;
1090  for (i = 1; i < nvals; ++i)
1091  {
1092  // lwnotice("(I%d):%g", i, vals[i]);
1093  if (vals[i] != vals[last])
1094  {
1095  vals[++last] = vals[i];
1096  // lwnotice("(O%d):%g", last, vals[last]);
1097  }
1098  }
1099  return last + 1;
1100 }

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

Here is the caller graph for this function: