|
GLAMERDOC++
Gravitational Lensing Code Library
|
Class for calculating the Hilbert curve distance in two dimensions. More...
#include <utilities_slsim.h>
Public Member Functions | |
| HilbertCurve (PosType x_min, PosType y_min, PosType my_range, PosType smallsize) | |
| int | xy2d (int x, int y) |
| convert (x,y) to d | |
| int | xy2d (PosType x, PosType y) |
| convert (x,y) to d | |
| void | d2xy (int d, int *x, int *y) |
| convert d to (x,y) | |
| void | d2xy (int d, PosType *x, PosType *y) |
| convert d to (x,y) | |
Class for calculating the Hilbert curve distance in two dimensions.
The Hilbert Curve maps two dimensional positions on a grid into distance in one dimension. The distance d is generally close for points that are near eachother. This allows one to uniquely order points in a two dimensional space. It is useful for matching objects quickly if they are sorted by thier Hilbert distance.
|
inline |
| x_min | x coordinate of lower left corner |
| y_min | y coordinate of lower left corner |
| my_range | range in which points will be distributed |
| smallsize | smallest distance of separation that must give unique Hilbert distances |