determine the unnormalized variance of objects' distance from a given point
#include <suplib/imagefcts.h>double wtvar( double x, void *objs, unsigned long n_obj, double tot_wt, size_t s_obj, double (*get_x)(const void *obj,double *x) );
double x
- x coordinate of point from which to determine distance
void *objs
- pointer to list of objects to process
unsigned long n_obj
- number of objects in list
double tot_wt
- if non-zero, indicates that objects are weighted
size_t s_obj
- size of an object, in bytes
double (*get_x)(const void *obj,double *x)
- pointer to function which returns the coordinates of an object as well as its weight
wtvar
determines the unnormalized variance (from zero) of
objects' distance from a given point. It requires a user supplied
function which extracts an object's position.
It returns the variance.