|
phylopomp
Phylodynamics for POMPs
|
Representation for the inventory process. More...
#include <inventory.h>

Public Member Functions | |
| inventory_t (void)=default | |
| basic constructor for inventory class | |
| inventory_t (raw_t *o) | |
| constructor from serialized binary form | |
| inventory_t (std::pair< node_it, node_it > &&I) | |
| inventory_t (const inventory_t &)=default | |
| copy constructor | |
| inventory_t (inventory_t &&)=delete | |
| move constructor | |
| inventory_t & | operator= (std::pair< node_it, node_it > &&I) |
| copy an inventory by iterating over a node sequence | |
| inventory_t & | operator= (const inventory_t &)=default |
| copy assignment operator | |
| inventory_t & | operator= (inventory_t &&)=delete |
| move assignment operator | |
| ~inventory_t (void) | |
| destructor | |
| void | clean (void) |
| memory cleanup | |
| void | clear (void) |
| memory cleanup | |
| size_t | bytesize (void) const |
| size of serialized binary form | |
| size_t | size (void) const |
| size_t | size (name_t i) const |
| size of deme | |
| pocket_t & | operator[] (const name_t n) |
return the n-th deme | |
| bool | empty (void) const |
| are all demes empty? | |
| ball_t * | random_ball (name_t i=0) const |
choose one random ball from deme i | |
| pocket_t * | random_balls (name_t i=0, int n=1) const |
choose a random set of n balls from deme i | |
| void | insert (ball_t *b) |
| void | erase (ball_t *b) |
Private Attributes | |
| pocket_t | _inven [NDEME] |
Static Private Attributes | |
| static const size_t | ndeme = NDEME |
Friends | |
| raw_t * | operator>> (const inventory_t &I, raw_t *o) |
| binary serialization | |
| raw_t * | operator>> (raw_t *o, inventory_t &I) |
| binary deserialization | |
Representation for the inventory process.
An inventory consists of an array of demes. Each deme is a set of black balls.
Definition at line 18 of file inventory.h.
|
default |
basic constructor for inventory class

|
inline |
|
inline |
constructor from node sequence (via 'extant' operation). this constructs an inventory from a genealogy.
Definition at line 36 of file inventory.h.

|
default |
copy constructor

|
delete |
move constructor

|
inline |
|
inline |
size of serialized binary form
Definition at line 77 of file inventory.h.


|
inline |
memory cleanup
Definition at line 67 of file inventory.h.


|
inline |
|
inline |
|
inline |
remove a black ball from its deme. this checks the color of the ball. if it is not black, nothing is done.
Definition at line 168 of file inventory.h.

|
inline |
add a black ball to a deme. this checks the color of the ball. if it is not black, nothing is done.
Definition at line 160 of file inventory.h.


|
default |
copy assignment operator

|
delete |
move assignment operator

|
inline |
copy an inventory by iterating over a node sequence
Definition at line 49 of file inventory.h.

|
inline |
|
inline |
choose one random ball from deme i
Definition at line 124 of file inventory.h.


|
inline |
choose a random set of n balls from deme i
Definition at line 133 of file inventory.h.

|
inline |
|
inline |
Total number of balls in an inventory. i.e., the sum of the sizes of all demes
Definition at line 100 of file inventory.h.


|
friend |
|
friend |
|
private |
Definition at line 22 of file inventory.h.
|
staticprivate |
Definition at line 23 of file inventory.h.