|
bpp-phyl
2.1.0
|
NNI topology search method. More...
#include <Bpp/Phyl/NNITopologySearch.h>
Inheritance diagram for bpp::NNITopologySearch:
Collaboration diagram for bpp::NNITopologySearch:Public Member Functions | |
| NNITopologySearch (NNISearchable &tree, const std::string &algorithm=FAST, unsigned int verbose=2) | |
| NNITopologySearch (const NNITopologySearch &ts) | |
| NNITopologySearch & | operator= (const NNITopologySearch &ts) |
| virtual | ~NNITopologySearch () |
| void | search () throw (Exception) |
| Performs the search. | |
| void | addTopologyListener (TopologyListener *listener) |
| Add a listener to the list. | |
| const Tree & | getTopology () const |
| Retrieve the tree. | |
| NNISearchable * | getSearchableObject () |
| const NNISearchable * | getSearchableObject () const |
Static Public Attributes | |
| static const std::string | FAST = "Fast" |
| static const std::string | BETTER = "Better" |
| static const std::string | PHYML = "PhyML" |
Protected Member Functions | |
| void | searchFast () throw (Exception) |
| void | searchBetter () throw (Exception) |
| void | searchPhyML () throw (Exception) |
| void | notifyAllPerformed (const TopologyChangeEvent &event) |
| Process a TopologyChangeEvent to all listeners. | |
| void | notifyAllTested (const TopologyChangeEvent &event) |
| Process a TopologyChangeEvent to all listeners. | |
| void | notifyAllSuccessful (const TopologyChangeEvent &event) |
| Process a TopologyChangeEvent to all listeners. | |
Private Attributes | |
| NNISearchable * | searchableTree_ |
| std::string | algorithm_ |
| unsigned int | verbose_ |
| std::vector< TopologyListener * > | topoListeners_ |
NNI topology search method.
Several algorithm are implemented:
Definition at line 61 of file NNITopologySearch.h.
| bpp::NNITopologySearch::NNITopologySearch | ( | NNISearchable & | tree, |
| const std::string & | algorithm = FAST, |
||
| unsigned int | verbose = 2 |
||
| ) | [inline] |
Definition at line 76 of file NNITopologySearch.h.
| bpp::NNITopologySearch::NNITopologySearch | ( | const NNITopologySearch & | ts | ) | [inline] |
Definition at line 83 of file NNITopologySearch.h.
References topoListeners_.
| virtual bpp::NNITopologySearch::~NNITopologySearch | ( | ) | [inline, virtual] |
Definition at line 107 of file NNITopologySearch.h.
References topoListeners_.
| void bpp::NNITopologySearch::addTopologyListener | ( | TopologyListener * | listener | ) | [inline, virtual] |
Add a listener to the list.
All listeners will be notified in the order of the list. The first listener to be notified is the NNISearchable object itself.
The listener will be owned by this instance, and copied when needed.
Implements bpp::TopologySearch.
Definition at line 126 of file NNITopologySearch.h.
References topoListeners_.
Referenced by bpp::OptimizationTools::optimizeTreeNNI(), and bpp::OptimizationTools::optimizeTreeNNI2().
| NNISearchable* bpp::NNITopologySearch::getSearchableObject | ( | ) | [inline] |
Definition at line 143 of file NNITopologySearch.h.
References searchableTree_.
Referenced by bpp::OptimizationTools::optimizeTreeNNI(), and bpp::OptimizationTools::optimizeTreeNNI2().
| const NNISearchable* bpp::NNITopologySearch::getSearchableObject | ( | ) | const [inline] |
Definition at line 147 of file NNITopologySearch.h.
References searchableTree_.
| const Tree& bpp::NNITopologySearch::getTopology | ( | ) | const [inline] |
Retrieve the tree.
Definition at line 138 of file NNITopologySearch.h.
References bpp::NNISearchable::getTopology(), and searchableTree_.
| void NNITopologySearch::notifyAllPerformed | ( | const TopologyChangeEvent & | event | ) | [protected] |
Process a TopologyChangeEvent to all listeners.
Definition at line 58 of file NNITopologySearch.cpp.
| void NNITopologySearch::notifyAllSuccessful | ( | const TopologyChangeEvent & | event | ) | [protected] |
Process a TopologyChangeEvent to all listeners.
Definition at line 76 of file NNITopologySearch.cpp.
| void NNITopologySearch::notifyAllTested | ( | const TopologyChangeEvent & | event | ) | [protected] |
Process a TopologyChangeEvent to all listeners.
Definition at line 67 of file NNITopologySearch.cpp.
| NNITopologySearch& bpp::NNITopologySearch::operator= | ( | const NNITopologySearch & | ts | ) | [inline] |
Definition at line 94 of file NNITopologySearch.h.
References algorithm_, searchableTree_, topoListeners_, and verbose_.
| void NNITopologySearch::search | ( | ) | throw (Exception) [virtual] |
Performs the search.
Implements bpp::TopologySearch.
Definition at line 85 of file NNITopologySearch.cpp.
Referenced by bpp::OptimizationTools::optimizeTreeNNI(), and bpp::OptimizationTools::optimizeTreeNNI2().
| void NNITopologySearch::searchBetter | ( | ) | throw (Exception) [protected] |
Definition at line 149 of file NNITopologySearch.cpp.
References bpp::ApplicationTools::displayResult(), bpp::ApplicationTools::displayTask(), bpp::ApplicationTools::displayTaskDone(), bpp::OutputStream::endLine(), bpp::Node::getFather(), bpp::Node::getId(), bpp::TreeTemplate< N >::getNodes(), bpp::ApplicationTools::message, bpp::TextTools::toString(), and bpp::VectorTools::whichMin().
| void NNITopologySearch::searchFast | ( | ) | throw (Exception) [protected] |
Definition at line 97 of file NNITopologySearch.cpp.
References bpp::ApplicationTools::displayResult(), bpp::Node::getFather(), bpp::Node::getId(), bpp::TreeTemplate< N >::getNodes(), and bpp::TextTools::toString().
| void NNITopologySearch::searchPhyML | ( | ) | throw (Exception) [protected] |
Definition at line 214 of file NNITopologySearch.cpp.
References bpp::NNISearchable::clone(), bpp::ApplicationTools::displayMessage(), bpp::ApplicationTools::displayResult(), bpp::ApplicationTools::displayTask(), bpp::ApplicationTools::displayTaskDone(), bpp::OutputStream::endLine(), bpp::Node::getFather(), bpp::Node::getId(), bpp::TreeTemplate< N >::getNodes(), bpp::ApplicationTools::message, and bpp::TextTools::toString().
std::string bpp::NNITopologySearch::algorithm_ [private] |
Definition at line 71 of file NNITopologySearch.h.
Referenced by operator=().
const string NNITopologySearch::BETTER = "Better" [static] |
Definition at line 66 of file NNITopologySearch.h.
Referenced by bpp::PhylogeneticsApplicationTools::optimizeParameters().
const string NNITopologySearch::FAST = "Fast" [static] |
Definition at line 65 of file NNITopologySearch.h.
Referenced by bpp::PhylogeneticsApplicationTools::optimizeParameters().
const string NNITopologySearch::PHYML = "PhyML" [static] |
Definition at line 67 of file NNITopologySearch.h.
Referenced by bpp::PhylogeneticsApplicationTools::optimizeParameters(), and bpp::OptimizationTools::optimizeTreeNNI().
Definition at line 70 of file NNITopologySearch.h.
Referenced by getSearchableObject(), getTopology(), and operator=().
std::vector<TopologyListener*> bpp::NNITopologySearch::topoListeners_ [private] |
Definition at line 73 of file NNITopologySearch.h.
Referenced by addTopologyListener(), NNITopologySearch(), operator=(), and ~NNITopologySearch().
unsigned int bpp::NNITopologySearch::verbose_ [private] |
Definition at line 72 of file NNITopologySearch.h.
Referenced by operator=().