-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathyapp.h
64 lines (53 loc) · 1.4 KB
/
yapp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#define UNIONBIT (1 << (WORDSIZE-1))
#define SETBITS (~ UNIONBIT)
#define MAXCHARACTERPOSITIONS (WORDSIZE-1)
#define INFINITY (1 << 20)
typedef struct t {
struct t *parent, *left, *right;
int taxon;
char *name;
int localcost, totalcost;
int mark;
int dirty;
struct t *backupnode;
look_up_thang *final_character;
look_up_thang *partial_final_character;
look_up_thang *character;
BitVectorT taxa;
} NodeT;
#define NONODE ((NodeT *)0)
typedef enum {NOBACKUP, TOBACKUP, FROMBACKUP} BackupT;
typedef struct {
int parent_index: 31;
int on_left: 1;
} BufferedTreeNodeT;
typedef struct {
int n_placed_taxa;
BufferedTreeNodeT *nodes;
int *placed_taxa_indices;
int n_supported_clades;
BitVectorT *supported_clades;
unsigned int supported_clades_hash;
int cost;
int generation;
} BufferedTreeT;
#define NOBUFFEREDTREE (BufferedTreeT *)NULL
typedef struct {
int n_buffered_trees;
int max_buffered_trees;
BufferedTreeT **buffered_tree;
int min_tree_cost;
int current_generation;
int compressed;
} TreeBufferT;
#define NOTREEBUFFER (TreeBufferT *)NULL
typedef struct t2 {
int n_kids;
struct t2 **kids;
int has_parent;
int clade;
} ConsensusNodeT;
typedef void (*ComputeSupportT) (NodeT *root);
typedef enum {READDATA, ADDITIONLOOP, LOCALREARRANGEMENTLOOP, SPRLOOP, TBRLOOP, FINISH, REPORTSTATS,
NEWMINTREECOST, BUFFERTICK,
RETURNTREE, LOOPISDONE, STATSREPORT} MSGTagT;