The Cuik KD-Tree Library
rectangle.c File Reference Implementation of the functions operating on Trectangle. More... #include "rectangle.h" #include "random.h" #include "definitions.h" #include <string.h> #include <stdlib.h> #include <math.h> #include <assert.h>
Include dependency graph for rectangle.c:
Go to the source code of this file.
Detailed DescriptionImplementation of the functions operating on Trectangle.
Definition in file rectangle.c. Function Documentation
Creates a new rectangle with the given parameters.
Definition at line 20 of file rectangle.c. References Trectangle::l, Trectangle::n, NEWZ, and Trectangle::u. Referenced by main().
Here is the caller graph for this function:
Creates a new rectangle with punctual intervals from a given vector.
Definition at line 35 of file rectangle.c. References Trectangle::l, Trectangle::n, NEW, and Trectangle::u. Referenced by AddPoint2KDtree(), and BuildKDTree().
Here is the caller graph for this function:
Returns the number of ranges defining the rectangle.
Definition at line 47 of file rectangle.c. References Trectangle::n. Referenced by InitKDTree().
Here is the caller graph for this function:
Expands a rectangle so that it includes a given point.
Definition at line 52 of file rectangle.c. References Trectangle::l, Trectangle::n, and Trectangle::u. Referenced by AddPoint2KDtree(), and BuildKDTree().
Here is the caller graph for this function:
Adds a border to a box, but without scaping a given limits
Definition at line 68 of file rectangle.c. References Trectangle::l, Trectangle::n, and Trectangle::u. Referenced by AddPoint2KDtree(), and BuildKDTree().
Here is the caller graph for this function:
Copies one rectangle into another.
Definition at line 91 of file rectangle.c. References Trectangle::l, Trectangle::n, NEW, and Trectangle::u. Referenced by AddPoint2KDtree(), and BuildKDTree().
Here is the caller graph for this function:
Gets the lower limit along a given dimension.
Definition at line 101 of file rectangle.c. References Trectangle::l.
Gets the upper limit along a given dimension.
Definition at line 108 of file rectangle.c. References Trectangle::u.
Gets the lower and upper limit of a rectangle along a given dimension.
Definition at line 115 of file rectangle.c. References Trectangle::l, and Trectangle::u. Referenced by BuildKDTree(), and InitKDTree().
Here is the caller graph for this function:
Set the lower limit along a given dimension.
Definition at line 123 of file rectangle.c. References Trectangle::l. Referenced by BuildKDTree(), and main().
Here is the caller graph for this function:
Set the upper limit along a given dimension.
Definition at line 130 of file rectangle.c. References Trectangle::u. Referenced by BuildKDTree(), and main().
Here is the caller graph for this function:
Changes the lower and the upper limit along a given dimension.
Definition at line 137 of file rectangle.c. References Trectangle::l, and Trectangle::u. Referenced by BuildKDTree(), and InitKDTree().
Here is the caller graph for this function:
Computes a random point along the selected dimensions.
Definition at line 145 of file rectangle.c. References Trectangle::l, Trectangle::n, randomDouble(), and Trectangle::u. Referenced by main(), and SampleInKDtree().
Here is the call graph for this function:
Here is the caller graph for this function:
Squared distance of a value to the interval defining a rectangle along a given dimension.
Definition at line 153 of file rectangle.c. References ANGLE_ACCURACY, Trectangle::l, M_2PI, M_PI, PI2PI, TOPOLOGY_R, and Trectangle::u. Referenced by SearchInBallKDtree(), and SearchKDtree().
Here is the caller graph for this function:
Computes the minimum squared distance from a point to a rectangle but considering a possible special topology for the input rectangle and the input point.
Definition at line 230 of file rectangle.c. References ANGLE_ACCURACY, Trectangle::l, M_2PI, M_PI, Trectangle::n, PI2PI, TOPOLOGY_R, and Trectangle::u. Referenced by SearchInBallKDtree(), and SearchKDtree().
Here is the caller graph for this function:
Computes the rectangle dimension for which it is better to split the rectangle. Right now this function is an alias to GetRectangleMaxDim.
Definition at line 344 of file rectangle.c. References Trectangle::l, Trectangle::n, and Trectangle::u. Referenced by BuildKDTree().
Here is the caller graph for this function:
Prints a rectangle. Used for debug.
Definition at line 365 of file rectangle.c. References Trectangle::l, Trectangle::n, and Trectangle::u. Referenced by PrintKDtree().
Here is the caller graph for this function:
Deletes a previously generated rectangle.
Definition at line 375 of file rectangle.c. References Trectangle::l. Referenced by DeleteKDtree(), and main().
Here is the caller graph for this function:
|
Follow us!