The Cuik KD-Tree Library
Definition of constants and macros used in several parts of the library. More... #include <stdlib.h> #include <math.h>
Include dependency graph for definitions.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Detailed DescriptionDefinition of constants and macros used in several parts of the cuik-kdtree library. Definition in file definitions.h. Macro Definition Documentation
An approximation of Pi Definition at line 24 of file definitions.h. Referenced by InitKDTree(), main(), SquaredDistanceToRectangle(), SquaredDistanceToRectangleDimension(), and VectorSquaredDistanceTopologyMin().
Two times Pi. Definition at line 32 of file definitions.h. Referenced by SquaredDistanceToRectangle(), and SquaredDistanceToRectangleDimension().
Two angular values are the same if they are closer than this value. Definition at line 44 of file definitions.h. Referenced by InitKDTree(), SquaredDistanceToRectangle(), and SquaredDistanceToRectangleDimension().
Swaps two values using an intermediate storage.
Definition at line 60 of file definitions.h. Referenced by BuildKDTree().
Forces an angle go be in [-pi,pi]. This is intended to be used with a variable as a parameter (using an expression would be ineficient).
Definition at line 75 of file definitions.h. Referenced by SquaredDistanceToRectangle(), SquaredDistanceToRectangleDimension(), and VectorSquaredDistanceTopologyMin().
Value:
{(_var)=(_type *)malloc(sizeof(_type)*(_n)); \
if (!(_var)) exit(EXIT_FAILURE);}
Allocates memory space for _n elements of type _type and assigns the pointer to _var. If the memory can not be allocated, stops the execution. Definition at line 87 of file definitions.h. Referenced by AddPoint2KDtree(), BuildKDTree(), CopyRectangle(), InitRectangleFromPoint(), main(), and NeighboursInBall().
Value:
{(_var)=(_type *)calloc(_n,sizeof(_type)); \
if (!(_var)) exit(EXIT_FAILURE);}
Allocates memory space for _n elements of type _type and assigns the pointer to _var. If the memory can not be allocated, stops the execution. The allocated memory is set to 0. Definition at line 98 of file definitions.h. Referenced by InitRectangle().
Value:
{(_var)=(_type *)realloc((void *)(_var),sizeof(_type)*(_n)); \
if (!(_var)) exit(EXIT_FAILURE);}
Expands a previously reserved memory space so that it can accomodate _n elements of type _type assigns the pointer to _var. The previously allocated space is pointed by _var. If the memory can not be expanded, stops the execution. Definition at line 110 of file definitions.h.
Dublicates a previously reserved memory space that accomodates _n elements of type _type. After the duplication, the pointer _var takes to a memory space that can accomodate 2*_n elements and the value of variable _n is also doubled. Definition at line 123 of file definitions.h. Referenced by main(), and SearchInBallKDtree().
Used to denote an identifier that has not been initialized. Definition at line 133 of file definitions.h. Referenced by BuildKDTree(), and NearestNeighbour().
Infinite (a large possitive number). Definition at line 141 of file definitions.h. Referenced by AddPoint2KDtree(), BuildKDTree(), main(), and NearestNeighbour().
The range of the variables is defined over the reals. Definition at line 180 of file definitions.h. Referenced by main(), SquaredDistanceToRectangle(), and SquaredDistanceToRectangleDimension().
The range of the variables is defined over a circle. Definition at line 188 of file definitions.h. Referenced by InitKDTree(), main(), and VectorSquaredDistanceTopologyMin(). Typedef Documentation
Type with two possible values: TRUE,FALSE. Definition at line 152 of file definitions.h. |
Follow us!