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