#include <Interval.h>

Public Member Functions | |
| Interval () | |
| Interval (const int bb, const int ee) | |
| Interval (const Interval &iv) | |
| Interval (const string &str) | |
| virtual | ~Interval () |
| int | overlap (const Interval &i) const |
| int | overlap (const int bb, const int ee) const |
| virtual int | merge (Interval *i, const int cut=5) |
| virtual string | toDelimitedString (const string &dl="\t") const |
| bool | less (const Interval &iv) const |
| bool | operator< (const Interval &iv) const |
| bool | before (const Interval &iv) const |
| bool | after (const Interval &iv) const |
| bool | isNull () const |
| void | setBegin (const int bb) |
| void | setEnd (const int ee) |
| void | set (const Interval &iv) |
| int | getBegin () const |
| int | begin () const |
| int | getEnd () const |
| int | end () const |
| virtual int | size () const |
| int | length () const |
Private Attributes | |
| int | b |
| int | e |
Friends | |
| ostream & | operator<< (ostream &ous, const Interval &iv) |
[b, e] closed interval
| Interval::Interval | ( | ) | [inline] |
Referenced by IntervalChain::add(), and IntervalChain::IntervalChain().
| Interval::Interval | ( | const int | bb, | |
| const int | ee | |||
| ) | [inline] |
| Interval::Interval | ( | const Interval & | iv | ) | [inline] |
| Interval::Interval | ( | const string & | str | ) |
| virtual Interval::~Interval | ( | ) | [inline, virtual] |
| int Interval::overlap | ( | const Interval & | i | ) | const |
| int Interval::merge | ( | Interval * | i, | |
| const int | cut = 5 | |||
| ) | [virtual] |
Merging two Intervals. The merge only happens when the overlap > cut
| cut | the cutoff value for merging. |
base class merge does not invalidate input pointer.
Reimplemented in IntervalPile.
References b, e, isNull(), max, min, and overlap().
Referenced by IntervalChain::add(), IntervalPile::add(), and IntervalPile::merge().
| string Interval::toDelimitedString | ( | const string & | dl = "\t" |
) | const [virtual] |
| bool Interval::less | ( | const Interval & | iv | ) | const [inline] |
| bool Interval::before | ( | const Interval & | iv | ) | const [inline] |
| void Interval::setBegin | ( | const int | bb | ) | [inline] |
| void Interval::setEnd | ( | const int | ee | ) | [inline] |
| int Interval::getBegin | ( | ) | const [inline] |
return the beginning of the interval. begin() will do the same
References b.
Referenced by IntervalChain::add().
| int Interval::begin | ( | ) | const [inline] |
| int Interval::getEnd | ( | ) | const [inline] |
| int Interval::end | ( | ) | const [inline] |
| virtual int Interval::size | ( | ) | const [inline, virtual] |
moew meaningful for composite classes derived from this base class. Such as IntervalChain and IntervalPile
Reimplemented in IntervalPile, and IntervalChain.
| int Interval::length | ( | ) | const [inline] |
return the length of the Interval For composite derived class, it is the Interval covered by all the members. it is min(b) - max(e) of all members.
Referenced by HalfAlignPile::computeIntermediateResult(), and longestORFPlus().
| ostream& operator<< | ( | ostream & | ous, | |
| const Interval & | iv | |||
| ) | [friend] |
int Interval::b [private] |
Referenced by after(), before(), begin(), getBegin(), Interval(), isNull(), length(), less(), merge(), overlap(), set(), setBegin(), and toDelimitedString().
int Interval::e [private] |
1.5.6