PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ test_weighted_distance()

static double test_weighted_distance ( const POINT4D curr,
const POINT4D points,
uint32_t  npoints 
)
static

Definition at line 1395 of file cu_algorithm.c.

1396 {
1397  double distance = 0.0;
1398  uint32_t i;
1399  for (i = 0; i < npoints; i++)
1400  {
1401  distance += distance3d_pt_pt((POINT3D*)curr, (POINT3D*)&points[i]) * points[i].m;
1402  }
1403 
1404  return distance;
1405 }
double distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2)
Definition: measures3d.c:1029
static double distance(double x1, double y1, double x2, double y2)
Definition: lwtree.c:1032
double m
Definition: liblwgeom.h:414

References distance(), distance3d_pt_pt(), and POINT4D::m.

Referenced by do_median_test().

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