5 * Part of TREE-PUZZLE 5.0 (June 2000)
7 * (c) 1999-2000 by Heiko A. Schmidt, Korbinian Strimmer,
8 * M. Vingron, and Arndt von Haeseler
9 * (c) 1995-1999 by Korbinian Strimmer and Arndt von Haeseler
11 * All parts of the source except where indicated are distributed under
12 * the GNU public licence. See http://www.opensource.org for details.
33 extern long int PP_randn;
34 extern long int PP_rand;
41 typedef unsigned long int uli;
43 typedef double *dvector, **dmatrix, ***dcube;
44 typedef char *cvector, **cmatrix, ***ccube;
45 typedef int *ivector, **imatrix, ***icube;
46 typedef uli *ulivector, **ulimatrix, ***ulicube;
50 * prototypes of functions defined in util.c
53 void maerror(char *message);
55 dvector new_dvector(int n);
56 dmatrix new_dmatrix(int nrow, int ncol);
57 dcube new_dcube(int ntri, int nrow, int ncol);
58 void free_dvector(dvector v);
59 void free_dmatrix(dmatrix m);
60 void free_dcube(dcube c);
62 cvector new_cvector(int n);
63 cmatrix new_cmatrix(int nrow, int ncol);
64 ccube new_ccube(int ntri, int nrow, int ncol);
65 void free_cvector(cvector v);
66 void free_cmatrix(cmatrix m);
67 void free_ccube(ccube c);
69 ivector new_ivector(int n);
70 imatrix new_imatrix(int nrow, int ncol);
71 icube new_icube(int ntri, int nrow, int ncol);
72 void free_ivector(ivector v);
73 void free_imatrix(imatrix m);
74 void free_icube(icube c);
76 ulivector new_ulivector(int n);
77 ulimatrix new_ulimatrix(int nrow, int ncol);
78 ulicube new_ulicube(int ntri, int nrow, int ncol);
79 void free_ulivector(ulivector v);
80 void free_ulimatrix(ulimatrix m);
81 void free_ulicube(ulicube c);
83 double randomunitintervall(void);
84 int initrandom(int seed);
85 int randominteger(int n);
86 void chooser(int t, int s, ivector slist);
87 void *myrealloc(void *, size_t);
90 #define MAXITS 10 /* maximum number of iterations in twoedimenmin */
91 double onedimenmin(double, double, double, double (*f )(double ), double, double *, double *);
92 void twodimenmin(double, int, double, double *, double, double (*func1 )(double ), double *, int, double, double *, double, double (*func2 )(double ), double *);