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

Search Toolkit Book for SLC_TreeAlgorithm

#include <algo/structure/cd_utils/cuSeqTreeSlc.hpp>

+ Inheritance diagram for SLC_TreeAlgorithm:
+ Collaboration diagram for SLC_TreeAlgorithm:

Public Member Functions

 SLC_TreeAlgorithm ()
 
 SLC_TreeAlgorithm (DistanceMatrix *dm)
 
virtual ~SLC_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 SeqTreeGetTree () const
 
string GetName ()
 
ETreeMethod GetTreeMethod ()
 
void SetRootedness (Rootedness rooted)
 
Rootedness GetRootedness ()
 
bool isRooted ()
 
void SetMidpointRooting (bool rooting)
 
bool useMidpointRooting ()
 
virtual ~TreeAlgorithm ()
 
const DistanceMatrixGetDistMat () 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::eRooted
 
static const DistanceMatrix::TMatType INIT_MINIMA = kMax_Double
 
static const ETreeMethod MY_TREE_METHOD = eSLC
 
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< TSeqItTTreeIt
 
- Protected Member Functions inherited from TreeAlgorithm
void midpointRootIfNeeded ()
 
- Protected Attributes inherited from TreeAlgorithm
SeqTreem_tree
 
DistanceMatrixm_dm
 
Rootedness m_rootedness
 
ETreeMethod m_tmethod
 

Detailed Description

Definition at line 49 of file cuSeqTreeSlc.hpp.

Constructor & Destructor Documentation

◆ SLC_TreeAlgorithm() [1/2]

SLC_TreeAlgorithm::SLC_TreeAlgorithm ( )

Definition at line 53 of file cuSeqTreeSlc.cpp.

References initializeNodes(), TreeAlgorithm::m_dm, and NULL.

◆ SLC_TreeAlgorithm() [2/2]

SLC_TreeAlgorithm::SLC_TreeAlgorithm ( DistanceMatrix dm)

Definition at line 60 of file cuSeqTreeSlc.cpp.

References initializeNodes(), and TreeAlgorithm::m_dm.

◆ ~SLC_TreeAlgorithm()

SLC_TreeAlgorithm::~SLC_TreeAlgorithm ( )
virtual

Definition at line 142 of file cuSeqTreeSlc.cpp.

References i, m_items, m_nseqs, and m_seqiters.

Member Function Documentation

◆ ComputeTree()

void SLC_TreeAlgorithm::ComputeTree ( SeqTree tree,
pProgressFunction  pFunc 
)
virtual

◆ GetNumLoopsForTreeCalc()

long SLC_TreeAlgorithm::GetNumLoopsForTreeCalc ( )
virtual

Implements TreeAlgorithm.

Definition at line 216 of file cuSeqTreeSlc.cpp.

References i, m_nseqs, and USED_ROW.

Referenced by ComputeTree().

◆ initializeNodes()

void SLC_TreeAlgorithm::initializeNodes ( )
private

◆ isHub()

bool SLC_TreeAlgorithm::isHub ( const TSeqIt sit)
inlineprivate

Definition at line 97 of file cuSeqTreeSlc.hpp.

References m_seqiters.

Referenced by isInternal().

◆ isInternal()

bool SLC_TreeAlgorithm::isInternal ( const TSeqIt sit)
inlineprivate

◆ Join()

void SLC_TreeAlgorithm::Join ( int  inode1,
int  inode2,
double  len1,
double  len2 
)
private

◆ numChildren()

int SLC_TreeAlgorithm::numChildren ( const TSeqIt sit)
private

◆ SetDistMat()

void SLC_TreeAlgorithm::SetDistMat ( DistanceMatrix dm)
virtual

Reimplemented from TreeAlgorithm.

Definition at line 68 of file cuSeqTreeSlc.cpp.

References initializeNodes(), and TreeAlgorithm::m_dm.

◆ toString()

string SLC_TreeAlgorithm::toString ( )
virtual

Reimplemented from TreeAlgorithm.

Definition at line 405 of file cuSeqTreeSlc.cpp.

References TreeAlgorithm::m_tree, and CdTreeStream::toNestedString().

Member Data Documentation

◆ BAD_INDEX

const int SLC_TreeAlgorithm::BAD_INDEX = -1
staticprivate

Definition at line 75 of file cuSeqTreeSlc.hpp.

◆ INIT_MINIMA

const DistanceMatrix::TMatType SLC_TreeAlgorithm::INIT_MINIMA = kMax_Double
staticprivate

Definition at line 53 of file cuSeqTreeSlc.hpp.

Referenced by ComputeTree().

◆ m_items

vector< SeqItem* > SLC_TreeAlgorithm::m_items
private

Definition at line 89 of file cuSeqTreeSlc.hpp.

Referenced by ComputeTree(), initializeNodes(), Join(), and ~SLC_TreeAlgorithm().

◆ m_nextNode

int SLC_TreeAlgorithm::m_nextNode
private

Definition at line 88 of file cuSeqTreeSlc.hpp.

Referenced by ComputeTree(), initializeNodes(), and Join().

◆ m_nseqs

int SLC_TreeAlgorithm::m_nseqs
private

◆ m_seqiters

TTreeIt SLC_TreeAlgorithm::m_seqiters
private

Definition at line 90 of file cuSeqTreeSlc.hpp.

Referenced by ComputeTree(), initializeNodes(), isHub(), Join(), and ~SLC_TreeAlgorithm().

◆ MY_ROOTEDNESS

const TreeAlgorithm::Rootedness SLC_TreeAlgorithm::MY_ROOTEDNESS = TreeAlgorithm::eRooted
staticprivate

Definition at line 52 of file cuSeqTreeSlc.hpp.

◆ MY_TREE_METHOD

const ETreeMethod SLC_TreeAlgorithm::MY_TREE_METHOD = eSLC
staticprivate

Definition at line 54 of file cuSeqTreeSlc.hpp.

◆ REPLACE_NEG_DIST

const double SLC_TreeAlgorithm::REPLACE_NEG_DIST = 0.001
staticprivate

Definition at line 51 of file cuSeqTreeSlc.hpp.

Referenced by ComputeTree().

◆ USED_ROW

const int SLC_TreeAlgorithm::USED_ROW = -1
staticprivate

Definition at line 74 of file cuSeqTreeSlc.hpp.

Referenced by ComputeTree(), GetNumLoopsForTreeCalc(), and Join().


The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:08:29 2024 by modify_doxy.py rev. 669887