bpp-phyl3  3.0.0
bpp::DRASDRTreeLikelihoodNodeData Class Reference

Likelihood data structure for a node. More...

#include <Bpp/Phyl/Legacy/Likelihood/DRASDRTreeLikelihoodData.h>

+ Inheritance diagram for bpp::DRASDRTreeLikelihoodNodeData:
+ Collaboration diagram for bpp::DRASDRTreeLikelihoodNodeData:

Public Member Functions

 DRASDRTreeLikelihoodNodeData ()
 
 DRASDRTreeLikelihoodNodeData (const DRASDRTreeLikelihoodNodeData &data)
 
DRASDRTreeLikelihoodNodeDataoperator= (const DRASDRTreeLikelihoodNodeData &data)
 
virtual ~DRASDRTreeLikelihoodNodeData ()
 
DRASDRTreeLikelihoodNodeDataclone () const
 
const NodegetNode () const
 Get the node associated to this data structure. More...
 
void setNode (const Node *node)
 Set the node associated to this data. More...
 
const std::map< int, VVVdouble > & getLikelihoodArrays () const
 
std::map< int, VVVdouble > & getLikelihoodArrays ()
 
VVVdoublegetLikelihoodArrayForNeighbor (int neighborId)
 
const VVVdoublegetLikelihoodArrayForNeighbor (int neighborId) const
 
VdoublegetDLikelihoodArray ()
 
const VdoublegetDLikelihoodArray () const
 
VdoublegetD2LikelihoodArray ()
 
const VdoublegetD2LikelihoodArrayForNeighbor () const
 
bool isNeighbor (int neighborId) const
 
void eraseNeighborArrays ()
 

Private Attributes

std::map< int, VVVdoublenodeLikelihoods_
 This contains all likelihood values used for computation. More...
 
Vdouble nodeDLikelihoods_
 This contains all likelihood first order derivatives values used for computation. More...
 
Vdouble nodeD2Likelihoods_
 This contains all likelihood second order derivatives values used for computation. More...
 
const Nodenode_
 

Detailed Description

Likelihood data structure for a node.

This class is for use with the DRASDRTreeLikelihoodData class.

Store for each neighbor node an array with conditional likelihoods.

See also
DRASDRTreeLikelihoodData

Definition at line 72 of file DRASDRTreeLikelihoodData.h.

Constructor & Destructor Documentation

◆ DRASDRTreeLikelihoodNodeData() [1/2]

bpp::DRASDRTreeLikelihoodNodeData::DRASDRTreeLikelihoodNodeData ( )
inline

Definition at line 115 of file DRASDRTreeLikelihoodData.h.

Referenced by clone().

◆ DRASDRTreeLikelihoodNodeData() [2/2]

bpp::DRASDRTreeLikelihoodNodeData::DRASDRTreeLikelihoodNodeData ( const DRASDRTreeLikelihoodNodeData data)
inline

Definition at line 117 of file DRASDRTreeLikelihoodData.h.

◆ ~DRASDRTreeLikelihoodNodeData()

virtual bpp::DRASDRTreeLikelihoodNodeData::~DRASDRTreeLikelihoodNodeData ( )
inlinevirtual

Definition at line 133 of file DRASDRTreeLikelihoodData.h.

Member Function Documentation

◆ clone()

DRASDRTreeLikelihoodNodeData* bpp::DRASDRTreeLikelihoodNodeData::clone ( ) const
inlinevirtual

◆ eraseNeighborArrays()

void bpp::DRASDRTreeLikelihoodNodeData::eraseNeighborArrays ( )
inline

◆ getD2LikelihoodArray()

Vdouble& bpp::DRASDRTreeLikelihoodNodeData::getD2LikelihoodArray ( )
inline

◆ getD2LikelihoodArrayForNeighbor()

const Vdouble& bpp::DRASDRTreeLikelihoodNodeData::getD2LikelihoodArrayForNeighbor ( ) const
inline

Definition at line 165 of file DRASDRTreeLikelihoodData.h.

References nodeD2Likelihoods_.

◆ getDLikelihoodArray() [1/2]

Vdouble& bpp::DRASDRTreeLikelihoodNodeData::getDLikelihoodArray ( )
inline

◆ getDLikelihoodArray() [2/2]

const Vdouble& bpp::DRASDRTreeLikelihoodNodeData::getDLikelihoodArray ( ) const
inline

