NAME

get_distance_to_hull - Determines the distance of a point to hull

SYNOPSIS

#include "h/h_misc.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int get_distance_to_hull
(
	const Hull *hp,
	const Vector *test_vp,
	double *distance_ptr
);

DESCRIPTION

This function computes the distance of a point to a hull boundary. If the point is outside the hull, the distance is positive, and if it is inside the hull, the distance is negative. The first argument "hp" is the address of the convex hull The second argument "test_vp" contains the address of a the query location. The argument distance_ptr is a pointer to the distance to be computed.

RETURNS

NO_ERROR on success, and ERROR on failure with an error message being set.

WARNING

This routine is computationally expensive, and currently not all that exact either (likely due to bugs)!

RELATED

Hull, get_interior_distance_to_hull

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Kobus Barnard

DOCUMENTER

Kobus Barnard

SEE ALSO

get_interior_distance_to_hull , expand_hull , get_approximate_error_hull_data , trim_2D_hull