|
bpp-core3
3.0.0
|
This class implements a data structure describing a set of intervals. More...
#include <Bpp/Numeric/Range.h>
Inheritance diagram for bpp::RangeSet< T >:
Collaboration diagram for bpp::RangeSet< T >:Public Member Functions | |
| RangeSet () | |
| RangeSet (const RangeSet< T > &set) | |
| RangeSet & | operator= (const RangeSet< T > &set) |
| virtual | ~RangeSet () |
| void | addRange (const Range< T > &r) |
| Add a new range to the collection. More... | |
| void | restrictTo (const Range< T > &r) |
| Get the intersection with a given range. More... | |
| void | filterWithin (const Range< T > &r) |
| Only keep the ranges that fall within the given range. More... | |
| std::string | toString () const |
| bool | isEmpty () const |
| size_t | size () const |
| size_t | totalLength () const |
| const Range< T > & | getRange (size_t i) const |
| const std::vector< Range< T > *> & | getSet () const |
| std::vector< Range< T > *> & | getSet () |
| void | clear () |
| Clear the collection. More... | |
Private Member Functions | |
| void | clear_ () |
Private Attributes | |
| std::vector< Range< T > *> | ranges_ |
This class implements a data structure describing a set of intervals.
Intervals can be overlapping, but empty intervals will be ignored/removed.
|
inline |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Add a new range to the collection.
| r | The range to add to the collection. |
Implements bpp::RangeCollection< T >.
Definition at line 295 of file Range.h.
References bpp::Range< T >::clone(), and bpp::Range< T >::isEmpty().
|
inlinevirtual |
|
inlineprivate |
|
inlinevirtual |
Only keep the ranges that fall within the given range.
| r | Restriction range. |
Implements bpp::RangeCollection< T >.
Definition at line 319 of file Range.h.
References bpp::Range< T >::contains().
|
inlinevirtual |
Implements bpp::RangeCollection< T >.
|
inline |
|
inline |
|
inlinevirtual |
Implements bpp::RangeCollection< T >.
|
inline |
|
inlinevirtual |
Get the intersection with a given range.
The new multirange is the union of all ranges intersections with the given range.
| r | Restriction range. |
Implements bpp::RangeCollection< T >.
|
inlinevirtual |
Implements bpp::RangeCollection< T >.
|
inlinevirtual |
Implements bpp::RangeCollection< T >.
|
inlinevirtual |
Implements bpp::RangeCollection< T >.
|
private |