|
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 * | 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 | |
| std::string | describe (void) const |
| human-readable info | |
| SEXP | structure (void) const |
| R list description. | |
| std::string | yaml (std::string tab="") const |
| human/machine-readable info | |
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 83 of file pocket.h.

|
inline |
R list description.
Definition at line 157 of file pocket.h.

|
inline |
binary deserialization. this leaves the balls without knowledge of their holder.
Definition at line 59 of file pocket.h.