Classes | Public Types | Public Member Functions | Private Attributes | List of all members
mcap::internal::IntervalTree< Scalar, Value > Class Template Reference

#include <intervaltree.hpp>

Classes

struct  IntervalStartCmp
 
struct  IntervalStopCmp
 

Public Types

using interval = Interval< Scalar, Value >
 
using interval_vector = std::vector< interval >
 

Public Member Functions

std::unique_ptr< IntervalTreeclone () const
 
bool empty () const
 
std::pair< Scalar, Scalar > extent () const
 
interval_vector find_contained (const Scalar &start, const Scalar &stop) const
 
interval_vector find_overlapping (const Scalar &start, const Scalar &stop) const
 
 IntervalTree ()
 
 IntervalTree (const IntervalTree &other)
 
 IntervalTree (interval_vector &&ivals, std::size_t depth=16, std::size_t minbucket=64, std::size_t maxbucket=512, Scalar leftextent=0, Scalar rightextent=0)
 
 IntervalTree (IntervalTree &&)=default
 
std::pair< bool, std::pair< Scalar, Scalar > > is_valid () const
 
IntervalTreeoperator= (const IntervalTree &other)
 
IntervalTreeoperator= (IntervalTree &&)=default
 
template<class UnaryFunction >
void visit_all (UnaryFunction f) const
 
template<class UnaryFunction >
void visit_contained (const Scalar &start, const Scalar &stop, UnaryFunction f) const
 
template<class UnaryFunction >
void visit_near (const Scalar &start, const Scalar &stop, UnaryFunction f) const
 
template<class UnaryFunction >
void visit_overlapping (const Scalar &pos, UnaryFunction f) const
 
template<class UnaryFunction >
void visit_overlapping (const Scalar &start, const Scalar &stop, UnaryFunction f) const
 
 ~IntervalTree ()=default
 

Private Attributes

Scalar center
 
interval_vector intervals
 
std::unique_ptr< IntervalTreeleft
 
std::unique_ptr< IntervalTreeright
 

Detailed Description

template<class Scalar, class Value>
class mcap::internal::IntervalTree< Scalar, Value >

Definition at line 43 of file intervaltree.hpp.

Member Typedef Documentation

◆ interval

template<class Scalar , class Value >
using mcap::internal::IntervalTree< Scalar, Value >::interval = Interval<Scalar, Value>

Definition at line 45 of file intervaltree.hpp.

◆ interval_vector

template<class Scalar , class Value >
using mcap::internal::IntervalTree< Scalar, Value >::interval_vector = std::vector<interval>

Definition at line 46 of file intervaltree.hpp.

Constructor & Destructor Documentation

◆ IntervalTree() [1/4]

template<class Scalar , class Value >
mcap::internal::IntervalTree< Scalar, Value >::IntervalTree ( )
inline

Definition at line 60 of file intervaltree.hpp.

◆ ~IntervalTree()

template<class Scalar , class Value >
mcap::internal::IntervalTree< Scalar, Value >::~IntervalTree ( )
default

◆ IntervalTree() [2/4]

template<class Scalar , class Value >
mcap::internal::IntervalTree< Scalar, Value >::IntervalTree ( const IntervalTree< Scalar, Value > &  other)
inline

Definition at line 71 of file intervaltree.hpp.

◆ IntervalTree() [3/4]

template<class Scalar , class Value >
mcap::internal::IntervalTree< Scalar, Value >::IntervalTree ( IntervalTree< Scalar, Value > &&  )
default

◆ IntervalTree() [4/4]

template<class Scalar , class Value >
mcap::internal::IntervalTree< Scalar, Value >::IntervalTree ( interval_vector &&  ivals,
std::size_t  depth = 16,
std::size_t  minbucket = 64,
std::size_t  maxbucket = 512,
Scalar  leftextent = 0,
Scalar  rightextent = 0 
)
inline

Definition at line 88 of file intervaltree.hpp.

Member Function Documentation

◆ clone()

template<class Scalar , class Value >
std::unique_ptr<IntervalTree> mcap::internal::IntervalTree< Scalar, Value >::clone ( ) const
inline

Definition at line 67 of file intervaltree.hpp.

◆ empty()

template<class Scalar , class Value >
bool mcap::internal::IntervalTree< Scalar, Value >::empty ( ) const
inline

Definition at line 209 of file intervaltree.hpp.

◆ extent()

template<class Scalar , class Value >
std::pair<Scalar, Scalar> mcap::internal::IntervalTree< Scalar, Value >::extent ( ) const
inline

Definition at line 233 of file intervaltree.hpp.

◆ find_contained()

template<class Scalar , class Value >
interval_vector mcap::internal::IntervalTree< Scalar, Value >::find_contained ( const Scalar &  start,
const Scalar &  stop 
) const
inline

Definition at line 201 of file intervaltree.hpp.

◆ find_overlapping()

template<class Scalar , class Value >
interval_vector mcap::internal::IntervalTree< Scalar, Value >::find_overlapping ( const Scalar &  start,
const Scalar &  stop 
) const
inline

Definition at line 193 of file intervaltree.hpp.

◆ is_valid()

template<class Scalar , class Value >
std::pair<bool, std::pair<Scalar, Scalar> > mcap::internal::IntervalTree< Scalar, Value >::is_valid ( ) const
inline

Definition at line 252 of file intervaltree.hpp.

◆ operator=() [1/2]

template<class Scalar , class Value >
IntervalTree& mcap::internal::IntervalTree< Scalar, Value >::operator= ( const IntervalTree< Scalar, Value > &  other)
inline

Definition at line 80 of file intervaltree.hpp.

◆ operator=() [2/2]

template<class Scalar , class Value >
IntervalTree& mcap::internal::IntervalTree< Scalar, Value >::operator= ( IntervalTree< Scalar, Value > &&  )
default

◆ visit_all()

template<class Scalar , class Value >
template<class UnaryFunction >
void mcap::internal::IntervalTree< Scalar, Value >::visit_all ( UnaryFunction  f) const
inline

Definition at line 223 of file intervaltree.hpp.

◆ visit_contained()

template<class Scalar , class Value >
template<class UnaryFunction >
void mcap::internal::IntervalTree< Scalar, Value >::visit_contained ( const Scalar &  start,
const Scalar &  stop,
UnaryFunction  f 
) const
inline

Definition at line 184 of file intervaltree.hpp.

◆ visit_near()

template<class Scalar , class Value >
template<class UnaryFunction >
void mcap::internal::IntervalTree< Scalar, Value >::visit_near ( const Scalar &  start,
const Scalar &  stop,
UnaryFunction  f 
) const
inline

Definition at line 150 of file intervaltree.hpp.

◆ visit_overlapping() [1/2]

template<class Scalar , class Value >
template<class UnaryFunction >
void mcap::internal::IntervalTree< Scalar, Value >::visit_overlapping ( const Scalar &  pos,
UnaryFunction  f 
) const
inline

Definition at line 166 of file intervaltree.hpp.

◆ visit_overlapping() [2/2]

template<class Scalar , class Value >
template<class UnaryFunction >
void mcap::internal::IntervalTree< Scalar, Value >::visit_overlapping ( const Scalar &  start,
const Scalar &  stop,
UnaryFunction  f 
) const
inline

Definition at line 172 of file intervaltree.hpp.

Member Data Documentation

◆ center

template<class Scalar , class Value >
Scalar mcap::internal::IntervalTree< Scalar, Value >::center
private

Definition at line 300 of file intervaltree.hpp.

◆ intervals

template<class Scalar , class Value >
interval_vector mcap::internal::IntervalTree< Scalar, Value >::intervals
private

Definition at line 297 of file intervaltree.hpp.

◆ left

template<class Scalar , class Value >
std::unique_ptr<IntervalTree> mcap::internal::IntervalTree< Scalar, Value >::left
private

Definition at line 298 of file intervaltree.hpp.

◆ right

template<class Scalar , class Value >
std::unique_ptr<IntervalTree> mcap::internal::IntervalTree< Scalar, Value >::right
private

Definition at line 299 of file intervaltree.hpp.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:52