Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::graphs::SpatialTree2d< T > Class Template Reference

Stores sets of objects at specific spatial coordinates in a quad tree. More...

#include <SpatialTree.h>

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. More...
 
void insert (double x, double y, const T &v)
 Insert an element. More...
 

Detailed Description

template<typename T>
class galois::graphs::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

template<typename T >
galois::graphs::SpatialTree2d< T >::SpatialTree2d ( double  xmin = 0.0,
double  ymin = 0.0,
double  xmax = 0.0,
double  ymax = 0.0 
)
inline
template<typename T >
galois::graphs::SpatialTree2d< T >::~SpatialTree2d ( )
inline

Member Function Documentation

template<typename T >
T* galois::graphs::SpatialTree2d< T >::find ( double  x,
double  y 
)
inline

Returns null if tree is empty.

template<typename T >
void galois::graphs::SpatialTree2d< T >::init ( double  xmin,
double  ymin,
double  xmax,
double  ymax 
)
inline
template<typename T >
void galois::graphs::SpatialTree2d< T >::insert ( double  x,
double  y,
const T &  v 
)
inline

Insert an element.

Will always insert and never roll back and thus must be used after failsafe point.


The documentation for this class was generated from the following file: