NCBI C++ ToolKit
|
Search Toolkit Book for NJ_TreeAlgorithm
#include <algo/structure/cd_utils/cuSeqTreeNj.hpp>
Public Member Functions | |
NJ_TreeAlgorithm () | |
NJ_TreeAlgorithm (DistanceMatrix *dm) | |
virtual | ~NJ_TreeAlgorithm () |
virtual long | GetNumLoopsForTreeCalc () |
virtual void | ComputeTree (SeqTree *tree, pProgressFunction pFunc) |
virtual string | toString () |
virtual void | SetDistMat (DistanceMatrix *dm) |
Public Member Functions inherited from TreeAlgorithm | |
TreeAlgorithm (Rootedness rooted=DEF_ROOTED, ETreeMethod tmethod=eNoTreeMethod) | |
const SeqTree * | GetTree () const |
string | GetName () |
ETreeMethod | GetTreeMethod () |
void | SetRootedness (Rootedness rooted) |
Rootedness | GetRootedness () |
bool | isRooted () |
void | SetMidpointRooting (bool rooting) |
bool | useMidpointRooting () |
virtual | ~TreeAlgorithm () |
const DistanceMatrix * | GetDistMat () const |
Private Member Functions | |
void | initializeNodes () |
bool | isHub (const TSeqIt &sit) |
bool | isInternal (const TSeqIt &sit) |
int | numChildren (const TSeqIt &sit) |
void | Join (int inode1, int inode2, double len1, double len2) |
Private Attributes | |
int | m_nseqs |
int | m_nextNode |
vector< SeqItem * > | m_items |
TTreeIt | m_seqiters |
Static Private Attributes | |
static const double | REPLACE_NEG_DIST = 0.001 |
static const Rootedness | MY_ROOTEDNESS = TreeAlgorithm::eUnrooted |
static const ETreeMethod | MY_TREE_METHOD = eNJ |
static const DistanceMatrix::TMatType | INIT_MINIMA = kMax_Double |
static const int | USED_ROW = -1 |
static const int | BAD_INDEX = -1 |
Additional Inherited Members | |
Public Types inherited from TreeAlgorithm | |
enum | Rootedness { eUnrooted =0 , eRooted =1 , eMidpointRooted =2 } |
typedef SeqTree::iterator | TSeqIt |
typedef SeqTree::sibling_iterator | TChildIt |
typedef vector< TSeqIt > | TTreeIt |
Protected Member Functions inherited from TreeAlgorithm | |
void | midpointRootIfNeeded () |
Protected Attributes inherited from TreeAlgorithm | |
SeqTree * | m_tree |
DistanceMatrix * | m_dm |
Rootedness | m_rootedness |
ETreeMethod | m_tmethod |
Definition at line 47 of file cuSeqTreeNj.hpp.
NJ_TreeAlgorithm::NJ_TreeAlgorithm | ( | ) |
Definition at line 52 of file cuSeqTreeNj.cpp.
References initializeNodes(), TreeAlgorithm::m_dm, and NULL.
NJ_TreeAlgorithm::NJ_TreeAlgorithm | ( | DistanceMatrix * | dm | ) |
Definition at line 59 of file cuSeqTreeNj.cpp.
References initializeNodes(), and TreeAlgorithm::m_dm.
|
virtual |
Definition at line 143 of file cuSeqTreeNj.cpp.
References i, m_items, m_nseqs, and m_seqiters.
|
virtual |
Implements TreeAlgorithm.
Definition at line 229 of file cuSeqTreeNj.cpp.
References tree< T, tree_node_allocator >::append_child(), assert, tree< T, tree_node_allocator >::begin(), tree< T, tree_node_allocator >::clear(), count, DistanceMatrix::EnforceSymmetry(), AMatrix_base::FastGet(), GetNumLoopsForTreeCalc(), i, INIT_MINIMA, tree< T, tree_node_allocator >::insert(), is_valid(), Join(), l(), TreeAlgorithm::m_dm, m_items, m_nextNode, m_nseqs, m_seqiters, TreeAlgorithm::m_tree, TreeAlgorithm::midpointRootIfNeeded(), NULL, REPLACE_NEG_DIST, tmp, and USED_ROW.
|
virtual |
Implements TreeAlgorithm.
Definition at line 202 of file cuSeqTreeNj.cpp.
References count, i, m_nseqs, and USED_ROW.
Referenced by ComputeTree().
|
private |
Definition at line 98 of file cuSeqTreeNj.cpp.
References AMatrix_base::GetNumCols(), AMatrix_base::GetNumRows(), i, NStr::IntToString(), TreeAlgorithm::m_dm, m_items, m_nextNode, m_nseqs, m_seqiters, SeqItem::name, and NULL.
Referenced by NJ_TreeAlgorithm(), and SetDistMat().
Definition at line 99 of file cuSeqTreeNj.hpp.
References tree< T, tree_node_allocator >::iterator_base::is_valid(), and isHub().
Definition at line 153 of file cuSeqTreeNj.cpp.
References tree< T, tree_node_allocator >::append_child(), tree< T, tree_node_allocator >::iterator_base::is_valid(), m_items, m_nextNode, m_nseqs, m_seqiters, TreeAlgorithm::m_tree, tree< T, tree_node_allocator >::parent(), tree< T, tree_node_allocator >::reparent(), and USED_ROW.
Referenced by ComputeTree().
Definition at line 471 of file cuSeqTreeNj.cpp.
References tree< T, tree_node_allocator >::iterator_base::is_valid(), TreeAlgorithm::m_tree, n, and tree< T, tree_node_allocator >::number_of_children().
|
virtual |
Reimplemented from TreeAlgorithm.
Definition at line 67 of file cuSeqTreeNj.cpp.
References initializeNodes(), and TreeAlgorithm::m_dm.
|
virtual |
Reimplemented from TreeAlgorithm.
Definition at line 481 of file cuSeqTreeNj.cpp.
References TreeAlgorithm::m_tree, and CdTreeStream::toNestedString().
Definition at line 72 of file cuSeqTreeNj.hpp.
|
staticprivate |
Definition at line 52 of file cuSeqTreeNj.hpp.
Referenced by ComputeTree().
|
private |
Definition at line 86 of file cuSeqTreeNj.hpp.
Referenced by ComputeTree(), initializeNodes(), Join(), and ~NJ_TreeAlgorithm().
|
private |
Definition at line 85 of file cuSeqTreeNj.hpp.
Referenced by ComputeTree(), initializeNodes(), and Join().
|
private |
Definition at line 84 of file cuSeqTreeNj.hpp.
Referenced by ComputeTree(), GetNumLoopsForTreeCalc(), initializeNodes(), Join(), and ~NJ_TreeAlgorithm().
|
private |
Definition at line 87 of file cuSeqTreeNj.hpp.
Referenced by ComputeTree(), initializeNodes(), isHub(), Join(), and ~NJ_TreeAlgorithm().
|
staticprivate |
Definition at line 50 of file cuSeqTreeNj.hpp.
|
staticprivate |
Definition at line 51 of file cuSeqTreeNj.hpp.
|
staticprivate |
Definition at line 49 of file cuSeqTreeNj.hpp.
Referenced by ComputeTree().
Definition at line 71 of file cuSeqTreeNj.hpp.
Referenced by ComputeTree(), GetNumLoopsForTreeCalc(), and Join().