cgatools::util::IntervalTree< TRange, TBoundary, TValue, Overlap, GetBoundary, BoundaryLess > Class Template Reference

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>

List of all members.

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 MyTypeoperator= (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.

Detailed Description

template<typename TRange, typename TBoundary, typename TValue, typename Overlap, typename GetBoundary, typename BoundaryLess = std::less<TBoundary>>
class cgatools::util::IntervalTree< TRange, TBoundary, TValue, Overlap, GetBoundary, BoundaryLess >

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:


Member Function Documentation

template<typename TRange, typename TBoundary, typename TValue, typename Overlap, typename GetBoundary, typename BoundaryLess = std::less<TBoundary>>
size_t cgatools::util::IntervalTree< TRange, TBoundary, TValue, Overlap, GetBoundary, BoundaryLess >::getMaxDepth (  )  const [inline]

Debug function: returns tree depth and validates the tree structure.

template<typename TRange, typename TBoundary, typename TValue, typename Overlap, typename GetBoundary, typename BoundaryLess = std::less<TBoundary>>
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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2