barry: Your go-to motif accountant  0.0-1
Full enumeration of sample space and fast count of sufficient statistics for binary arrays
Node Class Reference

A single node for the model. More...

#include <geese-node-bones.hpp>

Collaboration diagram for Node:

Public Member Functions

 ~Node ()
 
int get_parent () const
 
size_t noffspring () const noexcept
 
bool is_leaf () const noexcept
 
Construct a new Node object
 Node ()
 
 Node (size_t id_, size_t ord_, bool duplication_)
 
 Node (size_t id_, size_t ord_, std::vector< size_t > annotations_, bool duplication_)
 
 Node (Node &&x) noexcept
 
 Node (const Node &x)
 

Public Attributes

size_t id
 Id of the node (as specified in the input) More...
 
size_t ord
 Order in which the node was created. More...
 
PhyloArray array
 Array of the node. More...
 
std::vector< size_t > annotations
 Observed annotations (only defined for Geese) More...
 
bool duplication
 
std::vector< PhyloArrayarrays = {}
 Arrays given all possible states. More...
 
Nodeparent = nullptr
 Parent node. More...
 
std::vector< Node * > offspring = {}
 Offspring nodes. More...
 
std::vector< size_t > narray = {}
 ID of the array in the model. More...
 
bool visited = false
 
std::vector< double > subtree_prob
 Induced subtree probabilities. More...
 
std::vector< double > probability
 The probability of observing each state. More...
 

Detailed Description

A single node for the model.

Each node contains all the information to compute the conditional probability of the pruning algorithm at that node.

Definition at line 11 of file geese-node-bones.hpp.

Constructor & Destructor Documentation

◆ Node() [1/5]

Node::Node ( )
inline

Definition at line 37 of file geese-node-bones.hpp.

◆ Node() [2/5]

Node::Node ( size_t  id_,
size_t  ord_,
bool  duplication_ 
)
inline

Definition at line 57 of file geese-node-bones.hpp.

◆ Node() [3/5]

Node::Node ( size_t  id_,
size_t  ord_,
std::vector< size_t >  annotations_,
bool  duplication_ 
)
inline

Definition at line 63 of file geese-node-bones.hpp.

◆ Node() [4/5]

Node::Node ( Node &&  x)
inlinenoexcept

Definition at line 70 of file geese-node-bones.hpp.

◆ Node() [5/5]

Node::Node ( const Node x)
inline

Definition at line 85 of file geese-node-bones.hpp.

◆ ~Node()

Node::~Node ( )
inline

Definition at line 48 of file geese-node-bones.hpp.

Member Function Documentation

◆ get_parent()

int Node::get_parent ( ) const
inline

Definition at line 100 of file geese-node-bones.hpp.

◆ is_leaf()

bool Node::is_leaf ( ) const
inlinenoexcept

Definition at line 112 of file geese-node-bones.hpp.

◆ noffspring()

size_t Node::noffspring ( ) const
inlinenoexcept

Definition at line 106 of file geese-node-bones.hpp.

Member Data Documentation

◆ annotations

std::vector< size_t > Node::annotations

Observed annotations (only defined for Geese)

Definition at line 18 of file geese-node-bones.hpp.

◆ array

PhyloArray Node::array

Array of the node.

Definition at line 17 of file geese-node-bones.hpp.

◆ arrays

std::vector< PhyloArray > Node::arrays = {}

Arrays given all possible states.

Definition at line 21 of file geese-node-bones.hpp.

◆ duplication

bool Node::duplication

Definition at line 19 of file geese-node-bones.hpp.

◆ id

size_t Node::id

Id of the node (as specified in the input)

Definition at line 14 of file geese-node-bones.hpp.

◆ narray

std::vector< size_t > Node::narray = {}

ID of the array in the model.

Definition at line 25 of file geese-node-bones.hpp.

◆ offspring

std::vector< Node* > Node::offspring = {}

Offspring nodes.

Definition at line 24 of file geese-node-bones.hpp.

◆ ord

size_t Node::ord

Order in which the node was created.

Definition at line 15 of file geese-node-bones.hpp.

◆ parent

Node* Node::parent = nullptr

Parent node.

Definition at line 23 of file geese-node-bones.hpp.

◆ probability

std::vector< double > Node::probability

The probability of observing each state.

Definition at line 29 of file geese-node-bones.hpp.

◆ subtree_prob

std::vector< double > Node::subtree_prob

Induced subtree probabilities.

Definition at line 28 of file geese-node-bones.hpp.

◆ visited

bool Node::visited = false

Definition at line 26 of file geese-node-bones.hpp.


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