bpp-core  2.1.0
bpp::RangeCollection< T > Class Template Reference

Interface discribing a collection of Range objects. More...

#include <Bpp/Numeric/Range.h>

+ Inheritance diagram for bpp::RangeCollection< T >:

List of all members.

Public Member Functions

virtual ~RangeCollection ()
virtual void addRange (const Range< T > &r)=0
 Add a new range to the collection.
virtual void restrictTo (const Range< T > &r)=0
 Get the intersection with a given range.
virtual void filterWithin (const Range< T > &r)=0
 Only keep the ranges that fall within the given range.
virtual std::string toString () const =0
virtual bool isEmpty () const =0
virtual size_t size () const =0
virtual const Range< T > & getRange (size_t i) const =0
virtual void clear ()=0
 Clear the collection.

Detailed Description

template<class T>
class bpp::RangeCollection< T >

Interface discribing a collection of Range objects.

Definition at line 208 of file Range.h.


Constructor & Destructor Documentation

template<class T >
virtual bpp::RangeCollection< T >::~RangeCollection ( ) [inline, virtual]

Definition at line 210 of file Range.h.


Member Function Documentation

template<class T >
virtual void bpp::RangeCollection< T >::addRange ( const Range< T > &  r) [pure virtual]

Add a new range to the collection.

Parameters:
rThe range to add to the collection.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.

template<class T >
virtual void bpp::RangeCollection< T >::clear ( ) [pure virtual]

Clear the collection.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.

template<class T >
virtual void bpp::RangeCollection< T >::filterWithin ( const Range< T > &  r) [pure virtual]

Only keep the ranges that fall within the given range.

Parameters:
rRestriction range.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.

template<class T >
virtual const Range<T>& bpp::RangeCollection< T >::getRange ( size_t  i) const [pure virtual]
Returns:
The ith range in the collection.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.

template<class T >
virtual bool bpp::RangeCollection< T >::isEmpty ( ) const [pure virtual]
Returns:
True if the set does not contain any range.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.

template<class T >
virtual void bpp::RangeCollection< T >::restrictTo ( const Range< T > &  r) [pure virtual]

Get the intersection with a given range.

The new multirange is the union of all ranges intersections with the given range.

Parameters:
rRestriction range.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.

template<class T >
virtual size_t bpp::RangeCollection< T >::size ( ) const [pure virtual]
Returns:
The number of ranges in the collection.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.

template<class T >
virtual std::string bpp::RangeCollection< T >::toString ( ) const [pure virtual]
Returns:
A string representation of the set of intervals.

Implemented in bpp::MultiRange< T >, and bpp::RangeSet< T >.


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