ARB
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
AP_tree_edge Class Reference

#include <ap_tree_nlen.hxx>

Inheritance diagram for AP_tree_edge:
Inheritance graph
[legend]
Collaboration diagram for AP_tree_edge:
Collaboration graph
[legend]

Public Member Functions

 AP_tree_edge (AP_tree_nlen *node1, AP_tree_nlen *node2)
 
bool isConnectedTo (const AP_tree_nlen *n) const
 
int indexOf (const AP_tree_nlen *n) const
 
AP_tree_nlenotherNode (const AP_tree_nlen *n) const
 
AP_tree_nlensonNode () const
 
AP_tree_nlennotSonNode () const
 
long Age () const
 
bool is_root_edge () const
 
bool is_leaf_edge () const
 
bool next_to_folded_group () const
 
bool has_marked () const
 
void set_root ()
 
Mutations nni_rec (EdgeSpec whichEdges, AP_BL_MODE mode, AP_tree_nlen *skipNode, bool includeStartEdge)
 
bool kl_rec (const KL_params &KL, const int rec_depth, Mutations pars_best)
 
Mutations calc_branchlengths ()
 
Mutations nni_mutPerSite (Mutations pars_one, AP_BL_MODE mode, MutationsPerSite *mps)
 
void mixTree (int repeat, int percent, EdgeSpec whichEdges)
 
void set_visited (bool vis)
 

Static Public Member Functions

static void initialize (AP_tree_nlen *root)
 
static void destroy (AP_tree_nlen *root)
 

Protected Member Functions

 ~AP_tree_edge ()
 
void relink (AP_tree_nlen *node1, AP_tree_nlen *node2)
 
AP_tree_edgeunlink ()
 

Friends

class AP_tree_nlen
 
class EdgeChain
 
std::ostream & operator<< (std::ostream &, const AP_tree_edge *)
 
AP_tree_edgeStackFrameData::makeEdge (AP_tree_nlen *n1, AP_tree_nlen *n2)
 
void AP_main::destroyEdge (AP_tree_edge *edge)
 
void ResourceStack::destroy_edges ()
 

Detailed Description

Definition at line 260 of file ap_tree_nlen.hxx.

Constructor & Destructor Documentation

AP_tree_edge::~AP_tree_edge ( )
protected

Definition at line 35 of file AP_tree_edge.cxx.

References unlink().

AP_tree_edge::AP_tree_edge ( AP_tree_nlen node1,
AP_tree_nlen node2 
)

Definition at line 25 of file AP_tree_edge.cxx.

References NULp, and relink().

Referenced by initialize().

Member Function Documentation

void AP_tree_edge::relink ( AP_tree_nlen node1,
AP_tree_nlen node2 
)
protected

Definition at line 101 of file AP_tree_edge.cxx.

References ap_assert.

Referenced by AP_tree_edge(), and StackFrameData::makeEdge().

AP_tree_edge * AP_tree_edge::unlink ( )
protected

Definition at line 88 of file AP_tree_edge.cxx.

References ap_assert, and NULp.

Referenced by ~AP_tree_edge().

void AP_tree_edge::initialize ( AP_tree_nlen root)
static

Builds all edges in the whole tree. The root node is skipped - instead his two sons are connected with an edge

Definition at line 57 of file AP_tree_edge.cxx.

References AP_tree_edge(), and buildSonEdges().

Referenced by PARSIMONY_testenv< SEQTYPE >::load_tree(), and pars_start_cb().

void AP_tree_edge::destroy ( AP_tree_nlen root)
static

Destroys all edges in the whole tree

Definition at line 71 of file AP_tree_edge.cxx.

References ANY_EDGE, ap_assert, and NULp.

Referenced by PARSIMONY_testenv< SEQTYPE >::~PARSIMONY_testenv().

bool AP_tree_edge::isConnectedTo ( const AP_tree_nlen n) const
inline

Definition at line 312 of file ap_tree_nlen.hxx.

Referenced by indexOf(), and insert_species_into_tree().

int AP_tree_edge::indexOf ( const AP_tree_nlen n) const
inline

Definition at line 313 of file ap_tree_nlen.hxx.

References ap_assert, and isConnectedTo().

Referenced by otherNode().

AP_tree_nlen* AP_tree_edge::otherNode ( const AP_tree_nlen n) const
inline
AP_tree_nlen* AP_tree_edge::sonNode ( ) const
inline
AP_tree_nlen* AP_tree_edge::notSonNode ( ) const
inline

Definition at line 316 of file ap_tree_nlen.hxx.

References otherNode(), and sonNode().

Referenced by insert_species_into_tree().

long AP_tree_edge::Age ( ) const
inline

Definition at line 318 of file ap_tree_nlen.hxx.

bool AP_tree_edge::is_root_edge ( ) const
inline

Definition at line 322 of file ap_tree_nlen.hxx.

Referenced by EdgeChain::EdgeChain(), and has_marked().

bool AP_tree_edge::is_leaf_edge ( ) const
inline
bool AP_tree_edge::next_to_folded_group ( ) const
inline

Definition at line 324 of file ap_tree_nlen.hxx.

Referenced by ArbParsimony::kernighan_optimize_tree(), and kl_rec().

bool AP_tree_edge::has_marked ( ) const
inline

Definition at line 325 of file ap_tree_nlen.hxx.

References is_root_edge(), and sonNode().

void AP_tree_edge::set_root ( )
inline

Definition at line 333 of file ap_tree_nlen.hxx.

References sonNode().

Referenced by insert_all_species_into_tree(), insert_species_into_tree(), and nni_rec().

Mutations AP_tree_edge::nni_rec ( EdgeSpec  whichEdges,
AP_BL_MODE  mode,
AP_tree_nlen skipNode,
bool  includeStartEdge 
)
bool AP_tree_edge::kl_rec ( const KL_params KL,
const int  rec_depth,
Mutations  pars_best 
)
Mutations AP_tree_edge::calc_branchlengths ( )
inline

Definition at line 340 of file ap_tree_nlen.hxx.

References ANY_EDGE, AP_BL_BL_ONLY, nni_rec(), and NULp.

Mutations AP_tree_edge::nni_mutPerSite ( Mutations  pars_one,
AP_BL_MODE  mode,
MutationsPerSite mps 
)
void AP_tree_edge::mixTree ( int  repeat,
int  percent,
EdgeSpec  whichEdges 
)
void AP_tree_edge::set_visited ( bool  vis)
inline

Definition at line 346 of file ap_tree_nlen.hxx.

Referenced by ArbParsimony::kernighan_optimize_tree().

Friends And Related Function Documentation

friend class AP_tree_nlen
friend

Definition at line 283 of file ap_tree_nlen.hxx.

Referenced by mixTree(), nni_mutPerSite(), and nni_rec().

friend class EdgeChain
friend

Definition at line 284 of file ap_tree_nlen.hxx.

std::ostream& operator<< ( std::ostream &  ,
const AP_tree_edge  
)
friend

Definition at line 572 of file AP_tree_edge.cxx.

void AP_main::destroyEdge ( AP_tree_edge edge)
friend

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