PostGIS  2.5.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 1119 of file cu_algorithm.c.

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

Referenced by do_median_test().

1120 {
1121  double distance = 0.0;
1122  uint32_t i;
1123  for (i = 0; i < npoints; i++)
1124  {
1125  distance += distance3d_pt_pt((POINT3D*)curr, (POINT3D*)&points[i]) * points[i].m;
1126  }
1127 
1128  return distance;
1129 }
double m
Definition: liblwgeom.h:354
unsigned int uint32_t
Definition: uthash.h:78
Datum distance(PG_FUNCTION_ARGS)
double distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2)
Definition: measures3d.c:792
Here is the call graph for this function:
Here is the caller graph for this function: