bpp-phyl3  3.0.0
bpp::LegacyAncestralStateReconstruction Class Referenceabstract

Interface for ancestral states reconstruction methods. More...

#include <Bpp/Phyl/Legacy/AncestralStateReconstruction.h>

+ Inheritance diagram for bpp::LegacyAncestralStateReconstruction:

Public Member Functions

 LegacyAncestralStateReconstruction ()
 
virtual ~LegacyAncestralStateReconstruction ()
 
virtual std::vector< size_t > getAncestralStatesForNode (int nodeId) const =0
 Get ancestral states for a given node as a vector of int. More...
 
virtual std::map< int, std::vector< size_t > > getAllAncestralStates () const =0
 Get all ancestral states for all nodes. More...
 
virtual std::unique_ptr< SequencegetAncestralSequenceForNode (int nodeId) const =0
 Get the ancestral sequence for a given node. More...
 
virtual std::unique_ptr< SiteContainerInterfacegetAncestralSequences () const =0
 Get all the ancestral sequences for all nodes. More...
 

Detailed Description

Interface for ancestral states reconstruction methods.

Definition at line 23 of file AncestralStateReconstruction.h.

Constructor & Destructor Documentation

◆ LegacyAncestralStateReconstruction()

bpp::LegacyAncestralStateReconstruction::LegacyAncestralStateReconstruction ( )
inline

Definition at line 26 of file AncestralStateReconstruction.h.

◆ ~LegacyAncestralStateReconstruction()

virtual bpp::LegacyAncestralStateReconstruction::~LegacyAncestralStateReconstruction ( )
inlinevirtual

Definition at line 27 of file AncestralStateReconstruction.h.

Member Function Documentation

◆ getAllAncestralStates()

virtual std::map<int, std::vector<size_t> > bpp::LegacyAncestralStateReconstruction::getAllAncestralStates ( ) const
pure virtual

Get all ancestral states for all nodes.

Call the getAncestralSequenceForNode() method on each node in the tree.

Returns
A map with nodes id as key, and a vector of states indices as value.
See also
getAncestralSequenceForNode

Implemented in bpp::LegacyMarginalAncestralStateReconstruction.

◆ getAncestralSequenceForNode()

virtual std::unique_ptr<Sequence> bpp::LegacyAncestralStateReconstruction::getAncestralSequenceForNode ( int  nodeId) const
pure virtual

Get the ancestral sequence for a given node.

Parameters
nodeIdThe id of the node at which the sequence must be reconstructed.
Returns
A sequence object.

Implemented in bpp::LegacyMarginalAncestralStateReconstruction.

◆ getAncestralSequences()

virtual std::unique_ptr<SiteContainerInterface> bpp::LegacyAncestralStateReconstruction::getAncestralSequences ( ) const
pure virtual

Get all the ancestral sequences for all nodes.

Returns
A new SiteContainer object.

Implemented in bpp::LegacyMarginalAncestralStateReconstruction.

◆ getAncestralStatesForNode()

virtual std::vector<size_t> bpp::LegacyAncestralStateReconstruction::getAncestralStatesForNode ( int  nodeId) const
pure virtual

Get ancestral states for a given node as a vector of int.

The size of the vector depends on the implementation. This method is mainly for efficient internal use in other classes. Consider using the getAncestralSequenceForNode() method for a more general output.

Parameters
nodeIdthe id of the node at which the states must be reconstructed.
Returns
A vector of states indices.
See also
getAncestralSequenceForNode

Implemented in bpp::LegacyMarginalAncestralStateReconstruction.


The documentation for this class was generated from the following file: