20template <
class POPN,
size_t NDEME>
26 const static size_t ndeme = NDEME;
41 o = (
reinterpret_cast<const popul_t&
>(A) >> o);
48 o = (o >>
reinterpret_cast<popul_t&
>(A));
69 err(
"in %s: cannot deserialize a NULL.",__func__);
70 PROTECT(o = AS_RAW(o));
115 string_t
yaml (string_t tab =
"")
const {
116 string_t t = tab +
" ";
118 +
"genealogy:\n" +
geneal.yaml(t);
127 return geneal.lineage_count();
131 return geneal.structure();
154 for (
int j = 0; j < m; j++) {
Balls function as pointers.
node_t * holder(void) const
in whose pocket do I lie?
Implementation of the inventory process.
slate_t time(void) const
current time
string_t newick(void) const
tree in Newick format
int play(double tfin)
runs the process to time tfin
void jump(int e)
makes a jump
master_t(raw_t *o)
constructor from serialized binary form
master_t(master_t &&)=default
move constructor
string_t yaml(string_t tab="") const
human/machine readable info
slate_t timezero(void) const
get zero-time
master_t(const master_t &A)
copy constructor
static const size_t ndeme
inventory_t< NDEME > inventory
master_t(SEXP o)
constructor from RAW SEXP (containing binary serialization)
void rinit(void)
initialize the state
void graft(name_t i=1, int m=1)
new root in deme i
~master_t(void)
destructor
master_t & operator=(const master_t &A)
copy assignment operator
size_t bytesize(void) const
size of serialized binary form
void sample_migrate(name_t i=1, name_t j=1)
sample_migrate in deme i to deme j
void sample(name_t i=1, int n=1)
sample in deme i
void birth(name_t i=1, name_t j=1, int n=1)
n births into deme j with parent in deme i
void sample_death(name_t i=1, int n=1)
sample_death in deme i
SEXP lineage_count(void) const
lineage count table
friend raw_t * operator>>(const master_t &A, raw_t *o)
binary serialization
void death(name_t i=1)
death in deme i
SEXP structure(void) const
structure in R list format
void migrate(name_t i=1, name_t j=1)
migration from deme i to deme j
A pocket is a set of balls.
size_t bytesize(void) const
string_t yaml(string_t tab) const