#include "genealogy.h"
#include "generics.h"
#include "internal.h"
Go to the source code of this file.
|
SEXP | curtail (SEXP State, SEXP Time, SEXP Troot) |
| curtail the given genealogy
|
|
SEXP | yaml (SEXP State) |
| extract a YAML description
|
|
SEXP | gendat (SEXP State) |
| data-frame format
|
|
◆ curtail()
SEXP curtail |
( |
SEXP | State, |
|
|
SEXP | Time, |
|
|
SEXP | Troot ) |
curtail the given genealogy
Definition at line 10 of file bare.cc.
10 {
12 double t, t0;
13 t = *REAL(AS_NUMERIC(Time));
14 t0 = *REAL(AS_NUMERIC(Troot));
15 if (ISNA(t)) t = A.
time();
18 SEXP out;
20 SET_ATTR(out,install("class"),mkString("gpgen"));
21 UNPROTECT(1);
22 return out;
23 }
slate_t & timezero(void)
view/set zero time.
slate_t & time(void)
view/set current time.
void curtail(slate_t tnew, slate_t troot)
SEXP serial(const TYPE &X)
binary serialization
◆ gendat()
SEXP gendat |
( |
SEXP | State | ) |
|
data-frame format
Definition at line 32 of file bare.cc.
32 {
38 }
genealogy_t & prune(void)
prune the tree (drop all black balls)
void gendat(double *tout, int *anc, int *lin, int *sat, int *type, int *index, int *child) const
nodelist in data-frame format
genealogy_t & obscure(void)
erase all deme information
void trace_lineages(void)
◆ yaml()
extract a YAML description
Definition at line 26 of file bare.cc.
26 {
28 return mkString(A.
yaml().c_str());
29 }
virtual std::string yaml(std::string tab="") const
machine-readable info