Class that maintains a mapping from key to value, where the key is a type with range semantics, for the purpose of finding the intersection of a range to a set of ranges. More...
#include <RangeIntersector.hpp>
Classes | |
struct | Node |
Public Types | |
typedef IntervalTree< TRange, TBoundary, TValue, Overlap, GetBoundary, BoundaryLess > | MyType |
typedef std::pair< const TRange, TValue > | value_type |
typedef const value_type * | QueryResultType |
Public Member Functions | |
IntervalTree (const Overlap &overlap=Overlap(), const GetBoundary &getBoundary=GetBoundary(), const BoundaryLess &boundaryLess=BoundaryLess()) | |
Creates empty tree. | |
IntervalTree (const MyType &rhs) | |
Copy constructor. Provides value copy semantics. | |
const MyType & | operator= (const MyType &rhs) |
Assignment. Provides value copy semantics. | |
void | put (const TRange &range, const TValue &value) |
Add a range to the set. | |
void | intersect (const TRange &range, std::vector< QueryResultType > &result) const |
Find the intersection of the given range with all the ranges in the set. | |
size_t | size () const |
Number of ranges in the tree. | |
void | swap (MyType &rhs) |
Swaps the internals of this tree with another. | |
void | clear () |
Clear all data. | |
size_t | getMaxDepth () const |
Debug function: returns tree depth and validates the tree structure. |
Class that maintains a mapping from key to value, where the key is a type with range semantics, for the purpose of finding the intersection of a range to a set of ranges.
Requirements:
size_t cgatools::util::IntervalTree< TRange, TBoundary, TValue, Overlap, GetBoundary, BoundaryLess >::getMaxDepth | ( | ) | const [inline] |
Debug function: returns tree depth and validates the tree structure.
void cgatools::util::IntervalTree< TRange, TBoundary, TValue, Overlap, GetBoundary, BoundaryLess >::intersect | ( | const TRange & | range, | |
std::vector< QueryResultType > & | result | |||
) | const [inline] |
Find the intersection of the given range with all the ranges in the set.