bppphyl
2.4.0

Interface for Nearest Neighbor Interchanges algorithms. More...
#include <Bpp/Phyl/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 &  getTopology () 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 96 of file NNISearchable.h.

inline 
Definition at line 101 of file NNISearchable.h.

inlinevirtual 
Definition at line 102 of file NNISearchable.h.
References clone(), doNNI(), getTopology(), getTopologyValue(), and testNNI().

pure virtual 
Implements bpp::Clonable.
Implemented in bpp::NNIHomogeneousTreeLikelihood, and bpp::DRTreeParsimonyScore.
Referenced by bpp::NNITopologySearch::searchPhyML(), and ~NNISearchable().

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::NNIHomogeneousTreeLikelihood, and bpp::DRTreeParsimonyScore.
Referenced by ~NNISearchable().

pure virtual 
Get the tree associated to this NNISearchable object.
Implemented in bpp::NNIHomogeneousTreeLikelihood, and bpp::DRTreeParsimonyScore.
Referenced by bpp::NNITopologySearch::getTopology(), and ~NNISearchable().

pure virtual 
Get the current score of this NNISearchable object.
Implemented in bpp::NNIHomogeneousTreeLikelihood, and bpp::DRTreeParsimonyScore.
Referenced by ~NNISearchable().

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::NNIHomogeneousTreeLikelihood, and bpp::DRTreeParsimonyScore.
Referenced by ~NNISearchable().

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 103 of file TopologySearch.h.

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::NNITopologyListener2, bpp::NNIHomogeneousTreeLikelihood, bpp::NNITopologyListener, and bpp::DRTreeParsimonyScore.

pure virtualinherited 
Notify a topology change event.
event  The topology change event. 
Implemented in bpp::NNITopologyListener2, bpp::NNIHomogeneousTreeLikelihood, bpp::NNITopologyListener, and bpp::DRTreeParsimonyScore.