ConcentricShells< Item, Point > Class Template Reference
#include <ConcentricShells.h>
List of all members.
|
Public Member Functions |
| void | add (const Point ¢er, Item *item) |
| void | reassignTo (const Point ¢er, ConcentricShells &other, const Point &othercenter) |
| std::pair< Item *, double > | findClosest (const Point ¢er, const Point &q, double r2) const |
| std::pair< Item *, double > | findPoint (const Point ¢er, const Point &q, double r2) const |
| bool | empty () const |
| Item * | getFarItem () const |
Classes |
| struct | Annulus |
Detailed Description
template<class Item, class Point>
class ConcentricShells< Item, Point >
This class stores (pointers to) items in concentric shells of geometric radii around a given point.
The items must have a toPoint() function.
Given that the intended purpose is for storing uninserted points in SVR, we have several functions here to support that use.
Most transparently, the shells would remember their own center point. However, this is shared among all the shells of a point, which is wasteful memory-wise, so we pass that in to all calls.
Member Function Documentation
|
template<class Item, class Point> |
| void ConcentricShells< Item, Point >::add |
( |
const Point & |
center, |
|
|
Item * |
item |
|
) |
[inline] |
|
|
template<class Item, class Point> |
| bool ConcentricShells< Item, Point >::empty |
( |
|
) |
const [inline] |
|
|
template<class Item, class Point> |
| std::pair<Item*, double> ConcentricShells< Item, Point >::findClosest |
( |
const Point & |
center, |
|
|
const Point & |
q, |
|
|
double |
r2 |
|
) |
const [inline] |
|
|
template<class Item, class Point> |
| std::pair<Item*, double> ConcentricShells< Item, Point >::findPoint |
( |
const Point & |
center, |
|
|
const Point & |
q, |
|
|
double |
r2 |
|
) |
const [inline] |
|
|
template<class Item, class Point> |
| Item* ConcentricShells< Item, Point >::getFarItem |
( |
|
) |
const [inline] |
|
|
template<class Item, class Point> |
| void ConcentricShells< Item, Point >::reassignTo |
( |
const Point & |
center, |
|
|
ConcentricShells< Item, Point > & |
other, |
|
|
const Point & |
othercenter |
|
) |
[inline] |
|
The documentation for this class was generated from the following file:
Generated on Thu Mar 27 19:04:15 2008 by
1.4.6