#include <vectorbasedvolumetree.h>
Classes | |
struct | SearchPosition |
struct | SearchState |
Public Types | |
typedef std::pair< std::pair< int, int >, VolumeType > | IndexedVolumeType |
typedef std::vector< IndexedVolumeType > | VolumeVector |
Public Member Functions | |
VectorBasedVolumeTree () | |
VolumeVector & | getLevel (int i) |
const VolumeVector & | getLevel (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< VolumeVector > | levels_ |
int | branching_factor_ |
bool | levels_ok_ |
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"
typedef std::pair<std::pair<int,int>,VolumeType> adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::IndexedVolumeType |
typedef std::vector<IndexedVolumeType> adore::mad::VectorBasedVolumeTree< VolumeType, BoundingFunctor >::VolumeVector |
|
inline |
|
inline |
computes a maximum number of levels (at most 1000)
|
inline |
computes the minimum value of a distance metric specified by MetricFunctor: double operator()(const VolumeType& a,const OtherFolumeType& b)const
cutoff | metric values above cutoff are ignored for min computation |
result_value | is set, if returns true, to the minimum value |
|
inline |
|
inline |
|
inline |
|
inline |
returns size of levels[0]
|
inline |
|
inline |
inserts an occupancy volume in levels_[0]
|
inline |
recomputes all levels, if levels are not ok
|
inline |
removes bounding volume levels
|
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
|
inline |
change branching factor
|
private |
helps to bound a range
|
private |
determines how many bounding/occupancy volumes in levels_[i] are bounded by a single bounding volume in levels_[i+1]
|
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.
|
private |
determines whether levels above 0 have to be recomputed