libsequence  1.9.5

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

#include <Sequence/Coalescent/SimTypes.hpp>

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
 
const 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

Definition at line 166 of file SimTypes.hpp.

Constructor & Destructor Documentation

◆ marginal()

Sequence::coalsim::marginal::marginal ( const int &  b,
const int &  ns,
const int &  nn,
const std::vector< node > &  t 
)
Parameters
bbeg
nsnsam
nnnnodes
ttree

Definition at line 197 of file CoalescentSimTypes.cc.

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 210 of file CoalescentSimTypes.cc.

◆ begin() [2/2]

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

Definition at line 226 of file CoalescentSimTypes.cc.

◆ end() [1/2]

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

Definition at line 218 of file CoalescentSimTypes.cc.

◆ end() [2/2]

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

Definition at line 234 of file CoalescentSimTypes.cc.

◆ operator<()

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

return this->beg < rhs.beg;

Definition at line 262 of file CoalescentSimTypes.cc.

◆ operator[]() [1/2]

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

Definition at line 242 of file CoalescentSimTypes.cc.

◆ operator[]() [2/2]

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

Definition at line 252 of file CoalescentSimTypes.cc.

Member Data Documentation

◆ beg

int Sequence::coalsim::marginal::beg

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

Definition at line 171 of file SimTypes.hpp.

◆ nnodes

int Sequence::coalsim::marginal::nnodes

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 184 of file SimTypes.hpp.

◆ nsam

const int Sequence::coalsim::marginal::nsam

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 176 of file SimTypes.hpp.

◆ tree

std::vector<node> Sequence::coalsim::marginal::tree

tree is the coalescent history of this marginal tree

Definition at line 188 of file SimTypes.hpp.


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