1 | |
---|
2 | /* version 3.6. (c) Copyright 1993-2000 by the University of Washington. |
---|
3 | Written by Joseph Felsenstein, Akiko Fuseki, Sean Lamont, and Andrew Keeffe. |
---|
4 | Permission is granted to copy and use this program provided no fee is |
---|
5 | charged for it and provided that this copyright notice is not removed. */ |
---|
6 | |
---|
7 | /* |
---|
8 | discrete.h: included in pars |
---|
9 | */ |
---|
10 | |
---|
11 | typedef struct gbases { |
---|
12 | discbaseptr discbase; |
---|
13 | struct gbases *next; |
---|
14 | } gbases; |
---|
15 | |
---|
16 | struct LOC_hyptrav { |
---|
17 | boolean bottom; |
---|
18 | node *r; |
---|
19 | discbaseptr hypset; |
---|
20 | boolean maybe, nonzero; |
---|
21 | unsigned char tempset, anc; |
---|
22 | } ; |
---|
23 | |
---|
24 | |
---|
25 | extern long nonodes, endsite, outgrno, nextree, which; |
---|
26 | extern boolean interleaved, printdata, outgropt, treeprint, dotdiff; |
---|
27 | extern steptr weight, category, alias, location, ally; |
---|
28 | extern sequence y, convtab; |
---|
29 | |
---|
30 | #ifndef OLDC |
---|
31 | /*function prototypes*/ |
---|
32 | void inputdata(long); |
---|
33 | void alloctree(pointarray *, long, boolean); |
---|
34 | void setuptree(pointarray, long, boolean); |
---|
35 | void alloctip(node *, long *, unsigned char *); |
---|
36 | void sitesort(long, steptr); |
---|
37 | void sitecombine(long); |
---|
38 | void sitescrunch(long); |
---|
39 | |
---|
40 | void makevalues(pointarray, long *, unsigned char *, boolean); |
---|
41 | void fillin(node *, node *, node *); |
---|
42 | long getlargest(long *); |
---|
43 | void multifillin(node *, node *, long); |
---|
44 | void sumnsteps(node *, node *, node *, long, long); |
---|
45 | void sumnsteps2(node *, node *, node *, long, long, long *); |
---|
46 | void multisumnsteps(node *, node *, long, long, long *); |
---|
47 | void multisumnsteps2(node *); |
---|
48 | void findoutgroup(node *, boolean *); |
---|
49 | boolean alltips(node *, node *); |
---|
50 | |
---|
51 | void gdispose(node *, node **, pointarray); |
---|
52 | void preorder(node *, node *, node *, node *, node *, node *, long ); |
---|
53 | void updatenumdesc(node *, node *, long); |
---|
54 | void add(node *, node *, node *, node **, boolean, pointarray, |
---|
55 | node **, long *, unsigned char *); |
---|
56 | void findbelow(node **, node *, node *); |
---|
57 | void re_move(node *, node **, node **, boolean, pointarray, |
---|
58 | node **, long *, unsigned char *); |
---|
59 | void postorder(node *); |
---|
60 | void getnufork(node **, node **, pointarray, long *, unsigned char *); |
---|
61 | void reroot(node *, node *); |
---|
62 | void reroot2(node *, node *); |
---|
63 | |
---|
64 | void reroot3(node *, node *, node *, node *, node **); |
---|
65 | void savetraverse(node *); |
---|
66 | void newindex(long, node *); |
---|
67 | void flipindexes(long, pointarray); |
---|
68 | boolean parentinmulti(node *); |
---|
69 | long sibsvisited(node *, long *); |
---|
70 | long smallest(node *, long *); |
---|
71 | void bintomulti(node **, node **, node **, long *, unsigned char *); |
---|
72 | void backtobinary(node **, node *, node **); |
---|
73 | boolean outgrin(node *, node *); |
---|
74 | |
---|
75 | void flipnodes(node *, node *); |
---|
76 | void moveleft(node *, node *, node **); |
---|
77 | void savetree(node *, long *, pointarray, node **, long *, |
---|
78 | unsigned char *); |
---|
79 | void addnsave(node *, node *, node *, node **, node **, boolean multf, |
---|
80 | pointarray , long *, long *, unsigned char *); |
---|
81 | void addbestever(long *, long *, long, boolean, long *, bestelm *); |
---|
82 | void addtiedtree(long, long *, long, boolean, long *, bestelm *); |
---|
83 | void clearcollapse(pointarray); |
---|
84 | void clearbottom(pointarray); |
---|
85 | void collabranch(node *,node *,node *); |
---|
86 | boolean allcommonbases(node *, node *, boolean *); |
---|
87 | |
---|
88 | void findbottom(node *, node **); |
---|
89 | boolean moresteps(node *, node *); |
---|
90 | boolean passdown(node *, node *, node *, node *, node *, node *, node *, |
---|
91 | node *, node *, boolean); |
---|
92 | boolean trycollapdesc(node *, node *, node *, node *, node *, node *, |
---|
93 | node *, node *, node *, boolean ,long *, unsigned char *); |
---|
94 | void setbottom(node *); |
---|
95 | boolean zeroinsubtree(node *, node *, node *, node *, node *, node *, |
---|
96 | node *, node *, boolean , node *, long *, unsigned char *); |
---|
97 | boolean collapsible(node *, node *, node *, node *, node *, node *, node *, |
---|
98 | node *, boolean , node *, long *, unsigned char *, pointarray); |
---|
99 | void replaceback(node **,node *,node *,node **,long *,unsigned char *); |
---|
100 | void putback(node *, node *, node *, node **); |
---|
101 | void savelocrearr(node *, node *, node *, node *, node *, node *, |
---|
102 | node *, node *, node *, node **, long, long *, boolean, boolean, |
---|
103 | boolean *, long *, bestelm *, pointarray, node **, long *, |
---|
104 | unsigned char *); |
---|
105 | |
---|
106 | void clearvisited(pointarray); |
---|
107 | void hyprint(long,long,struct LOC_hyptrav *, pointarray); |
---|
108 | void gnubase(gbases **, gbases **, long); |
---|
109 | void chuckbase(gbases *, gbases **); |
---|
110 | void hyptrav(node *, discbaseptr, long, long, boolean, pointarray, |
---|
111 | gbases **); |
---|
112 | void hypstates(long, node *, pointarray, gbases **); |
---|
113 | void initbranchlen(node *); |
---|
114 | void initmin(node *, long, boolean); |
---|
115 | void initbase(node *, long); |
---|
116 | void inittreetrav(node *, long); |
---|
117 | |
---|
118 | void compmin(node *, node *); |
---|
119 | void minpostorder(node *, pointarray); |
---|
120 | void branchlength(node *, node *, double *, pointarray); |
---|
121 | void printbranchlengths(node *); |
---|
122 | void branchlentrav(node *, node *, long, long, double *, pointarray); |
---|
123 | void treelength(node *, long, pointarray); |
---|
124 | void coordinates(node *, long *, double , long *); |
---|
125 | void drawline(long, double, node *); |
---|
126 | void printree(node *, double); |
---|
127 | void writesteps(long, boolean, steptr, node *); |
---|
128 | |
---|
129 | void treeout(node *, long, long *, node *); |
---|
130 | void drawline3(long, double, node *); |
---|
131 | void standev(long, long, long, double, double *, long **, longer); |
---|
132 | void freetip(node *); |
---|
133 | void freenontip(node *); |
---|
134 | void freenodes(long, pointarray); |
---|
135 | void freenode(node **); |
---|
136 | void freetree(long, pointarray); |
---|
137 | void freegarbage(gbases **); |
---|
138 | void freegrbg(node **); |
---|
139 | void treeout3(node *p, long nextree, long *col, node *root); |
---|
140 | /*function prototypes*/ |
---|
141 | #endif |
---|