IntervalPile Class Reference

#include <Interval.h>

Inheritance diagram for IntervalPile:

Interval HalfAlignPile

List of all members.

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


Detailed Description

represent all intervals that pile up on top of each other. It is used to give an average information of a cluster of overlapping intervals.

This class is a container class.

The outer Range will contain all component Intervals.


Constructor & Destructor Documentation

IntervalPile::IntervalPile (  )  [inline]

IntervalPile::IntervalPile ( Interval ip  )  [inline]

References members.

IntervalPile::~IntervalPile (  ) 

destroies each member, deallocate memory for each

References members.


Member Function Documentation

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.

Parameters:
ip must be the Interval& type for the compiler to recognize it as a virtual function!
after function call ip becomes 0.

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.

Parameters:
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().


Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on Wed Oct 14 21:49:23 2009 for Softwares from Orpara by  doxygen 1.5.6