PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ uniq()

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

Definition at line 1026 of file lwlinearreferencing.c.

1027 {
1028  int i, last=0;
1029  for (i=1; i<nvals; ++i)
1030  {
1031  // lwnotice("(I%d):%g", i, vals[i]);
1032  if ( vals[i] != vals[last] )
1033  {
1034  vals[++last] = vals[i];
1035  // lwnotice("(O%d):%g", last, vals[last]);
1036  }
1037  }
1038  return last+1;
1039 }

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

Here is the caller graph for this function: