Indentation cleanup.
[AROS-Contrib.git] / fish / asimplex / simplex.h
blobb34b6d91e8448fc3ad6e70853d7144a73197599e
1 /*****************************************************************************
2 * Variablendeklaration : simplex.h *
3 * Autor : Stefan Förster *
4 * *
5 * Datum | Version | Bemerkung *
6 * -----------|---------|--------------------------------------------------- *
7 * 06.02.1989 | 0.0 | *
8 * 26.02.1989 | 0.1 | EPS_NULL *
9 * 26.02.1989 | 0.2 | VERBOSE, INVERT_FREQUENCY *
10 * 05.03.1989 | 0.3 | #include <errno.h> *
11 * 06.03.1989 | 0.4 | PERCENT auf 0.03 geändert *
12 * 08.03.1989 | 0.5 | Definitionen für mpsx.c *
13 * 14.03.1989 | 1.0 | #define ERR_... *
14 *****************************************************************************/
16 #include <stdio.h>
17 #include <stdlib.h>
18 #include <string.h>
19 #include <signal.h>
20 #include <errno.h>
21 #include <ctype.h>
22 #include <time.h>
23 //#include <stat.h>
24 #include <math.h>
25 #include <exec/exec.h>
26 #include <exec/tasks.h>
27 #include <exec/types.h>
28 #include <intuition/intuition.h>
29 #include <intuition/intuitionbase.h>
31 #define INT int
34 #define NOT_OPTIMAL (USHORT)0x0001
35 #define OPTIMAL (USHORT)0x0002
36 #define NOT_UNBOUNDED (USHORT)0x0004
37 #define UNBOUNDED (USHORT)0x0008
38 #define CLEAR_CUT (USHORT)0x0010
39 #define EMPTY (USHORT)0x0020
40 #define INVERTABLE (USHORT)0x0040
41 #define NOT_INVERTABLE (USHORT)0x0080
42 #define PHASE_I (USHORT)0x0100
43 #define PHASE_II (USHORT)0x0200
44 #define SMALLEST_INDEX (USHORT)0x0400
45 #define STEEPEST_ASCENT (USHORT)0x0800
46 #define LAMBDA_0 (USHORT)0x1000
47 #define LAMBDA_1 (USHORT)0x2000
48 #define LAMBDA_2 (USHORT)0x4000
49 #define VERBOSE (USHORT)0x8000
51 #define _TRUE 1
52 #define _FALSE 0
54 #define PERCENT 0.03 /* 3% : Kriterium, welche PRICE- */
55 /* methode angewendet wird */
56 #define INVERT_FREQUENCY 50L
58 #define EPS_INV 1e-15 /* Kriterium, daß Matrix singulär */
59 #define EPS_NULL 1e-13 /* == 0 */
61 #define ABS(x) ((SHORT)( (x)<0 ? -(x) : (x) ))
62 #define SGN(x) ((SHORT)( (x)<0 ? -1 : 1)) /* SGN(0)==1 */
64 #define S_DOUBLE ((LONG)sizeof(DOUBLE))
65 #define S_SHORT ((LONG)sizeof(SHORT))
68 #define MAX_STRLEN 8 /* Namen dürfen max. 8 Zeichen lang sein */
69 #define BUFFER 256
70 #define BUFFER2 80
71 #define MAX_FILELEN 80 /* willkürlich */
73 #define NAME 0
74 #define ROWS 1
75 #define GOAL ROWS
76 #define COLUMNS 2
77 #define RHS 3
78 #define RANGES 4
79 #define BOUNDS 5
81 #define NUM_SYMBOLS 6
84 #define VAR_LIST 0
85 #define ROWS_LIST 1
86 #define GOALS_LIST 2
87 #define RHS_LIST 3
88 #define RANGES_LIST 4
89 #define BOUNDS_LIST 5
91 #define NUM_LISTS 6
94 #define BIT_NAME (USHORT)0x0001
95 #define BIT_ROWS (USHORT)0x0002
96 #define BIT_COLUMNS (USHORT)0x0004
97 #define BIT_RHS (USHORT)0x0008
98 #define BIT_RANGES (USHORT)0x0010
99 #define BIT_BOUNDS (USHORT)0x0020
100 #define BIT_ENDATA (USHORT)0x0040
101 #define BIT_GOAL (USHORT)0x0080
105 typedef struct item {
106 TEXT string[MAX_STRLEN+2];
107 SHORT nr, anz;
108 struct item *next;
109 } ITEM, *ITEMPTR;
111 #define SIZE_ITEM (LONG)sizeof(ITEM)
115 #define ERR_INVALID_ARGS sys_nerr+1
116 #define ERR_NAME_TOO_LONG sys_nerr+2
117 #define ERR_DOUBLE sys_nerr+3
118 #define ERR_UNKNOWN_ID sys_nerr+4
119 #define ERR_SECTIONS sys_nerr+5
120 #define ERR_2SECTIONS sys_nerr+6
121 #define ERR_UNKNOWN_SEC sys_nerr+7
122 #define ERR_ORDER sys_nerr+8
123 #define ERR_NO_NAME sys_nerr+9
124 #define ERR_NO_ROWS sys_nerr+10
125 #define ERR_NO_GOAL sys_nerr+11
126 #define ERR_NO_COLUMNS sys_nerr+12
127 #define ERR_NO_RHS sys_nerr+13
128 #define ERR_NO_ENDATA sys_nerr+14
129 #define ERR_INV_ROWS_TYPE sys_nerr+15
130 #define ERR_INV_BOUNDS_TYPE sys_nerr+16
131 #define ERR_UP_LO sys_nerr+17
132 #define ERR_INV_RANGES sys_nerr+18
133 #define ERR_MISSING sys_nerr+19
134 #define ERR_FILE_TOO_LONG sys_nerr+20
135 #define ERR_NOT_READ sys_nerr+21
136 #define ERR_NOT_WRITE sys_nerr+22
137 #define ERR_EOF sys_nerr+23
138 #define ERR_MEM sys_nerr+24
139 #define ERR_FATAL sys_nerr+25