|
IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
|
#include <IndexRange.h>
Public Member Functions | |
| IndexRange (const size_t from=0, const size_t to=NA_INDEX) | |
| IndexRange (const std::string &stringEncoding, const RnaSequence *seq) | |
| virtual | ~IndexRange () |
| bool | isAscending () const |
| bool | isDescending () const |
| IndexRange | operator+ (const int shift) const |
| IndexRange | operator- (const int shift) const |
| const bool | operator< (const IndexRange &r) const |
| const bool | operator== (const IndexRange &r) const |
| const bool | operator!= (const IndexRange &r) const |
| void | fromString (const std::string &stringEncoding, const RnaSequence *seq) |
| std::vector< IndexRange > | overlappingWindows (const size_t windowWidth, const size_t windowOverlap) const |
Public Attributes | |
| size_t | from |
| the start of the index range | |
| size_t | to |
| the end of the index range | |
Static Public Attributes | |
| static const size_t | LAST_INDEX |
| static const size_t | NA_INDEX |
| placeholder for not-defined values | |
| static constexpr const char * | regexString = R"((0|-?[123456789]\d*)-(0|-?[123456789]\d*))" |
| regular expression that matches valid IndexRange string encodings | |
| static const boost::regex | regex |
| regular expression that matches valid IndexRange string encodings | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const IndexRange &range) |
Defines an index region with functionality similar to pair
|
inline |
Creates a range
| from | the start index (default 0) |
| to | the end index (default NA_INDEX) |
|
inline |
Creates a range from a string encoding
| stringEncoding | string encoding of the range as produced by the ostream operator |
| seq | if not NULL, the RnaSequence to be used to shift the indices of the input string from in/output positions to internal indices |
|
inlinevirtual |
destruction
|
inline |
updates the range data from a valid string encoding (matching regex)
| stringEncoding | the interval string encoding |
| std::runtime_error | if stringEncoding does not match regex |
|
inline |
Checks whether or not the range encoding is ascending.
|
inline |
Checks whether or not the range encoding is descending.
|
inline |
Checks whether or not two ranges are different
| r | the range to compare to |
|
inline |
Adds the given shift to the index range but ensure that the minimal value is 0.
| r | the range to be added to |
| shift | the shift to be added to r |
|
inline |
Substracts the given shift to the index range but ensure that the minimal value is 0.
| r | the range to be altered |
| shift | the shift to be substracted from r |
|
inline |
Checks whether or not the start of this range preceeds the given range.
| r | the range to compare to |
|
inline |
Checks whether or not two ranges are equivalent
| r | the range to compare to |
| std::vector< IndexRange > IntaRNA::IndexRange::overlappingWindows | ( | const size_t | windowWidth, |
| const size_t | windowOverlap | ||
| ) | const |
Computes an overlapping window decomposition of this IndexRange
| windowWidth | the width of a window |
| windowOverlap | the amount of overlap between two windows |
|
friend |
Prints the range's boundaries to stream
| out | the ostream to write to |
| range | the IndexRange object to add |
| size_t IntaRNA::IndexRange::from |
the start of the index range
|
static |
placeholder to define the whole range (without explicit naming the last index) is defined
|
static |
placeholder for not-defined values
|
static |
regular expression that matches valid IndexRange string encodings
|
staticconstexpr |
regular expression that matches valid IndexRange string encodings
| size_t IntaRNA::IndexRange::to |
the end of the index range