Legofit
infers population history from nucleotide site patterns.
segment.h
1#ifndef ARR_SEGMENT_H
2#define ARR_SEGMENT_H
3
4#include "typedefs.h"
5#include <stdio.h>
6
7int Segment_addChild(void * vparent, void * vchild);
8int Segment_coalesce(Segment *self, int dosing, BranchTab *branchtab,
9 long unsigned *event_counter);
10Segment *Segment_dup(Segment *old_root, PtrPtrMap *ppm);
11int Segment_equals(Segment *a, Segment *b);
12int Segment_feasible(const Segment * self, Bounds bnd, int verbose);
13void Segment_free(Segment *self);
14void *Segment_new(int twoN_i, int start_i, ParStore *ps,
15 const char *label);
16void Segment_newSample(Segment * self, unsigned ndx);
17int Segment_mix(void * vchild, int mix_i, void * vintrogressor,
18 void * vnative, ParStore *ps);
19void Segment_print(void *vroot, FILE * fp, int indent);
20void Segment_prune(Segment *self);
21void *Segment_root(void * vself);
22void Segment_sanityCheck(Segment * self, const char *file, int lineno);
23void Segment_unvisit(Segment *self);
24void Segment_update(Segment *self, ParStore *ps);
25void Segment_clear(Segment * self);
26int Segment_isClear(const Segment * self);
27
28#endif
int Segment_feasible(const Segment *self, Bounds bnd, int verbose)
Return 1 if parameters satisfy inequality constraints, or 0 otherwise.
Definition: segment.c:529
int Segment_isClear(const Segment *self)
Return 1 if Segment tree is empty of samples.
Definition: segment.c:1589
void Segment_sanityCheck(Segment *self, const char *file, int lineno)
Check sanity of Segment.
Definition: segment.c:352
void Segment_newSample(Segment *self, unsigned ndx)
Add a new sample to a Segment.
Definition: segment.c:300
void Segment_prune(Segment *self)
Traverse network, removing segments with no children and no samples.
Definition: segment.c:260
void * Segment_root(void *vself)
Find root of population network, starting from given node.
Definition: segment.c:498
void Segment_clear(Segment *self)
Remove all references to samples from tree of populations.
Definition: segment.c:1576
void Segment_unvisit(Segment *self)
Set all "visited" flags to false.
Definition: segment.c:290
Segment * Segment_dup(Segment *old_root, PtrPtrMap *ppm)
Duplicate a network of nodes, returning a pointer to the root of the duplicate network.
Definition: segment.c:607
Definition: parstore.h:10
Definition: branchtab.c:20
Definition: parstore.c:42
Definition: segment.c:79