Legofit
infers population history from nucleotide site patterns.
popnode.h
1#ifndef ARR_POPNODE_H
2# define ARR_POPNODE_H
3
4# include "typedefs.h"
5# include <stdbool.h>
6# include <gsl/gsl_rng.h>
7
8int PopNode_addChild(void * vparent, void * vchild);
9void PopNode_clear(PopNode * self);
10Gene *PopNode_coalesce(PopNode * self, gsl_rng * rng,
11 long unsigned *event_counter);
12PopNode *PopNode_dup(PopNode *old_root, PtrPtrMap *ppm);
13int PopNode_equals(PopNode *a, PopNode *b);
14int PopNode_feasible(const PopNode *self, Bounds bnd, int verbose);
15void PopNode_free(PopNode *self);
16int PopNode_isClear(const PopNode *self);
17int PopNode_mix(void * vchild, int mix_i, void * vintrogressor,
18 void * vnative, ParStore *ps);
19void *PopNode_new(int twoN_i, int start_i, ParStore *ps,
20 const char *label);
21void PopNode_newSample(PopNode * self, unsigned ndx);
22void PopNode_print(void *vroot, FILE * fp, int indent);
23void *PopNode_root(void * vself);
24void PopNode_update(PopNode *self, ParStore *ps);
25void PopNode_unvisit(PopNode *self);
26void PopNode_shiftPopNodePtrs(PopNode *self, size_t dp, int sign);
27
28#endif
Gene * PopNode_coalesce(PopNode *self, gsl_rng *rng, long unsigned *event_counter)
Coalesce gene tree within population tree.
Definition: popnode.c:495
PopNode * PopNode_dup(PopNode *old_root, PtrPtrMap *ppm)
Duplicate a network of nodes, returning a pointer to the root of the duplicate network.
Definition: popnode.c:730
void PopNode_newSample(PopNode *self, unsigned ndx)
Allocates a new Gene and puts it into the array within PopNode.
Definition: popnode.c:394
int PopNode_feasible(const PopNode *self, Bounds bnd, int verbose)
Return 1 if parameters satisfy inequality constraints, or 0 otherwise.
Definition: popnode.c:651
int PopNode_addChild(void *vparent, void *vchild)
Connect parent and child.
Definition: popnode.c:336
int PopNode_mix(void *vchild, int mix_i, void *vintrogressor, void *vnative, ParStore *ps)
Connect a child PopNode to two parents.
Definition: popnode.c:425
void PopNode_unvisit(PopNode *self)
Set all "visited" flags to false.
Definition: popnode.c:291
void * PopNode_root(void *vself)
Find root of population network, starting from given node.
Definition: popnode.c:148
void PopNode_print(void *vroot, FILE *fp, int indent)
Print a network of PopNodes.
Definition: popnode.c:209
void * PopNode_new(int twoN_i, int start_i, ParStore *ps, const char *label)
PopNode constructor.
Definition: popnode.c:300
void PopNode_free(PopNode *self)
Free node and descendants.
Definition: popnode.c:627
int PopNode_isClear(const PopNode *self)
Return 1 if PopNode tree is empty of samples.
Definition: popnode.c:195
void PopNode_clear(PopNode *self)
Remove all references to samples from tree of populations.
Definition: popnode.c:181
Definition: parstore.h:10
Definition: gene.h:7
Definition: parstore.c:42
Definition: popnode.c:40