Galois::Graph::SpatialTree2d< T > Class Template Reference
Stores sets of objects at specific spatial coordinates in a quad tree.
More...
#include <SpatialTree.h>
List of all members.
Classes |
struct | Box2d |
struct | Node |
Public Member Functions |
| SpatialTree2d (double xmin=0.0, double ymin=0.0, double xmax=0.0, double ymax=0.0) |
| ~SpatialTree2d () |
void | init (double xmin, double ymin, double xmax, double ymax) |
T * | find (double x, double y) |
| Returns null if tree is empty.
|
void | insert (double x, double y, const T &v) |
| Insert an element.
|
Private Member Functions |
bool | closer (double x, double y, double testx, double testy, double oldx, double oldy) const |
T * | recfind (Node *n, double x, double y) |
void | recinsert (Node **pos, Box2d b, Node *node) |
Node * | mkNode (const T &v, double x, double y) |
void | delNode (Node *n) |
void | freeTree (Node *n) |
Private Attributes |
Galois::Runtime::MM::FSBGaloisAllocator
< Node > | nodeAlloc |
Node * | root |
Box2d | bounds |
Detailed Description
template<typename T>
class Galois::Graph::SpatialTree2d< T >
Stores sets of objects at specific spatial coordinates in a quad tree.
Lookup returns an approximation of the closest item
Constructor & Destructor Documentation
Member Function Documentation
template<typename T >
bool Galois::Graph::SpatialTree2d< T >::closer |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
testx, |
|
|
double |
testy, |
|
|
double |
oldx, |
|
|
double |
oldy | |
|
) |
| | const [inline, private] |
Returns null if tree is empty.
Insert an element.
Will always insert and never roll back and thus must be used after failsafe point.
Member Data Documentation
The documentation for this class was generated from the following file: