#include <Interval.h>

Public Member Functions | |
| IntervalPile () | |
| IntervalPile (Interval *ip) | |
| ~IntervalPile () | |
| int | merge (Interval *ip, const int cut=5) |
| int | add (Interval *i) |
| int | size () const |
| string | toDelimitedString (const string &dl="\t") const |
Protected Attributes | |
| vector< Interval * > | members |
This class is a container class.
The outer Range will contain all component Intervals.
| IntervalPile::IntervalPile | ( | ) | [inline] |
| IntervalPile::~IntervalPile | ( | ) |
destroies each member, deallocate memory for each
References members.
| int IntervalPile::merge | ( | Interval * | ip, | |
| const int | cut = 5 | |||
| ) | [virtual] |
merging two piles. This method will combine the members from ip. It will not make new copies because it does not know the type of the under members. It also does a simple transfer of ownership, which means that the container in ip will be empty after this operation. ip will become 0 after the operation.
| ip | must be the Interval& type for the compiler to recognize it as a virtual function! |
No merge operation at element level, just combining the members in two sets.
does not actually destroy the elements in ip when merging only playing with pointers. Simply trnasfer ownership from ip to this object for the underlying members.
The members stays the same.
Reimplemented from Interval.
References members, and Interval::merge().
| int IntervalPile::add | ( | Interval * | i | ) |
Add one more interval to this pile. The Interval must be the same type as the members. We are using the base class pointer for polymorphism behavior.
| i | input Interval. After function call i becomes 0. |
References members, and Interval::merge().
| int IntervalPile::size | ( | ) | const [inline, virtual] |
the number of Intervals in this object
Reimplemented from Interval.
References members.
Referenced by HalfAlignPile::computeIntermediateResult(), and toDelimitedString().
| string IntervalPile::toDelimitedString | ( | const string & | dl = "\t" |
) | const [virtual] |
Reimplemented from Interval.
Reimplemented in HalfAlignPile.
References size(), and Interval::toDelimitedString().
Referenced by HalfAlignPile::toDelimitedString().
vector<Interval*> IntervalPile::members [protected] |
this variable holds all the Interval objects and its derived classes. The derived classes can add extra information to the Interval.
Referenced by add(), HalfAlignPile::computeIntermediateResult(), IntervalPile(), merge(), size(), and ~IntervalPile().
1.5.6