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 More... | |
inventory_t (raw_t *o) | |
constructor from serialized binary form More... | |
inventory_t (std::pair< node_it, node_it > &&I) | |
inventory_t (const inventory_t &)=default | |
copy constructor More... | |
inventory_t (inventory_t &&)=delete | |
move constructor More... | |
inventory_t & | operator= (std::pair< node_it, node_it > &&I) |
copy an inventory by iterating over a node sequence More... | |
inventory_t & | operator= (const inventory_t &)=default |
copy assignment operator More... | |
inventory_t & | operator= (inventory_t &&)=delete |
move assignment operator More... | |
~inventory_t (void) | |
destructor More... | |
void | clean (void) |
memory cleanup More... | |
void | clear (void) |
memory cleanup More... | |
size_t | bytesize (void) const |
size of serialized binary form More... | |
size_t | size (void) const |
size_t | size (name_t i) const |
size of deme More... | |
pocket_t & | operator[] (const name_t n) |
return the n -th deme More... | |
bool | empty (void) const |
are all demes empty? More... | |
ball_t * | random_ball (name_t i=0) const |
choose one random ball from deme i More... | |
pocket_t * | random_balls (name_t i=0, int n=1) const |
choose a random set of n balls from deme i More... | |
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 More... | |
raw_t * | operator>> (raw_t *o, inventory_t &I) |
binary deserialization More... | |
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 |
constructor from serialized binary form
Definition at line 31 of file inventory.h.
|
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 |
memory cleanup
Definition at line 71 of file inventory.h.
|
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 |
return the n
-th deme
Definition at line 112 of file inventory.h.
|
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 |
binary serialization
Definition at line 84 of file inventory.h.
|
friend |
binary deserialization
Definition at line 91 of file inventory.h.
|
private |
Definition at line 22 of file inventory.h.
|
staticprivate |
Definition at line 23 of file inventory.h.