bpp-phyl3
3.0.0
|
Interface for Nearest Neighbor Interchanges algorithms. More...
#include <Bpp/Phyl/Tree/NNISearchable.h>
Public Member Functions | |
NNISearchable () | |
virtual | ~NNISearchable () |
virtual NNISearchable * | clone () const =0 |
virtual double | testNNI (int nodeId) const =0 |
Send the score of a NNI movement, without performing it. More... | |
virtual void | doNNI (int nodeId)=0 |
Perform a NNI movement. More... | |
virtual const Tree & | topology () const =0 |
Get the tree associated to this NNISearchable object. More... | |
virtual double | getTopologyValue () const =0 |
Get the current score of this NNISearchable object. More... | |
virtual void | topologyChangePerformed (const TopologyChangeEvent &event) |
Notify a topology change event. More... | |
virtual void | topologyChangeTested (const TopologyChangeEvent &event)=0 |
Notify a topology change event. More... | |
virtual void | topologyChangeSuccessful (const TopologyChangeEvent &event)=0 |
Tell that a topology change is definitive. More... | |
Interface for Nearest Neighbor Interchanges algorithms.
This interface defines the methods to work with NNI algorithms.
NNISearchable objects are supposed to work with TreeTemplate objects. NNI are defined as follow:
-------------> +------- C | D --+ X +-- B | | +----+ F | +-- A
Where: -F is the focus (parent) node, -A and B are the son of F -X is the parent of F and so on. Two NNI's are possible for branch (XF):
For unrooted tree, we have at the 'root' node:
-------------> +------- D | X +------- C | | +-- B | | +----+ F | +-- A
In this case, we swap A or B with one of C or D. Which one of C or D depends on the implementation, but will always be the same, so that swapping A or B involve 2 distinct NNI.
Definition at line 60 of file NNISearchable.h.
|
inline |
Definition at line 65 of file NNISearchable.h.
|
inlinevirtual |
Definition at line 66 of file NNISearchable.h.
|
pure virtual |
Implements bpp::Clonable.
Implemented in bpp::DRTreeParsimonyScore, and bpp::NNIHomogeneousTreeLikelihood.
Referenced by bpp::NNITopologySearch::searchPhyML().
|
pure virtual |
Perform a NNI movement.
nodeId | The id of the node defining the NNI movement. |
NodeException | If the node does not define a valid NNI. |
Implemented in bpp::DRTreeParsimonyScore, and bpp::NNIHomogeneousTreeLikelihood.
|
pure virtual |
Get the current score of this NNISearchable object.
Implemented in bpp::DRTreeParsimonyScore, and bpp::NNIHomogeneousTreeLikelihood.
|
pure virtual |
Send the score of a NNI movement, without performing it.
This methods sends the score variation. This variation must be negative if the new point is better, i.e. the object is to be used with a minimizing optimization (for consistence with Optimizer objects).
nodeId | The id of the node defining the NNI movement. |
NodeException | If the node does not define a valid NNI. |
Implemented in bpp::DRTreeParsimonyScore, and bpp::NNIHomogeneousTreeLikelihood.
|
pure virtual |
Get the tree associated to this NNISearchable object.
Implemented in bpp::DRTreeParsimonyScore, and bpp::NNIHomogeneousTreeLikelihood.
|
inlinevirtualinherited |
Notify a topology change event.
This method is to be invoked after one or several NNI are performed. It allows appropriate recomputations.
In most case, this is the same as topologyChangeTested() + topologyChangeSuccessful().
event | The topology change event. |
Definition at line 67 of file TopologySearch.h.
References bpp::TopologyListener::topologyChangeSuccessful(), and bpp::TopologyListener::topologyChangeTested().
|
pure virtualinherited |
Tell that a topology change is definitive.
This method is called after the topologyChangeTested() method.
event | The topology change event. |
Implemented in bpp::DRTreeParsimonyScore, bpp::NNIHomogeneousTreeLikelihood, bpp::NNITopologyListener2, and bpp::NNITopologyListener.
Referenced by bpp::TopologyListener::topologyChangePerformed().
|
pure virtualinherited |
Notify a topology change event.
event | The topology change event. |
Implemented in bpp::DRTreeParsimonyScore, bpp::NNIHomogeneousTreeLikelihood, bpp::NNITopologyListener2, and bpp::NNITopologyListener.
Referenced by bpp::TopologyListener::topologyChangePerformed().