bpp-core3
3.0.0
|
This class implements a data structure describing a set of non-overlapping intervals. More...
#include <Bpp/Numeric/Range.h>
Public Member Functions | |
MultiRange () | |
MultiRange (const MultiRange< T > &mr) | |
MultiRange & | operator= (const MultiRange< T > &mr) |
virtual | ~MultiRange () |
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 |
std::vector< T > | getBounds () const |
bool | isEmpty () const |
size_t | size () const |
size_t | totalLength () const |
const Range< T > & | getRange (size_t i) const |
void | clear () |
Clear the collection. More... | |
Private Member Functions | |
void | clean_ () |
void | clear_ () |
Private Attributes | |
std::vector< Range< T > * > | ranges_ |
This class implements a data structure describing a set of non-overlapping intervals.
|
inline |
|
inline |
Definition at line 401 of file Range.h.
References bpp::MultiRange< T >::ranges_.
|
inlinevirtual |
|
inlinevirtual |
Add a new range to the collection.
r | The range to add to the collection. |
Implements bpp::RangeCollection< T >.
Definition at line 425 of file Range.h.
References bpp::Range< T >::clone(), and bpp::Range< T >::overlap().
|
inlineprivate |
|
inlinevirtual |
|
inlineprivate |
|
inlinevirtual |
Only keep the ranges that fall within the given range.
r | Restriction range. |
Implements bpp::RangeCollection< T >.
Definition at line 466 of file Range.h.
References bpp::Range< T >::contains().
|
inline |
|
inlinevirtual |
Implements bpp::RangeCollection< T >.
|
inlinevirtual |
Implements bpp::RangeCollection< T >.
|
inline |
Definition at line 409 of file Range.h.
References bpp::MultiRange< T >::ranges_.
|
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 |
Definition at line 396 of file Range.h.
Referenced by bpp::MultiRange< T >::MultiRange(), and bpp::MultiRange< T >::operator=().