aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-04-28 14:41:33 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-04-28 14:41:33 -0700
commit9fd30c9e0ec9c5716b8cb7b8896318178d4b08bd (patch)
tree0815cd9deb346cf729834566275446c3d2d8b40b /include
parent4a03c700d5391e3fa18f9d9b219936ef5c9eb722 (diff)
fix: ladderize now sorts by number of nodes contained below
Diffstat (limited to 'include')
-rw-r--r--include/libbio.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/libbio.h b/include/libbio.h
index 261c732..9ce96b5 100644
--- a/include/libbio.h
+++ b/include/libbio.h
@@ -9,8 +9,8 @@ typedef struct bio·Node
string comment;
double dist;
double support;
+ int nnode;
int nchild;
- int ndescendent;
struct bio·Node *parent;
struct bio·Node *sibling;
struct bio·Node *child;
@@ -25,10 +25,13 @@ typedef struct bio·Tree
// clade functions
error phylo·addchild(bio·Node* parent, bio·Node* child);
+error phylo·rmchild(bio·Node* parent, bio·Node* child);
error phylo·countnodes(bio·Node *node, int *n);
error phylo·countleafs(bio·Node *node, int *n);
+error phylo·ladderize(bio·Node *root);
+
/* newick i/o */
error bio·readnewick(io·Peeker stream, void*, mem·Allocator heap, void*, bio·Tree* tree);
error bio·writenewick(bio·Tree tree, io·Putter out, void*);