PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_weighted_distance()

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

Definition at line 1136 of file cu_algorithm.c.

1137 {
1138  double distance = 0.0;
1139  uint32_t i;
1140  for (i = 0; i < npoints; i++)
1141  {
1142  distance += distance3d_pt_pt((POINT3D*)curr, (POINT3D*)&points[i]) * points[i].m;
1143  }
1144 
1145  return distance;
1146 }
double distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2)
Definition: measures3d.c:815
Datum distance(PG_FUNCTION_ARGS)
double m
Definition: liblwgeom.h:355
unsigned int uint32_t
Definition: uthash.h:78

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: