PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ test_weighted_distance()

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

Definition at line 1370 of file cu_algorithm.c.

1371 {
1372  double distance = 0.0;
1373  uint32_t i;
1374  for (i = 0; i < npoints; i++)
1375  {
1376  distance += distance3d_pt_pt((POINT3D*)curr, (POINT3D*)&points[i]) * points[i].m;
1377  }
1378 
1379  return distance;
1380 }
double distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2)
Definition: measures3d.c:1032
static double distance(double x1, double y1, double x2, double y2)
Definition: lwtree.c:1032
double m
Definition: liblwgeom.h:400

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: