phylopomp
Phylodynamics for POMPs
|
A pocket is a set of balls. More...
#include <pocket.h>
Public Member Functions | |
size_t | bytesize (void) const |
size of binary serialization More... | |
void | repair_owners (const std::unordered_map< name_t, node_t * > &node_name, std::unordered_map< name_t, ball_t * > *ball_name) |
~pocket_t (void) | |
destructor More... | |
bool | holds (ball_t *b) const |
does this node hold the given ball? More... | |
bool | holds (color_t c) const |
does this node hold a ball of this color? More... | |
ball_t * | last_ball (void) const |
retrieve the last ball More... | |
ball_t * | ball (const color_t c) const |
retrieve the first ball of the specified color. More... | |
ball_t * | other (const ball_t *b) const |
return a pointer to another ball More... | |
std::string | describe (void) const |
human-readable info More... | |
SEXP | structure (void) const |
R list description. More... | |
std::string | yaml (std::string tab="") const |
human/machine-readable info More... | |
Protected Member Functions | |
void | repair_holder (node_t *p) |
Private Member Functions | |
void | clean (void) |
delete balls and clear pocket More... | |
Friends | |
raw_t * | operator>> (const pocket_t &p, raw_t *o) |
binary serialization More... | |
raw_t * | operator>> (raw_t *o, pocket_t &p) |
A pocket is a set of balls.
An order relation among balls ensures the uniqueness of the internal representation.
|
inline |
|
inline |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
R list description.
Definition at line 158 of file pocket.h.
|
inline |
binary deserialization. this leaves the balls without knowledge of their holder.