NCBI C++ ToolKit
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CPhyloTreeMidpointDist Class Reference

Search Toolkit Book for CPhyloTreeMidpointDist

#include <gui/widgets/phylo_tree/phylo_tree_algorithm.hpp>

+ Inheritance diagram for CPhyloTreeMidpointDist:
+ Collaboration diagram for CPhyloTreeMidpointDist:

Public Member Functions

 CPhyloTreeMidpointDist (TTreeType *tree, vector< float > &distances, TTreeIdx max_dist_node_idx)
 
void GetLongest (vector< TTreeIdx > &path, float &length)
 
- Public Member Functions inherited from IPhyloTreeVisitor
 IPhyloTreeVisitor (TTreeType *tree)
 
virtual ~IPhyloTreeVisitor ()
 
ETreeTraverseCode operator() (TTreeType &tree, TTreeIdx tree_node, int delta)
 

Protected Member Functions

virtual ETreeTraverseCode x_OnStep (TTreeIdx node_idx, int delta)
 
- Protected Member Functions inherited from IPhyloTreeVisitor
virtual ETreeTraverseCode x_OnStepRight (TTreeIdx x_node)
 
virtual ETreeTraverseCode x_OnStepLeft (TTreeIdx x_node)
 
virtual ETreeTraverseCode x_OnStepDown (TTreeIdx x_node)
 

Private Attributes

vector< float > m_Distances
 Distance of each node from root node. More...
 
TTreeIdx m_MaxDistNode
 Node at greatest distance from root, its distance and vector of nodes from root to m_MaxDistNode (sorted and unsorted) More...
 
float m_MaxDistFromRoot
 
vector< TTreeIdxm_MaxDistPathToRoot
 
vector< TTreeIdxm_SortedMaxDistPathToRoot
 
vector< TTreeIdxm_MaxPath
 Path (set of nodes) that is the longest path in the tree. More...
 
float m_MaxDist
 Total distance along m_MaxPath. More...
 

Additional Inherited Members

- Public Types inherited from IPhyloTreeVisitor
typedef CPhyloTree TTreeType
 
typedef CPhyloTree::TTreeIdx TTreeIdx
 
typedef CPhyloTree::TNodeType TNodeType
 
- Protected Attributes inherited from IPhyloTreeVisitor
TTreeTypem_Tree
 

Detailed Description

Definition at line 376 of file phylo_tree_algorithm.hpp.

Constructor & Destructor Documentation

◆ CPhyloTreeMidpointDist()

CPhyloTreeMidpointDist::CPhyloTreeMidpointDist ( TTreeType tree,
vector< float > &  distances,
TTreeIdx  max_dist_node_idx 
)
inline

Member Function Documentation

◆ GetLongest()

void CPhyloTreeMidpointDist::GetLongest ( vector< TTreeIdx > &  path,
float &  length 
)

Definition at line 780 of file phylo_tree_algorithm.cpp.

References m_MaxDist, and m_MaxPath.

Referenced by CPhyloTreeDataSource::ReRootMidpoint().

◆ x_OnStep()

ETreeTraverseCode CPhyloTreeMidpointDist::x_OnStep ( TTreeIdx  node_idx,
int  delta 
)
protectedvirtual

Member Data Documentation

◆ m_Distances

vector<float> CPhyloTreeMidpointDist::m_Distances
private

Distance of each node from root node.

Definition at line 408 of file phylo_tree_algorithm.hpp.

Referenced by CPhyloTreeMidpointDist(), and x_OnStep().

◆ m_MaxDist

float CPhyloTreeMidpointDist::m_MaxDist
private

Total distance along m_MaxPath.

Definition at line 420 of file phylo_tree_algorithm.hpp.

Referenced by GetLongest(), and x_OnStep().

◆ m_MaxDistFromRoot

float CPhyloTreeMidpointDist::m_MaxDistFromRoot
private

Definition at line 413 of file phylo_tree_algorithm.hpp.

Referenced by CPhyloTreeMidpointDist(), and x_OnStep().

◆ m_MaxDistNode

TTreeIdx CPhyloTreeMidpointDist::m_MaxDistNode
private

Node at greatest distance from root, its distance and vector of nodes from root to m_MaxDistNode (sorted and unsorted)

Definition at line 412 of file phylo_tree_algorithm.hpp.

Referenced by CPhyloTreeMidpointDist(), and x_OnStep().

◆ m_MaxDistPathToRoot

vector<TTreeIdx> CPhyloTreeMidpointDist::m_MaxDistPathToRoot
private

Definition at line 414 of file phylo_tree_algorithm.hpp.

Referenced by CPhyloTreeMidpointDist(), and x_OnStep().

◆ m_MaxPath

vector<TTreeIdx> CPhyloTreeMidpointDist::m_MaxPath
private

Path (set of nodes) that is the longest path in the tree.

Definition at line 418 of file phylo_tree_algorithm.hpp.

Referenced by GetLongest(), and x_OnStep().

◆ m_SortedMaxDistPathToRoot

vector<TTreeIdx> CPhyloTreeMidpointDist::m_SortedMaxDistPathToRoot
private

Definition at line 415 of file phylo_tree_algorithm.hpp.

Referenced by CPhyloTreeMidpointDist(), and x_OnStep().


The documentation for this class was generated from the following files:
Modified on Wed Jun 19 17:07:35 2024 by modify_doxy.py rev. 669887