bpp-phyl  2.2.0
bpp::DRTreeParsimonyNodeData Class Reference

Parsimony data structure for a node. More...

#include <Bpp/Phyl/Parsimony/DRTreeParsimonyData.h>

+ Inheritance diagram for bpp::DRTreeParsimonyNodeData:
+ Collaboration diagram for bpp::DRTreeParsimonyNodeData:

Public Member Functions

 DRTreeParsimonyNodeData ()
 
 DRTreeParsimonyNodeData (const DRTreeParsimonyNodeData &tpnd)
 
DRTreeParsimonyNodeDataoperator= (const DRTreeParsimonyNodeData &tpnd)
 
DRTreeParsimonyNodeDataclone () 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...
 
std::vector< Bitset > & getBitsetsArrayForNeighbor (int neighborId)
 
const std::vector< Bitset > & getBitsetsArrayForNeighbor (int neighborId) const
 
std::vector< unsigned int > & getScoresArrayForNeighbor (int neighborId)
 
const std::vector< unsigned int > & getScoresArrayForNeighbor (int neighborId) const
 
bool isNeighbor (int neighborId) const
 
void eraseNeighborArrays ()
 

Private Attributes

std::map< int, std::vector< Bitset > > nodeBitsets_
 
std::map< int, std::vector< unsigned int > > nodeScores_
 
const Nodenode_
 

Detailed Description

Parsimony data structure for a node.

This class is for use with the DRTreeParsimonyData class.

Store for each neighbor node

  • a vector of bitsets,
  • a vector of score for the corresponding subtree.
See also
DRTreeParsimonyData

Definition at line 68 of file DRTreeParsimonyData.h.

Constructor & Destructor Documentation

◆ DRTreeParsimonyNodeData() [1/2]

bpp::DRTreeParsimonyNodeData::DRTreeParsimonyNodeData ( )
inline

Definition at line 77 of file DRTreeParsimonyData.h.

Referenced by clone().

◆ DRTreeParsimonyNodeData() [2/2]

bpp::DRTreeParsimonyNodeData::DRTreeParsimonyNodeData ( const DRTreeParsimonyNodeData tpnd)
inline

Definition at line 83 of file DRTreeParsimonyData.h.

Member Function Documentation

◆ clone()

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

Implements bpp::TreeParsimonyNodeData.

Definition at line 97 of file DRTreeParsimonyData.h.

References DRTreeParsimonyNodeData().

◆ eraseNeighborArrays()

void bpp::DRTreeParsimonyNodeData::eraseNeighborArrays ( )
inline

◆ getBitsetsArrayForNeighbor() [1/2]

◆ getBitsetsArrayForNeighbor() [2/2]

const std::vector<Bitset>& bpp::DRTreeParsimonyNodeData::getBitsetsArrayForNeighbor ( int  neighborId) const
inline

Definition at line 108 of file DRTreeParsimonyData.h.

References nodeBitsets_.

◆ getNode()

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

Get the node associated to this data structure.

Returns
The node associated to this structure.

Implements bpp::TreeParsimonyNodeData.

Definition at line 100 of file DRTreeParsimonyData.h.

References node_.

Referenced by bpp::DRTreeParsimonyScore::computeScoresForNode(), bpp::DRTreeParsimonyScore::computeScoresPostorderForNode(), and bpp::DRTreeParsimonyScore::computeScoresPreorderForNode().

◆ getScoresArrayForNeighbor() [1/2]

◆ getScoresArrayForNeighbor() [2/2]

const std::vector<unsigned int>& bpp::DRTreeParsimonyNodeData::getScoresArrayForNeighbor ( int  neighborId) const
inline

Definition at line 116 of file DRTreeParsimonyData.h.

References nodeScores_.

◆ isNeighbor()

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

Definition at line 121 of file DRTreeParsimonyData.h.

References nodeBitsets_.

◆ operator=()

DRTreeParsimonyNodeData& bpp::DRTreeParsimonyNodeData::operator= ( const DRTreeParsimonyNodeData tpnd)
inline

Definition at line 89 of file DRTreeParsimonyData.h.

References node_, nodeBitsets_, and nodeScores_.

◆ setNode()

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

Set the node associated to this data.

Parameters
nodeA pointer toward the node to be associated to this data.

Implements bpp::TreeParsimonyNodeData.

Definition at line 102 of file DRTreeParsimonyData.h.

References node_.

Referenced by bpp::DRTreeParsimonyData::init(), and bpp::DRTreeParsimonyData::reInit().

Member Data Documentation

◆ node_

const Node* bpp::DRTreeParsimonyNodeData::node_
private

Definition at line 74 of file DRTreeParsimonyData.h.

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

◆ nodeBitsets_

std::map<int, std::vector<Bitset> > bpp::DRTreeParsimonyNodeData::nodeBitsets_
mutableprivate

◆ nodeScores_

std::map<int, std::vector<unsigned int> > bpp::DRTreeParsimonyNodeData::nodeScores_
mutableprivate

Definition at line 73 of file DRTreeParsimonyData.h.

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


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