X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fme.h;h=f049ef672527f5eca9bd4ab8924316efa746c1fe;hb=d88302b4735b5b7c9132387090bb592d906fe1cb;hp=3ceb771c95248e726626a0eaea556cd46fe29406;hpb=2e3b8be33765d5311e071efb39871249d16f7e30;p=ape.git diff --git a/src/me.h b/src/me.h index 3ceb771..f049ef6 100644 --- a/src/me.h +++ b/src/me.h @@ -1,11 +1,10 @@ -//#include -//#include -//#include -//#include -//#include -//#include -//#include "main.h" -//#include "graph.h" +/* me.h 2008-01-14 */ + +/* Copyright 2007-2008 Vincent Lefort, modified by Emmanuel Paradis */ + +/* This file is part of the R-package `ape'. */ +/* See the file ../COPYING for licensing issues. */ + #include #ifndef NONE @@ -38,9 +37,9 @@ #ifndef MAX_DIGITS #define MAX_DIGITS 20 #endif -#ifndef INPUT_SIZE -#define INPUT_SIZE 100 -#endif +/* #ifndef INPUT_SIZE */ +/* #define INPUT_SIZE 100 */ +/* #endif */ #ifndef MAX_INPUT_SIZE #define MAX_INPUT_SIZE 100000 #endif @@ -69,13 +68,13 @@ typedef struct word { char name[MAX_LABEL_LENGTH]; struct word *suiv; -}WORD; +} WORD; typedef struct pointers { WORD *head; WORD *tail; -}POINTERS; +} POINTERS; typedef struct node { char label[NODE_LABEL_LENGTH]; @@ -110,9 +109,9 @@ typedef struct set struct set *secondNode; } set; -void me_b(double *X, int *N, char **labels, char **treeStr, int *nni); -void me_o(double *X, int *N, char **labels, char **treeStr, int *nni); -int whiteSpace(char c); +void me_b(double *X, int *N, char **labels, int *nni, int *edge1, int *edge2, double *el, char **tl); +void me_o(double *X, int *N, char **labels, int *nni, int *edge1, int *edge2, double *el, char **tl); +//int whiteSpace(char c); double **initDoubleMatrix(int d); double **loadMatrix (double *X, char **labels, int n, set *S); set *addToSet(node *v, set *X); @@ -135,11 +134,9 @@ void freeMatrix(double **D, int size); void freeSet(set *S); void freeTree(tree *T); void freeSubTree(edge *e); +int whiteSpace(char c); int leaf(node *v); -tree *readNewickString (char *str, int numLeaves); node *decodeNewickSubtree(char *treeString, tree *T, int *uCount); -void NewickPrintSubtree(tree *T, edge *e, char *str); -void NewickPrintBinaryTree(tree *T, char *str); -void NewickPrintTrinaryTree(tree *T, char *str); -void NewickPrintTreeStr(tree *T, char *str); - +tree *readNewickString (char *str, int numLeaves); +void subtree2phylo(node *parent, int *edge1, int *edge2, double *el, char **tl); +void tree2phylo(tree *T, int *edge1, int *edge2, double *el, char **tl, int n);