|
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 | |
| 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 | |
| bool | holds (ball_t *b) const |
| does this node hold the given ball? | |
| bool | holds (color_t c) const |
| does this node hold a ball of this color? | |
| ball_t * | first_ball (void) const |
| retrieve the first ball | |
| ball_t * | last_ball (void) const |
| retrieve the last ball | |
| ball_t * | ball (const color_t c) const |
| retrieve the first ball of the specified color. | |
| ball_t * | other (const ball_t *b) const |
| return a pointer to another ball | |
| string_t | yaml (string_t tab="") const |
| human/machine-readable info | |
| SEXP | structure (void) const |
| R list description. | |
Protected Member Functions | |
| void | repair_holder (node_t *p) |
Private Member Functions | |
| void | clean (void) |
| delete balls and clear pocket | |
Friends | |
| raw_t * | operator>> (const pocket_t &p, raw_t *o) |
| binary serialization | |
| 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 |
Needed in deserialization. This function repairs the links green balls and their names.
Definition at line 81 of file pocket.h.

| SEXP pocket_t::structure | ( | void | ) | const |
R list description.
Definition at line 40 of file structure.cc.

| string_t pocket_t::yaml | ( | string_t | tab = "" | ) | const |
binary deserialization. this leaves the balls without knowledge of their holder.
Definition at line 57 of file pocket.h.