Definition at line 161 of file DRASDRTreeLikelihoodData.h.

References nodeDLikelihoods_.

◆ getLikelihoodArrayForNeighbor() [1/2]

VVVdouble& bpp::DRASDRTreeLikelihoodNodeData::getLikelihoodArrayForNeighbor ( int  neighborId)
inline

◆ getLikelihoodArrayForNeighbor() [2/2]

const VVVdouble& bpp::DRASDRTreeLikelihoodNodeData::getLikelihoodArrayForNeighbor ( int  neighborId) const
inline

Definition at line 154 of file DRASDRTreeLikelihoodData.h.

References nodeLikelihoods_.

◆ getLikelihoodArrays() [1/2]

std::map<int, VVVdouble>& bpp::DRASDRTreeLikelihoodNodeData::getLikelihoodArrays ( )
inline

Definition at line 147 of file DRASDRTreeLikelihoodData.h.

References nodeLikelihoods_.

◆ getLikelihoodArrays() [2/2]

const std::map<int, VVVdouble>& bpp::DRASDRTreeLikelihoodNodeData::getLikelihoodArrays ( ) const
inline

◆ getNode()

const Node* bpp::DRASDRTreeLikelihoodNodeData::getNode ( ) const
inlinevirtual

Get the node associated to this data structure.

Returns
The node associated to this structure.

Implements bpp::TreeLikelihoodNodeData.

Definition at line 141 of file DRASDRTreeLikelihoodData.h.

References node_.

◆ isNeighbor()

bool bpp::DRASDRTreeLikelihoodNodeData::isNeighbor ( int  neighborId) const
inline

Definition at line 167 of file DRASDRTreeLikelihoodData.h.

References nodeLikelihoods_.

◆ operator=()

DRASDRTreeLikelihoodNodeData& bpp::DRASDRTreeLikelihoodNodeData::operator= ( const DRASDRTreeLikelihoodNodeData data)
inline

◆ setNode()

void bpp::DRASDRTreeLikelihoodNodeData::setNode ( const Node node)
inlinevirtual

Set the node associated to this data.

A pointer toward this node will be created and associated to this data.

Parameters
nodeThe node to be associated to this data.

Implements bpp::TreeLikelihoodNodeData.

Definition at line 143 of file DRASDRTreeLikelihoodData.h.

References node_.

Referenced by bpp::DRASDRTreeLikelihoodData::initLikelihoods(), and bpp::DRASDRTreeLikelihoodData::reInit().

Member Data Documentation

◆ node_

const Node* bpp::DRASDRTreeLikelihoodNodeData::node_
private

Definition at line 112 of file DRASDRTreeLikelihoodData.h.

Referenced by getNode(), operator=(), and setNode().

◆ nodeD2Likelihoods_

Vdouble bpp::DRASDRTreeLikelihoodNodeData::nodeD2Likelihoods_
mutableprivate

This contains all likelihood second order derivatives values used for computation.

  x[i]
|---------> Site i
  

We call this the d2Likelihood array for each node.

Definition at line 110 of file DRASDRTreeLikelihoodData.h.

Referenced by eraseNeighborArrays(), getD2LikelihoodArray(), getD2LikelihoodArrayForNeighbor(), and operator=().

◆ nodeDLikelihoods_

Vdouble bpp::DRASDRTreeLikelihoodNodeData::nodeDLikelihoods_
mutableprivate

This contains all likelihood first order derivatives values used for computation.

x[i]
  |---------> Site i

We call this the dLikelihood array for each node.

Definition at line 99 of file DRASDRTreeLikelihoodData.h.

Referenced by eraseNeighborArrays(), getDLikelihoodArray(), and operator=().

◆ nodeLikelihoods_

std::map<int, VVVdouble> bpp::DRASDRTreeLikelihoodNodeData::nodeLikelihoods_
mutableprivate

This contains all likelihood values used for computation.

x[b][i][c][s]
  |------------> Neighbor node of n (id)
    |---------> Site i
        |------> Rate class c
           |---> Ancestral state s

We call this the likelihood array for each node.

Definition at line 89 of file DRASDRTreeLikelihoodData.h.

Referenced by eraseNeighborArrays(), getLikelihoodArrayForNeighbor(), getLikelihoodArrays(), isNeighbor(), and operator=().


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