NuTo
Numerics Tool
Classes | Public Member Functions | List of all members
SubBoxes< T > Class Template Reference

container that performs O(1) addition and O(1) lookup based on subboxes. More...

Classes

struct  Domain
 

Public Member Functions

 SubBoxes (Domain d)
 
void Add (T t)
 adds a T to the container More...
 
boost::optional< T > FindAt (Eigen::Vector3d coords)
 returns some entry at coords within a search radius (provided by the domain) More...
 

Detailed Description

template<typename T>
class SubBoxes< T >

container that performs O(1) addition and O(1) lookup based on subboxes.

These subboxes divide the domain with a given number of subdivisions.

Template Parameters
Tvalue type of the container that provides coordinate access double operator[](int dim)

Constructor & Destructor Documentation

template<typename T >
SubBoxes< T >::SubBoxes ( Domain  d)
inline

Member Function Documentation

template<typename T >
void SubBoxes< T >::Add ( t)
inline

adds a T to the container

template<typename T >
boost::optional<T> SubBoxes< T >::FindAt ( Eigen::Vector3d  coords)
inline

returns some entry at coords within a search radius (provided by the domain)

Remarks
This is one of the reasons why this class should not be public. This behavior is very specific to the algorithm below that only adds a T if nothing is found within the search radius.
Parameters
coordsquery point
Returns
pointer to T if something is found, nullptr otherwise

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