1 #ifndef GEESE_NODE_BONES
2 #define GEESE_NODE_BONES 1
21 std::vector< PhyloArray >
arrays = {};
37 Node() :
ord(std::numeric_limits< size_t >::max()) {};
38 Node(
size_t id_,
size_t ord_,
bool duplication_);
39 Node(
size_t id_,
size_t ord_, std::vector< size_t > annotations_,
bool duplication_);
57 inline
Node::
Node(
size_t id_,
size_t ord_,
bool duplication_)
66 std::vector< size_t > annotations_,
71 id(x.id), ord(x.ord), array(std::move(x.array)),
72 annotations(std::move(x.annotations)),
73 duplication(x.duplication), arrays(std::move(x.arrays)),
74 parent(std::move(x.parent)),
75 offspring(std::move(x.offspring)),
76 narray(std::move(x.narray)),
78 subtree_prob(std::move(x.subtree_prob)),
79 probability(std::move(x.probability)) {
86 id(x.id), ord(x.ord), array(x.array),
87 annotations(x.annotations),
88 duplication(x.duplication), arrays(x.arrays),
90 offspring(x.offspring),
93 subtree_prob(x.subtree_prob),
94 probability(x.probability) {
104 return static_cast<int>(
parent->
id);
108 return this->offspring.size();
A single node for the model.
std::vector< size_t > annotations
Observed annotations (only defined for Geese)
PhyloArray array
Array of the node.
std::vector< PhyloArray > arrays
Arrays given all possible states.
size_t id
Id of the node (as specified in the input)
std::vector< Node * > offspring
Offspring nodes.
std::vector< size_t > narray
ID of the array in the model.
std::vector< double > probability
The probability of observing each state.
size_t noffspring() const noexcept
Node * parent
Parent node.
size_t ord
Order in which the node was created.
bool is_leaf() const noexcept
std::vector< double > subtree_prob
Induced subtree probabilities.
Data_Type &&counter_ noexcept
barry::BArrayDense< size_t, NodeData > PhyloArray