Sequence::marginal Struct Reference
[Classes and functions related to simulating data under coalescent models]

The genealogy of a portion of a chromosome on which no recombination has occurred. More...

#include <Sequence/Coalescent/SimTypes.hpp>

List of all members.

Public Types

typedef std::vector< node >
::iterator 
iterator
typedef std::vector< node >
::const_iterator 
const_iterator
typedef std::vector< node >
::size_type 
size_type
typedef std::vector< node >
::reference 
reference
typedef std::vector< node >
::const_reference 
const_reference

Public Member Functions

iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
reference operator[] (const std::vector< node >::size_type &i)
const_reference operator[] (const std::vector< node >::size_type &i) const
 marginal (const int &b, const int &ns, const int &nn, const std::vector< node > &tree)
bool operator< (const marginal &rhs) const

Public Attributes

int beg
int nsam
int nnodes
std::vector< nodetree

Detailed Description

The genealogy of a portion of a chromosome on which no recombination has occurred.

A marginal history is a coalscent tree for a region in which no recombination has occured in the history of a sample. A sorted list of marginal trees is the ancstral recombination graph for a recombining region, and the typedef std::list<marginal> arg is used in this library

Examples:

bottleneck.cc, fragments.cc, freerec.cc, ms--.cc, and msbeta.cc.

Definition at line 164 of file SimTypes.hpp.


Constructor & Destructor Documentation

Sequence::marginal::marginal ( const int &  b,
const int &  ns,
const int &  nn,
const std::vector< node > &  t 
)
Parameters:
b beg
ns nsam
nn nnodes
t tree

Definition at line 194 of file CoalescentSimTypes.cc.


Member Function Documentation

marginal::const_iterator Sequence::marginal::begin (  )  const
Returns:
this->tree.begin();

Definition at line 223 of file CoalescentSimTypes.cc.

marginal::iterator Sequence::marginal::begin (  ) 
Returns:
this->tree.begin();

Definition at line 207 of file CoalescentSimTypes.cc.

marginal::const_iterator Sequence::marginal::end (  )  const
Returns:
this->tree.end();

Definition at line 231 of file CoalescentSimTypes.cc.

marginal::iterator Sequence::marginal::end (  ) 
Returns:
this->tree.end();

Definition at line 215 of file CoalescentSimTypes.cc.

bool Sequence::marginal::operator< ( const marginal rhs  )  const

return this->beg < rhs.beg;

Definition at line 259 of file CoalescentSimTypes.cc.

marginal::const_reference Sequence::marginal::operator[] ( const std::vector< node >::size_type &  i  )  const
Returns:
this->tree[i]
Warning:
Range checking by assert only!

Definition at line 249 of file CoalescentSimTypes.cc.

marginal::reference Sequence::marginal::operator[] ( const std::vector< node >::size_type &  i  ) 
Returns:
this->tree[i]
Warning:
Range checking by assert only!

Definition at line 239 of file CoalescentSimTypes.cc.


Member Data Documentation

The (mutational) site at which the current marginal tree begins

Definition at line 169 of file SimTypes.hpp.

The current number of nodes in the tree. By current, it is meant the current time in the simulation. At the start of a simulation of a sample size of k chromosomes, this should be initialized to k. This value is manipulated as nodes are added into the marginal history by the coalesce function.

Definition at line 182 of file SimTypes.hpp.

int Sequence::marginal::nsam [mutable]

The sample size being simulated. The 2*nsam-1 nodes in the tree are therefore indexed from 0 to 2*nsam-2

Definition at line 174 of file SimTypes.hpp.

tree is the coalescent history of this marginal tree

Definition at line 186 of file SimTypes.hpp.


The documentation for this struct was generated from the following files:
Generated on Thu Aug 11 13:22:05 2011 for libsequence by  doxygen 1.6.3