ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor > Class Template Reference

#include <vectorbasedvolumetree.h>

Collaboration diagram for adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >:
Collaboration graph

Classes

struct  SearchPosition
 
struct  SearchState
 

Public Types

typedef std::pair< std::pair< int, int >, VolumeType > IndexedVolumeType
 
typedef std::vector< IndexedVolumeTypeVolumeVector
 

Public Member Functions

 VectorBasedVolumeTree ()
 
VolumeVectorgetLevel (int i)
 
const VolumeVectorgetLevel (int i) const
 
int getOccupancyCount ()
 
const int getOccupancyCount () const
 
void setPreferredBranchingFactor (int f)
 
void insert (const VolumeType &volume)
 
int getLevelCount () const
 
void remove_all_levels ()
 
void compute_all_levels ()
 
void recompute_levels ()
 
void setLevelCount (int count)
 
template<typename MetricFunctor , typename OtherVolumeType , typename OtherFunctorType >
bool compute_min (const VectorBasedVolumeTree< OtherVolumeType, OtherFunctorType > &other, double cutoff, double &result_value, const MetricFunctor &f) const
 

Private Attributes

BoundingFunctor bound_
 
std::vector< VolumeVectorlevels_
 
int branching_factor_
 
bool levels_ok_
 

Detailed Description

template<typename VolumeType, typename BoundingFunctor>
class adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >

A class, which implements a hierarchical volume representation based on st::vector. Template parameter VolumeType: Type of collected data Template parameter BoundingFunctor: Computes bound for a range in a vector of VolumeType: Has to implement "IndexedVolumeType operator()(const VolumeVector& vector,int i0,int i1)const"

Member Typedef Documentation

◆ IndexedVolumeType

template<typename VolumeType , typename BoundingFunctor >
typedef std::pair<std::pair<int,int>,VolumeType> adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::IndexedVolumeType

◆ VolumeVector

template<typename VolumeType , typename BoundingFunctor >
typedef std::vector<IndexedVolumeType> adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::VolumeVector

Constructor & Destructor Documentation

◆ VectorBasedVolumeTree()

template<typename VolumeType , typename BoundingFunctor >
adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::VectorBasedVolumeTree ( )
inline

Member Function Documentation

◆ compute_all_levels()

template<typename VolumeType , typename BoundingFunctor >
void adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::compute_all_levels ( )
inline

computes a maximum number of levels (at most 1000)

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute_min()

template<typename VolumeType , typename BoundingFunctor >
template<typename MetricFunctor , typename OtherVolumeType , typename OtherFunctorType >
bool adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::compute_min ( const VectorBasedVolumeTree< OtherVolumeType, OtherFunctorType > &  other,
double  cutoff,
double &  result_value,
const MetricFunctor &  f 
) const
inline

computes the minimum value of a distance metric specified by MetricFunctor: double operator()(const VolumeType& a,const OtherFolumeType& b)const

Parameters
cutoffmetric values above cutoff are ignored for min computation
result_valueis set, if returns true, to the minimum value
Returns
true, if any value below cutoff appears

◆ getLevel() [1/2]

template<typename VolumeType , typename BoundingFunctor >
VolumeVector& adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::getLevel ( int  i)
inline
Here is the caller graph for this function:

◆ getLevel() [2/2]

template<typename VolumeType , typename BoundingFunctor >
const VolumeVector& adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::getLevel ( int  i) const
inline

◆ getLevelCount()

template<typename VolumeType , typename BoundingFunctor >
int adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::getLevelCount ( ) const
inline
Returns
number of levels after base
Here is the caller graph for this function:

◆ getOccupancyCount() [1/2]

template<typename VolumeType , typename BoundingFunctor >
int adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::getOccupancyCount ( )
inline

returns size of levels[0]

Here is the caller graph for this function:

◆ getOccupancyCount() [2/2]

template<typename VolumeType , typename BoundingFunctor >
const int adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::getOccupancyCount ( ) const
inline

◆ insert()

template<typename VolumeType , typename BoundingFunctor >
void adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::insert ( const VolumeType &  volume)
inline

inserts an occupancy volume in levels_[0]

Here is the caller graph for this function:

◆ recompute_levels()

template<typename VolumeType , typename BoundingFunctor >
void adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::recompute_levels ( )
inline

recomputes all levels, if levels are not ok

Here is the call graph for this function:

◆ remove_all_levels()

template<typename VolumeType , typename BoundingFunctor >
void adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::remove_all_levels ( )
inline

removes bounding volume levels

Here is the caller graph for this function:

◆ setLevelCount()

template<typename VolumeType , typename BoundingFunctor >
void adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::setLevelCount ( int  count)
inline

if the current level-count is higher then count, levels are removed until count is achieved if the current level-count is smaller, additional levels are added, until count is achieved or until highest level contains only one element

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPreferredBranchingFactor()

template<typename VolumeType , typename BoundingFunctor >
void adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::setPreferredBranchingFactor ( int  f)
inline

change branching factor

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ bound_

template<typename VolumeType , typename BoundingFunctor >
BoundingFunctor adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::bound_
private

helps to bound a range

◆ branching_factor_

template<typename VolumeType , typename BoundingFunctor >
int adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::branching_factor_
private

determines how many bounding/occupancy volumes in levels_[i] are bounded by a single bounding volume in levels_[i+1]

◆ levels_

template<typename VolumeType , typename BoundingFunctor >
std::vector<VolumeVector> adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::levels_
private

bounding and occupancy volumes organized as a tree: levels_[0] contains bounding volumes. if levels_[i] contains only a single bounding volume, then index range must include complete base_range and then i is the highest level.

◆ levels_ok_

template<typename VolumeType , typename BoundingFunctor >
bool adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::levels_ok_
private

determines whether levels above 0 have to be recomputed


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