Class that provides a typecast-on-output of a marginal tree to a newick tree Example use: More...
#include <Sequence/Coalescent/SimTypes.hpp>
Public Member Functions | |
| newick_stream_marginal_tree (const marginal &m) | |
| newick_stream_marginal_tree (const marginal *m) | |
| newick_stream_marginal_tree (arg::const_iterator m) | |
| newick_stream_marginal_tree (arg::iterator m) | |
| std::vector< node > | get_tree () const |
| std::ostream & | print (std::ostream &o) const |
| std::istream & | read (std::istream &i) |
Class that provides a typecast-on-output of a marginal tree to a newick tree Example use:
//assume we've done something useful to get //data into an arg called sample_history //tlength is the total length of the region being simulated int seg = 0,nsegs=sample_history.size(); arg::iterator i = sample_history.begin(),j=i; ++j; for( seg=0 ; seg < nsegs ; ++seg,++i,++j) { int length = ( (seg<nsegs-1) ? (j->beg-i->beg) : (tlength-i->beg) ); cout << '[' << length << ']' << newick_stream_marginal_tree(i) << '\n'; }
Definition at line 219 of file SimTypes.hpp.
| std::vector< node > Sequence::newick_stream_marginal_tree::get_tree | ( | ) | const |
if a tree has been read in from a stream, return it, else return an empty tree
Definition at line 433 of file CoalescentSimTypes.cc.
| std::ostream & Sequence::newick_stream_marginal_tree::print | ( | std::ostream & | o | ) | const |
Write the marginal tree in Newick format to stream o
Definition at line 442 of file CoalescentSimTypes.cc.
| std::istream & Sequence::newick_stream_marginal_tree::read | ( | std::istream & | i | ) |
Read a Newick tree from stream i
Definition at line 451 of file CoalescentSimTypes.cc.
1.6.3