phylopomp
Phylodynamics for POMPs
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bare.cc File Reference
#include "genealogy.h"
#include "generics.h"
#include "internal.h"
Include dependency graph for bare.cc:

Go to the source code of this file.

Functions

SEXP curtail (SEXP State, SEXP Time)
 curtail the given genealogy More...
 
SEXP yaml (SEXP State)
 extract a YAML description More...
 
SEXP gendat (SEXP State)
 data-frame format More...
 

Function Documentation

◆ curtail()

SEXP curtail ( SEXP  State,
SEXP  Time 
)

curtail the given genealogy

Definition at line 10 of file bare.cc.

10  {
11  genealogy_t A = State;
12  A.curtail(*REAL(AS_NUMERIC(Time)));
13  SEXP out;
14  PROTECT(out = serial(A));
15  SET_ATTR(out,install("class"),mkString("gpgen"));
16  UNPROTECT(1);
17  return out;
18  }
Encodes a genealogy.
Definition: genealogy.h:22
void curtail(slate_t tnew)
Definition: genealogy.h:496
SEXP serial(const TYPE &X)
binary serialization
Definition: generics.h:28
Here is the call graph for this function:

◆ gendat()

SEXP gendat ( SEXP  State)

data-frame format

Definition at line 27 of file bare.cc.

27  {
28  genealogy_t A = State;
29  A.prune();
30  A.obscure();
31  A.trace_lineages();
32  return A.gendat();
33  }
genealogy_t & prune(void)
prune the tree (drop all black balls)
Definition: genealogy.h:465
genealogy_t & obscure(void)
erase all deme information
Definition: genealogy.h:476
void gendat(double *tout, int *anc, int *lin, int *sat, int *type, int *index, int *child) const
nodelist in data-frame format
Definition: genealogy.h:231
void trace_lineages(void)
Definition: nodeseq.h:244
Here is the call graph for this function:
Here is the caller graph for this function:

◆ yaml()

SEXP yaml ( SEXP  State)

extract a YAML description

Definition at line 21 of file bare.cc.

21  {
22  genealogy_t A = State;
23  return mkString(A.yaml().c_str());
24  }
virtual std::string yaml(std::string tab="") const
machine-readable info
Definition: genealogy.h:352
Here is the call graph for this function:
Here is the caller graph for this function: