|
IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
|
#include <IndexRangeList.h>

Public Types | |
| typedef List::iterator | iterator |
| typedef List::const_iterator | const_iterator |
| typedef List::reverse_iterator | reverse_iterator |
| typedef List::const_reverse_iterator | const_reverse_iterator |
Public Member Functions | |
| IndexRangeList (const bool allowOverlap=false) | |
| IndexRangeList (const std::string &stringEncoding, const bool allowOverlap=false, const RnaSequence *seq=NULL, const bool isComplete=false) | |
| IndexRangeList (const IndexRangeList &toCopy) | |
| virtual | ~IndexRangeList () |
| bool | covers (const size_t index) const |
| bool | covers (const size_t from, const size_t to) const |
| bool | covers (const IndexRange &range) const |
| bool | overlaps (const IndexRange &range) const |
| void | push_back (const IndexRange &range) |
| iterator | insert (const IndexRange &range) |
| IndexRange & | get (const size_t idx) |
| const IndexRange & | get (const size_t idx) const |
| iterator | erase (iterator i) |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| reverse_iterator | rbegin () |
| reverse_iterator | rend () |
| const_reverse_iterator | rbegin () const |
| const_reverse_iterator | rend () const |
| bool | empty () const |
| size_t | size () const |
| void | clear () |
| bool | isAllowingOverlap () const |
| void | fromString (const std::string &stringEncoding, const RnaSequence *seq=NULL) |
| IndexRangeList | shift (const int indexShift, const size_t indexMax) const |
| IndexRangeList & | reverseInplace (const size_t seqLength) |
| IndexRangeList | reverse (const size_t seqLength) const |
| const bool | operator== (const IndexRangeList &r) const |
| const bool | operator!= (const IndexRangeList &r) const |
| void | setComplete (const bool isComplete) |
| bool | isComplete () const |
Static Public Attributes | |
| static const std::string | regexString |
| regular expression string (without start/end matching) | |
| static const boost::regex | regex |
| regular expression that matches valid IndexRangeList string encodings | |
Protected Types | |
| typedef std::list< IndexRange > | List |
| List of ranges. | |
Protected Attributes | |
| bool | allowOverlap |
| whether or not overlapping ranges are allowed | |
| List | list |
| the list of indices | |
| bool | listIsComplete |
| whether or not the list is complete, i.e. cannot be extended | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const IndexRangeList &l) |
Sorted list of ascending ranges that can be constrained to be non-overlapping
| typedef List::const_iterator IntaRNA::IndexRangeList::const_iterator |
| typedef List::const_reverse_iterator IntaRNA::IndexRangeList::const_reverse_iterator |
| typedef List::iterator IntaRNA::IndexRangeList::iterator |
|
protected |
List of ranges.
| typedef List::reverse_iterator IntaRNA::IndexRangeList::reverse_iterator |
|
inline |
empty construction
| allowOverlap | whether or not overlapping ranges are allowed |
|
inline |
String encoding based construction
| stringEncoding | the string encoding to be parsed |
| allowOverlap | whether or not overlapping ranges are allowed |
| seq | if not NULL, the RnaSequence to be used to shift in/output indices to 0-based internal index positions |
| isComplete | whether or not the list is complete (no further ranges can be added) |
| std::runtime_error | if stringEncoding does not match regex |
|
inline |
copy construction
| toCopy | the list to make this a copy of |
|
inlinevirtual |
destruction
|
inline |
Access to the first index range within the list
|
inline |
Constant access to the first index range within the list
|
inline |
Removes all stored elements
| bool IntaRNA::IndexRangeList::covers | ( | const IndexRange & | range | ) | const |
checks whether or not a given index range is completely covered by one of the stored index ranges
| range | the index range of interest |
|
inline |
checks whether or not a given index range is completely covered by one of the stored index ranges
| from | the start index of the range of interest |
| to | the end index of the range of interest |
| bool IntaRNA::IndexRangeList::covers | ( | const size_t | index | ) | const |
checks whether or not a given index is covered by one of the stored index ranges
| index | the index to check |
index is within one of the index ranges (including boundaries); false otherwise
|
inline |
Whether or not an index range is present
|
inline |
Access to the end of the index range iteration
|
inline |
Constant access to the end of the index range iteration
|
inline |
removes an element from the list
| i | the iterator pointing to the element to delete |
| void IntaRNA::IndexRangeList::fromString | ( | const std::string & | stringEncoding, |
| const RnaSequence * | seq = NULL |
||
| ) |
updates the range list data from a valid string encoding (matching regex)
| stringEncoding | the interval list string encoding |
| seq | if not NULL, the RnaSequence to be used to shift in/output indices to 0-based internal index positions |
| std::runtime_error | if stringEncoding does not match regex |
| IndexRange & IntaRNA::IndexRangeList::get | ( | const size_t | idx | ) |
access to the stored range with the given index
| idx | the index of the range within the list to access |
| std::runtime_error | if idx >= this.size() |
| const IndexRange & IntaRNA::IndexRangeList::get | ( | const size_t | idx | ) | const |
Constant access to the stored range with the given index
| idx | the index of the range within the list to access |
| std::runtime_error | if idx >= this.size() |
| iterator IntaRNA::IndexRangeList::insert | ( | const IndexRange & | range | ) |
adds an ascending range to the according position of the sorted list. Insertion of duplicates is avoided.
| range | the ascending index range to add |
|
inline |
Whether or not index ranges are allowed to overlap
|
inline |
Whether or not the list is complete, i.e. cannot be extended
|
inline |
Checks whether or not two range lists are inequivalent
| r | the range list to compare to |
|
inline |
Checks whether or not two range lists are equivalent
| r | the range list to compare to |
| bool IntaRNA::IndexRangeList::overlaps | ( | const IndexRange & | range | ) | const |
checks whether or not a given ascending index range is overlapping with at least one of the stored index ranges
| range | the range to check |
range is within one of the index ranges (including boundaries); false otherwise | void IntaRNA::IndexRangeList::push_back | ( | const IndexRange & | range | ) |
adds an ascending range to the end of the list. NOTE: if the insertion would violate range sorting, an exception is raised
| range | the ascending index range to add (from should be > rbegin()->to) |
|
inline |
Access to the last index range within the list
|
inline |
Constant access to the last index range within the list
|
inline |
Access to the end of the reversed index range iteration
|
inline |
Constant access to the end of the reversed index range iteration
|
inline |
Reverses all indices for the given sequence length, i.e. (newIdx = seqLength-1-oldIdx)
| IndexRangeList & IntaRNA::IndexRangeList::reverseInplace | ( | const size_t | seqLength | ) |
Reverses all indices for the given sequence length, i.e. (newIdx = seqLength-1-oldIdx)
|
inline |
Sets whether or not the list is complete, i.e. cannot be extended
| isComplete | true if the list is complete; false otherwise |
| IndexRangeList IntaRNA::IndexRangeList::shift | ( | const int | indexShift, |
| const size_t | indexMax | ||
| ) | const |
shifts all indices by the given value and returns all intervals within the boundaries [0,indexMax] including indexMax
| indexShift | the shift to be applied to all index range boundaries |
| indexMax | the maximal value any index in the returned list can have |
|
inline |
The number of index ranges stored
|
friend |
Prints the boundaries of the list's ranges to stream
| out | the ostream to write to |
| l | the IndexRangeList object to add |
|
protected |
whether or not overlapping ranges are allowed
|
protected |
the list of indices
|
protected |
whether or not the list is complete, i.e. cannot be extended
|
static |
regular expression that matches valid IndexRangeList string encodings
|
static |
regular expression string (without start/end matching)