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

#include <AP_Tree.hxx>

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

Public Member Functions

 AP_tree (AP_tree_root *troot)
 
 DEFINE_TREE_ACCESSORS (AP_tree_root, AP_tree)
 
void compute_tree () FINAL_OVERRIDE
 
void recompute_and_write_folding ()
 
unsigned count_leafs () const
 
unsigned get_leaf_count () const OVERRIDE
 
void load_subtree_info ()
 
int colorize (GB_HASH *hashptr)
 
void uncolorize ()
 
virtual void insert (AP_tree *new_brother)
 
virtual void initial_insert (AP_tree *new_brother, AP_tree_root *troot)
 
virtual AP_treeREMOVE ()
 
void swap_sons () OVERRIDE
 
GB_ERROR cantMoveNextTo (AP_tree *new_brother)
 
virtual void moveNextTo (AP_tree *new_brother, AP_FLOAT rel_pos)
 
GB_ERROR tree_write_tree_rek (GBDATA *gb_tree)
 
GB_ERROR relink () __ATTR__USERESULT
 
int get_linewidth () const
 
void set_linewidth (int width)
 
void reset_linewidth ()
 
void set_linewidth_recursive (int width)
 
float get_angle () const
 
void set_angle (float angle)
 
void reset_angle ()
 
void buildLeafList (AP_tree **&list, long &num)
 
GB_ERROR move_group_to (AP_tree *new_group) __ATTR__USERESULT
 
bool is_folded_group () const
 
bool is_inside_folded_group () const
 
void mark_duplicates ()
 
const charmark_long_branches (double min_rel_diff, double min_abs_diff, double &found_max_abs_diff)
 
const charmark_deep_leafs (int min_depth, double min_rootdist, int &found_max_depth, double &found_max_rootdist)
 
double mark_degenerated_branches (double degeneration_factor)
 
const charanalyse_distances ()
 
void justify_branch_lenghs (GBDATA *gb_main)
 
void relink_tree (GBDATA *gb_main, void(*relinker)(GBDATA *&ref_gb_node, char *&ref_name, GB_HASH *organism_hash), GB_HASH *organism_hash)
 
void reset_subtree_spreads ()
 
void reset_subtree_angles ()
 
void reset_subtree_linewidths ()
 
void reset_subtree_layout ()
 
bool hasName (const char *Name) const
 
bool has_correct_mark_flags () const
 
 PREPARE_MARK_NONFINAL_CLASS (AP_tree)
 
template<>
ShadedValue update_subtree_information (const group_scaling &gscaling)
 
- Public Member Functions inherited from ARB_seqtree
 ARB_seqtree (ARB_seqtree_root *root)
 
 DEFINE_TREE_ACCESSORS (ARB_seqtree_root, ARB_seqtree)
 
void calcTreeInfo (ARB_tree_info &info)
 
bool is_upper_son () const
 
bool is_lower_son () const
 
AP_sequenceget_seq ()
 
const AP_sequenceget_seq () const
 
AP_sequenceset_seq (AP_sequence *sequence)
 
bool hasSequence () const
 
void mark_subtree ()
 
bool contains_marked_species ()
 
- Public Member Functions inherited from TreeNode
bool is_leaf () const
 
void markAsLeaf ()
 
 DEFINE_READ_ACCESSORS (TreeNode *, get_father, father)
 
 DEFINE_READ_ACCESSORS (TreeNode *, get_leftson, leftson)
 
 DEFINE_READ_ACCESSORS (TreeNode *, get_rightson, rightson)
 
bool is_son_of (const TreeNode *Father) const
 
bool is_leftson () const
 
bool is_rightson () const
 
bool is_inside (const TreeNode *subtree) const
 
bool is_ancestor_of (const TreeNode *descendant) const
 
bool in_same_branch_as (const TreeNode *other) const
 
bool in_other_branch_than (const TreeNode *other) const
 
const TreeNodeancestor_common_with (const TreeNode *other) const
 
TreeNodeancestor_common_with (TreeNode *other)
 
bool is_son_of_root () const
 
GBT_LEN get_branchlength () const
 
void set_branchlength (GBT_LEN newlen)
 
GBT_LEN get_branchlength_unrooted () const
 
void set_branchlength_unrooted (GBT_LEN newlen)
 
GBT_LEN sum_child_lengths () const
 
GBT_LEN root_distance () const
 
GBT_LEN intree_distance_to (const TreeNode *other) const
 
void remove_bootstrap ()
 
void reset_branchlengths ()
 
void scale_branchlengths (double factor)
 
void bootstrap2branchlen ()
 
void branchlen2bootstrap ()
 
GBT_RemarkType parse_bootstrap (double &bootstrap) const
 
const charget_remark () const
 
const SmartCharPtr & get_remark_ptr () const
 
bool is_inner_node_with_remark () const
 
void use_as_remark (const SmartCharPtr &newRemark)
 
void set_remark (const char *newRemark)
 
void set_bootstrap (double bootstrap)
 
void remove_remark ()
 
bool has_no_remark () const
 
bool has_valid_root_remarks () const
 
 TreeNode (TreeRoot *root)
 
TreeNodefixDeletedSon ()
 
void unlink_from_DB ()
 
void announce_tree_constructed ()
 
void forget_origin ()
 
void forget_relatives ()
 
TreeRootget_tree_root () const
 
const TreeNodeget_root_node () const
 
TreeNodeget_root_node ()
 
bool is_root_node () const
 
virtual void set_root ()
 
TreeNodeget_brother ()
 
const TreeNodeget_brother () const
 
bool has_group_info () const
 
TreeNodekeelTarget ()
 
const TreeNodekeelTarget () const
 
bool keelsDownGroup (const TreeNode *toSon) const
 
void unkeelGroup ()
 
int keeledStateInfo () const
 
void setKeeledState (int keeledState)
 
bool is_normal_group () const
 
bool is_keeled_group () const
 
bool is_clade () const
 
const charget_group_name () const
 
const TreeNodefind_parent_with_groupInfo (bool skipKeeledBrothers=false) const
 
TreeNodefind_parent_with_groupInfo (bool skipKeeledBrothers=false)
 
const TreeNodefind_parent_clade () const
 
TreeNodefind_parent_clade ()
 
int calc_clade_level () const
 
int count_clades () const
 
void rotate_subtree ()
 
void reorder_tree (TreeOrder mode)
 
TreeNodefindLeafNamed (const char *wantedName)
 
GBT_LEN reset_length_and_bootstrap ()
 
void multifurcate ()
 
void set_branchlength_preserving (GBT_LEN new_len)
 
void multifurcate_whole_tree (const multifurc_limits &below)
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()
 

Static Public Member Functions

static void set_tree_shader (AP_TreeShader *new_shader)
 
static const AP_TreeShaderget_tree_shader ()
 
- Static Public Member Functions inherited from TreeNode
static void destroy (TreeNode *that)
 
static void destroy (TreeNode *that, TreeRoot *root)
 

Public Attributes

AP_tree_members gr
 
- Public Attributes inherited from TreeNode
TreeNodefather
 
TreeNodeleftson
 
TreeNoderightson
 
GBT_LEN leftlen
 
GBT_LEN rightlen
 
GBDATAgb_node
 
charname
 

Protected Member Functions

 ~AP_tree () OVERRIDE
 
- Protected Member Functions inherited from ARB_seqtree
AP_sequencetake_seq ()
 
void replace_seq (AP_sequence *sequence)
 
 ~ARB_seqtree () OVERRIDE
 
- Protected Member Functions inherited from TreeNode
TreeNode *& self_ref ()
 
void unlink_from_father ()
 
void swap_node_info (TreeNode *other, bool ofKeeledGroups)
 
void fixKeeledOrientation ()
 
void set_tree_root (TreeRoot *new_root)
 
bool at_root () const
 
virtual ~TreeNode ()
 
void destroy ()
 
void destroy (TreeRoot *viaRoot)
 

Friends

class AP_tree_root
 

Detailed Description

Definition at line 210 of file AP_Tree.hxx.

Constructor & Destructor Documentation

AP_tree::~AP_tree ( )
protected
AP_tree::AP_tree ( AP_tree_root troot)
inlineexplicit

Definition at line 285 of file AP_Tree.hxx.

References AP_tree_members::clear().

Member Function Documentation

AP_tree::DEFINE_TREE_ACCESSORS ( AP_tree_root  ,
AP_tree   
)
void AP_tree::compute_tree ( )
virtual
void AP_tree::recompute_and_write_folding ( )
unsigned AP_tree::count_leafs ( ) const

Definition at line 840 of file AP_Tree.cxx.

References TreeNode::is_leaf().

Referenced by buildLeafList(), and NTREE_move_tree_info().

unsigned AP_tree::get_leaf_count ( ) const
inlinevirtual

Implements TreeNode.

Reimplemented in FINAL_TYPE< SEQTYPE >.

Definition at line 298 of file AP_Tree.hxx.

References AP_tree_members::leaf_sum.

void AP_tree::load_subtree_info ( )

Definition at line 454 of file AP_Tree.cxx.

References TreeNode::is_leaf().

int AP_tree::colorize ( GB_HASH hashptr)
void AP_tree::uncolorize ( )
inline

Definition at line 306 of file AP_Tree.hxx.

References compute_tree().

Referenced by MP_close_main(), and MP_normal_colors_in_tree().

void AP_tree::insert ( AP_tree new_brother)
virtual
void AP_tree::initial_insert ( AP_tree new_brother,
AP_tree_root troot 
)
virtual
AP_tree * AP_tree::REMOVE ( )
virtual
void AP_tree::swap_sons ( )
inlinevirtual

Reimplemented from TreeNode.

Definition at line 312 of file AP_Tree.hxx.

References ap_assert, TreeNode::is_leaf(), AP_tree_members::swap_son_layout(), and TreeNode::swap_sons().

GB_ERROR AP_tree::cantMoveNextTo ( AP_tree new_brother)

Definition at line 338 of file AP_Tree.cxx.

References error(), TreeNode::father, TreeNode::is_inside(), and NULp.

