TBTK
TBTK::StateTreeNode Class Reference

#include <StateTreeNode.h>

Public Member Functions

 StateTreeNode (std::initializer_list< double > center, double halfSize, int maxDepth=10)
 
 StateTreeNode (std::vector< double > center, double halfSize, int maxDepth=10)
 
 StateTreeNode (const StateSet &stateSet, int maxDepth=10, double centerShiftMultiplier=3.14)
 
 ~StateTreeNode ()
 
void add (AbstractState *state)
 
std::vector< const AbstractState * > * getOverlappingStates (std::initializer_list< double > coordinates, double extent) const
 
std::vector< const AbstractState * > * getOverlappingStates (std::vector< double > coordinates, double extent) const
 
const std::vector< double > & getCoordinates () const
 
double getRadius () const
 

Detailed Description

The StateTreeNode is a node in a tree that contains pointers to AbstractStates. In particular, the StateTreeNode is constructed to allow for quick access of all States with a spatial overlap with a specified region. States with infinite extent overlaps with every region. The tree is not a container of the States themselves and only serves the purpose of allowing for quick access of states. As such, its destructor does not delete the states.

Constructor & Destructor Documentation

◆ StateTreeNode() [1/3]

TBTK::StateTreeNode::StateTreeNode ( std::initializer_list< double >  center,
double  halfSize,
int  maxDepth = 10 
)

Constructor.

◆ StateTreeNode() [2/3]

TBTK::StateTreeNode::StateTreeNode ( std::vector< double >  center,
double  halfSize,
int  maxDepth = 10 
)

Constructor.

◆ StateTreeNode() [3/3]

TBTK::StateTreeNode::StateTreeNode ( const StateSet stateSet,
int  maxDepth = 10,
double  centerShiftMultiplier = 3.14 
)

Constructor.

◆ ~StateTreeNode()

TBTK::StateTreeNode::~StateTreeNode ( )

Destructor.

Member Function Documentation

◆ add()

void TBTK::StateTreeNode::add ( AbstractState state)

Add state. Does not assume ownership of the state.

◆ getCoordinates()

const std::vector<double>& TBTK::StateTreeNode::getCoordinates ( ) const

Get center coorindates.

◆ getOverlappingStates() [1/2]

std::vector<const AbstractState*>* TBTK::StateTreeNode::getOverlappingStates ( std::initializer_list< double >  coordinates,
double  extent 
) const

Get all state that have a finite overlap with the region centered at 'coordinates', and with extent 'extent'.

◆ getOverlappingStates() [2/2]

std::vector<const AbstractState*>* TBTK::StateTreeNode::getOverlappingStates ( std::vector< double >  coordinates,
double  extent 
) const

Get all state that have a finite overlap with the region centered at 'coordinates', and with extent 'extent'.

◆ getRadius()

double TBTK::StateTreeNode::getRadius ( ) const

Get radius.


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