source: tags/arb-6.0/GDE/TREEPUZZLE/src/util.h

Last change on this file was 8616, checked in by westram, 12 years ago

merge from e4fix [8190] [8196] [8198] [8197] [8199] [8221] [8226]

  • callallcallbacks
    • allow repeated calls for all orders
    • avoid infinite descent into recursive filters
    • avoid config managers
  • fixes via callallcallbacks
    • some un-/over-handled errors
    • missing transaction
  • make
    • optionally keep preprocesser output
  • tests
    • only explain broken/wanted expectations if warning was shown
    • added TEST_EXPECT__BROKENIF
  • spelling
    • intervall → interval
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/*
2 * util.h
3 *
4 *
5 * Part of TREE-PUZZLE 5.0 (June 2000)
6 *
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
10 *
11 * All parts of the source except where indicated are distributed under
12 * the GNU public licence.  See http://www.opensource.org for details.
13 */
14
15
16#ifndef _UTIL_
17#define _UTIL_
18
19#include <stdio.h>
20#include <stdlib.h>
21#include <math.h>
22#include <time.h>
23
24
25/*
26 * general definitions
27 */
28
29#define TRUE 1
30#define FALSE 0
31
32#ifdef PARALLEL
33        extern long int PP_randn;
34        extern long int PP_rand;
35#endif
36
37/*
38 * type definitions
39 */
40
41typedef unsigned long int uli;
42
43typedef double *dvector, **dmatrix, ***dcube;
44typedef char *cvector, **cmatrix, ***ccube;
45typedef int *ivector, **imatrix, ***icube;
46typedef uli *ulivector, **ulimatrix, ***ulicube;
47
48
49/*
50 * prototypes of functions defined in util.c
51 */
52
53void maerror(const char *message);
54
55dvector new_dvector(int n);
56dmatrix new_dmatrix(int nrow, int ncol);
57dcube new_dcube(int ntri, int nrow, int ncol);
58void free_dvector(dvector v);
59void free_dmatrix(dmatrix m);
60void free_dcube(dcube c);
61
62cvector new_cvector(int n);
63cmatrix new_cmatrix(int nrow, int ncol);
64ccube new_ccube(int ntri, int nrow, int ncol);
65void free_cvector(cvector v);
66void free_cmatrix(cmatrix m);
67void free_ccube(ccube c);
68
69ivector new_ivector(int n);
70imatrix new_imatrix(int nrow, int ncol);
71icube new_icube(int ntri, int nrow, int ncol);
72void free_ivector(ivector v);
73void free_imatrix(imatrix m);
74void free_icube(icube c);
75
76ulivector new_ulivector(int n);
77ulimatrix new_ulimatrix(int nrow, int ncol);
78ulicube new_ulicube(int ntri, int nrow, int ncol);
79void free_ulivector(ulivector v);
80void free_ulimatrix(ulimatrix m);
81void free_ulicube(ulicube c);
82
83double randomunitinterval(void);
84int initrandom(int seed);
85int randominteger(int n);
86void chooser(int t, int s, ivector slist);
87void *myrealloc(void *, size_t);
88cvector mygets(void);
89
90#define MAXITS 10      /* maximum number of iterations in twoedimenmin */
91double onedimenmin(double, double, double, double (*f )(double ), double, double *, double *);
92void twodimenmin(double, int, double, double *, double, double (*func1 )(double ), double *, int, double, double *, double, double (*func2 )(double ), double *);
93
94
95
96#endif
Note: See TracBrowser for help on using the repository browser.