void AP_tree::moveNextTo ( AP_tree new_brother,
AP_FLOAT  rel_pos 
)
virtual
GB_ERROR AP_tree::tree_write_tree_rek ( GBDATA gb_tree)
GB_ERROR AP_tree::relink ( )
int AP_tree::get_linewidth ( ) const
inline
void AP_tree::set_linewidth ( int  width)
inline
void AP_tree::reset_linewidth ( )
inline

Definition at line 328 of file AP_Tree.hxx.

References tree_defaults::LINEWIDTH, and set_linewidth().

Referenced by reset_subtree_layout(), and reset_subtree_linewidths().

void AP_tree::set_linewidth_recursive ( int  width)

Definition at line 1601 of file AP_Tree.cxx.

References TreeNode::is_leaf(), and set_linewidth().

Referenced by BranchLinewidthScaler::do_scale().

float AP_tree::get_angle ( ) const
inline

Definition at line 331 of file AP_Tree.hxx.

References TreeNode::is_root_node().

void AP_tree::set_angle ( float  angle)
inline

Definition at line 332 of file AP_Tree.hxx.

References TreeNode::father, TreeNode::get_brother(), get_father(), and TreeNode::is_root_node().

Referenced by reset_angle().

void AP_tree::reset_angle ( )
inline

Definition at line 342 of file AP_Tree.hxx.

References tree_defaults::ANGLE, and set_angle().

Referenced by reset_subtree_angles(), and reset_subtree_layout().

void AP_tree::buildLeafList ( AP_tree **&  list,
long num 
)

Definition at line 933 of file AP_Tree.cxx.

References ap_assert, count_leafs(), and NULp.

Referenced by AP_tree_root::remove_leafs().

GB_ERROR AP_tree::move_group_to ( AP_tree new_group)
bool AP_tree::is_folded_group ( ) const
inline
bool AP_tree::is_inside_folded_group ( ) const

Definition at line 1640 of file AP_Tree.cxx.

References TreeNode::father, get_father(), is_folded_group(), and TreeNode::is_leaf().

Referenced by NT_jump_cb().

void AP_tree::mark_duplicates ( )
const char * AP_tree::mark_long_branches ( double  min_rel_diff,
double  min_abs_diff,
double &  found_max_abs_diff 
)
const char * AP_tree::mark_deep_leafs ( int  min_depth,
double  min_rootdist,
int found_max_depth,
double &  found_max_rootdist 
)
double AP_tree::mark_degenerated_branches ( double  degeneration_factor)

Definition at line 1496 of file AP_Tree.cxx.

References ap_mark_degenerated().

Referenced by BranchWindow::markDegeneratedBranches().

const char * AP_tree::analyse_distances ( )

Definition at line 1461 of file AP_Tree.cxx.

References EdgeDistances::get_report().

void AP_tree::justify_branch_lenghs ( GBDATA gb_main)

Definition at line 1559 of file AP_Tree.cxx.

References ap_just_tree_rek(), and ta.

Referenced by NT_justify_branch_lenghs().

void AP_tree::relink_tree ( GBDATA gb_main,
void(*)(GBDATA *&ref_gb_node, char *&ref_name, GB_HASH *organism_hash)  relinker,
GB_HASH organism_hash 
)

Definition at line 1575 of file AP_Tree.cxx.

References relink_tree_rek(), and ta.

Referenced by NT_pseudo_species_to_organism().

void AP_tree::reset_subtree_spreads ( )

Definition at line 1619 of file AP_Tree.cxx.

References gr, TreeNode::is_leaf(), and AP_tree_members::reset_child_spread().

void AP_tree::reset_subtree_angles ( )

Definition at line 1626 of file AP_Tree.cxx.

References TreeNode::is_leaf(), and reset_angle().

void AP_tree::reset_subtree_linewidths ( )

Definition at line 1630 of file AP_Tree.cxx.

References TreeNode::is_leaf(), and reset_linewidth().

void AP_tree::reset_subtree_layout ( )

Definition at line 1634 of file AP_Tree.cxx.

References TreeNode::is_leaf(), reset_angle(), and reset_linewidth().

void AP_tree::set_tree_shader ( AP_TreeShader new_shader)
static

Definition at line 704 of file AP_Tree.cxx.

References AP_TreeShader::init().

Referenced by NT_install_treeShader().

static const AP_TreeShader* AP_tree::get_tree_shader ( )
inlinestatic

Definition at line 372 of file AP_Tree.hxx.

Referenced by NT_configure_treeShader().

bool AP_tree::hasName ( const char Name) const
inline

Definition at line 374 of file AP_Tree.hxx.

References TreeNode::name.

bool AP_tree::has_correct_mark_flags ( ) const

Definition at line 670 of file AP_Tree.cxx.

References gr, TreeNode::is_leaf(), and AP_tree_members::mark_sum.

AP_tree::PREPARE_MARK_NONFINAL_CLASS ( AP_tree  )
template<>
ShadedValue AP_tree::update_subtree_information ( const group_scaling gscaling)

Friends And Related Function Documentation

friend class AP_tree_root
friend

Definition at line 283 of file AP_Tree.hxx.

Member Data Documentation

AP_tree_members AP_tree::gr

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