relax4 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -5
- data/ext/relax4.c +127 -110
- data/ext/relax4.h +26 -10
- data/ext/relax4_wrap.c +497 -185
- data/lib/relax4/version.rb +1 -1
- data/lib/relax4.rb +2 -2
- metadata +4 -5
- data/ext/relax4_f2c.h +0 -247
data/lib/relax4/version.rb
CHANGED
data/lib/relax4.rb
CHANGED
@@ -30,8 +30,8 @@ module Relax4
|
|
30
30
|
# relax4.h, above).
|
31
31
|
#
|
32
32
|
# @option args [Array<Integer>] :capacities (nil) for each arc; if not
|
33
|
-
# specified (problem is uncapacitated), all arc capacities are set to
|
34
|
-
# capacities must be in [0, +large+].
|
33
|
+
# specified (problem is uncapacitated), all arc capacities are set to
|
34
|
+
# +RELAX4_UNCAPACITATED+; capacities must be in [0, +large+].
|
35
35
|
#
|
36
36
|
# @option args [Array<Integer>] :demands for each node; a node with negative
|
37
37
|
# demand is a surplus node; demands should balance (sum to zero), or else the
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relax4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- John Lees-Miller
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-09-07 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -34,7 +34,6 @@ files:
|
|
34
34
|
- ext/extconf.rb
|
35
35
|
- ext/relax4.c
|
36
36
|
- ext/relax4.h
|
37
|
-
- ext/relax4_f2c.h
|
38
37
|
- ext/relax4_wrap.c
|
39
38
|
- README.rdoc
|
40
39
|
has_rdoc: true
|
data/ext/relax4_f2c.h
DELETED
@@ -1,247 +0,0 @@
|
|
1
|
-
/* RELAX4 includes its own copy of f2c.h in order to avoid depending on f2c,
|
2
|
-
* since we really just need this header.
|
3
|
-
*/
|
4
|
-
|
5
|
-
/* f2c.h -- Standard Fortran to C header file */
|
6
|
-
|
7
|
-
/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed."
|
8
|
-
|
9
|
-
- From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */
|
10
|
-
|
11
|
-
#ifndef RELAX4_F2C_INCLUDE
|
12
|
-
#define RELAX4_F2C_INCLUDE
|
13
|
-
|
14
|
-
#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
|
15
|
-
typedef int integer;
|
16
|
-
typedef unsigned int uinteger;
|
17
|
-
#else
|
18
|
-
typedef long int integer;
|
19
|
-
typedef unsigned long int uinteger;
|
20
|
-
#endif
|
21
|
-
typedef char *address;
|
22
|
-
typedef short int shortint;
|
23
|
-
typedef float real;
|
24
|
-
typedef double doublereal;
|
25
|
-
typedef struct { real r, i; } complex;
|
26
|
-
typedef struct { doublereal r, i; } doublecomplex;
|
27
|
-
#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
|
28
|
-
typedef int logical;
|
29
|
-
#else
|
30
|
-
typedef long int logical;
|
31
|
-
#endif
|
32
|
-
typedef short int shortlogical;
|
33
|
-
typedef char logical1;
|
34
|
-
typedef char integer1;
|
35
|
-
#ifdef INTEGER_STAR_8 /* Adjust for integer*8. */
|
36
|
-
#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
|
37
|
-
typedef long longint; /* system-dependent */
|
38
|
-
typedef unsigned long ulongint; /* system-dependent */
|
39
|
-
#else
|
40
|
-
typedef long long longint; /* system-dependent - oh yeah*/
|
41
|
-
typedef unsigned long long ulongint; /* system-dependent - oh yeah*/
|
42
|
-
#endif
|
43
|
-
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
|
44
|
-
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
|
45
|
-
#endif
|
46
|
-
|
47
|
-
#define TRUE_ (1)
|
48
|
-
#define FALSE_ (0)
|
49
|
-
|
50
|
-
/* Extern is for use with -E */
|
51
|
-
#ifndef Extern
|
52
|
-
#define Extern extern
|
53
|
-
#endif
|
54
|
-
|
55
|
-
/* I/O stuff */
|
56
|
-
|
57
|
-
#ifdef f2c_i2
|
58
|
-
/* for -i2 */
|
59
|
-
typedef short flag;
|
60
|
-
typedef short ftnlen;
|
61
|
-
typedef short ftnint;
|
62
|
-
#else
|
63
|
-
#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
|
64
|
-
typedef int flag;
|
65
|
-
typedef int ftnlen;
|
66
|
-
typedef int ftnint;
|
67
|
-
#else
|
68
|
-
typedef long int flag;
|
69
|
-
typedef long int ftnlen;
|
70
|
-
typedef long int ftnint;
|
71
|
-
#endif
|
72
|
-
#endif
|
73
|
-
|
74
|
-
/*external read, write*/
|
75
|
-
typedef struct
|
76
|
-
{ flag cierr;
|
77
|
-
ftnint ciunit;
|
78
|
-
flag ciend;
|
79
|
-
char *cifmt;
|
80
|
-
ftnint cirec;
|
81
|
-
} cilist;
|
82
|
-
|
83
|
-
/*internal read, write*/
|
84
|
-
typedef struct
|
85
|
-
{ flag icierr;
|
86
|
-
char *iciunit;
|
87
|
-
flag iciend;
|
88
|
-
char *icifmt;
|
89
|
-
ftnint icirlen;
|
90
|
-
ftnint icirnum;
|
91
|
-
} icilist;
|
92
|
-
|
93
|
-
/*open*/
|
94
|
-
typedef struct
|
95
|
-
{ flag oerr;
|
96
|
-
ftnint ounit;
|
97
|
-
char *ofnm;
|
98
|
-
ftnlen ofnmlen;
|
99
|
-
char *osta;
|
100
|
-
char *oacc;
|
101
|
-
char *ofm;
|
102
|
-
ftnint orl;
|
103
|
-
char *oblnk;
|
104
|
-
} olist;
|
105
|
-
|
106
|
-
/*close*/
|
107
|
-
typedef struct
|
108
|
-
{ flag cerr;
|
109
|
-
ftnint cunit;
|
110
|
-
char *csta;
|
111
|
-
} cllist;
|
112
|
-
|
113
|
-
/*rewind, backspace, endfile*/
|
114
|
-
typedef struct
|
115
|
-
{ flag aerr;
|
116
|
-
ftnint aunit;
|
117
|
-
} alist;
|
118
|
-
|
119
|
-
/* inquire */
|
120
|
-
typedef struct
|
121
|
-
{ flag inerr;
|
122
|
-
ftnint inunit;
|
123
|
-
char *infile;
|
124
|
-
ftnlen infilen;
|
125
|
-
ftnint *inex; /*parameters in standard's order*/
|
126
|
-
ftnint *inopen;
|
127
|
-
ftnint *innum;
|
128
|
-
ftnint *innamed;
|
129
|
-
char *inname;
|
130
|
-
ftnlen innamlen;
|
131
|
-
char *inacc;
|
132
|
-
ftnlen inacclen;
|
133
|
-
char *inseq;
|
134
|
-
ftnlen inseqlen;
|
135
|
-
char *indir;
|
136
|
-
ftnlen indirlen;
|
137
|
-
char *infmt;
|
138
|
-
ftnlen infmtlen;
|
139
|
-
char *inform;
|
140
|
-
ftnint informlen;
|
141
|
-
char *inunf;
|
142
|
-
ftnlen inunflen;
|
143
|
-
ftnint *inrecl;
|
144
|
-
ftnint *innrec;
|
145
|
-
char *inblank;
|
146
|
-
ftnlen inblanklen;
|
147
|
-
} inlist;
|
148
|
-
|
149
|
-
#define VOID void
|
150
|
-
|
151
|
-
union Multitype { /* for multiple entry points */
|
152
|
-
integer1 g;
|
153
|
-
shortint h;
|
154
|
-
integer i;
|
155
|
-
/* longint j; */
|
156
|
-
real r;
|
157
|
-
doublereal d;
|
158
|
-
complex c;
|
159
|
-
doublecomplex z;
|
160
|
-
};
|
161
|
-
|
162
|
-
typedef union Multitype Multitype;
|
163
|
-
|
164
|
-
/*typedef long int Long;*/ /* No longer used; formerly in Namelist */
|
165
|
-
|
166
|
-
struct Vardesc { /* for Namelist */
|
167
|
-
char *name;
|
168
|
-
char *addr;
|
169
|
-
ftnlen *dims;
|
170
|
-
int type;
|
171
|
-
};
|
172
|
-
typedef struct Vardesc Vardesc;
|
173
|
-
|
174
|
-
struct Namelist {
|
175
|
-
char *name;
|
176
|
-
Vardesc **vars;
|
177
|
-
int nvars;
|
178
|
-
};
|
179
|
-
typedef struct Namelist Namelist;
|
180
|
-
|
181
|
-
#define abs(x) ((x) >= 0 ? (x) : -(x))
|
182
|
-
#define dabs(x) (doublereal)abs(x)
|
183
|
-
#define min(a,b) ((a) <= (b) ? (a) : (b))
|
184
|
-
#define max(a,b) ((a) >= (b) ? (a) : (b))
|
185
|
-
#define dmin(a,b) (doublereal)min(a,b)
|
186
|
-
#define dmax(a,b) (doublereal)max(a,b)
|
187
|
-
#define bit_test(a,b) ((a) >> (b) & 1)
|
188
|
-
#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b)))
|
189
|
-
#define bit_set(a,b) ((a) | ((uinteger)1 << (b)))
|
190
|
-
|
191
|
-
/* procedure parameter types for -A and -C++ */
|
192
|
-
|
193
|
-
#define F2C_proc_par_types 1
|
194
|
-
#ifdef __cplusplus
|
195
|
-
typedef int /* Unknown procedure type */ (*U_fp)(...);
|
196
|
-
typedef shortint (*J_fp)(...);
|
197
|
-
typedef integer (*I_fp)(...);
|
198
|
-
typedef real (*R_fp)(...);
|
199
|
-
typedef doublereal (*D_fp)(...), (*E_fp)(...);
|
200
|
-
typedef /* Complex */ VOID (*C_fp)(...);
|
201
|
-
typedef /* Double Complex */ VOID (*Z_fp)(...);
|
202
|
-
typedef logical (*L_fp)(...);
|
203
|
-
typedef shortlogical (*K_fp)(...);
|
204
|
-
typedef /* Character */ VOID (*H_fp)(...);
|
205
|
-
typedef /* Subroutine */ int (*S_fp)(...);
|
206
|
-
#else
|
207
|
-
typedef int /* Unknown procedure type */ (*U_fp)();
|
208
|
-
typedef shortint (*J_fp)();
|
209
|
-
typedef integer (*I_fp)();
|
210
|
-
typedef real (*R_fp)();
|
211
|
-
typedef doublereal (*D_fp)(), (*E_fp)();
|
212
|
-
typedef /* Complex */ VOID (*C_fp)();
|
213
|
-
typedef /* Double Complex */ VOID (*Z_fp)();
|
214
|
-
typedef logical (*L_fp)();
|
215
|
-
typedef shortlogical (*K_fp)();
|
216
|
-
typedef /* Character */ VOID (*H_fp)();
|
217
|
-
typedef /* Subroutine */ int (*S_fp)();
|
218
|
-
#endif
|
219
|
-
/* E_fp is for real functions when -R is not specified */
|
220
|
-
typedef VOID C_f; /* complex function */
|
221
|
-
typedef VOID H_f; /* character function */
|
222
|
-
typedef VOID Z_f; /* double complex function */
|
223
|
-
typedef doublereal E_f; /* real function with -R not specified */
|
224
|
-
|
225
|
-
/* undef any lower-case symbols that your C compiler predefines, e.g.: */
|
226
|
-
|
227
|
-
#ifndef Skip_f2c_Undefs
|
228
|
-
#undef cray
|
229
|
-
#undef gcos
|
230
|
-
#undef mc68010
|
231
|
-
#undef mc68020
|
232
|
-
#undef mips
|
233
|
-
#undef pdp11
|
234
|
-
#undef sgi
|
235
|
-
#undef sparc
|
236
|
-
#undef sun
|
237
|
-
#undef sun2
|
238
|
-
#undef sun3
|
239
|
-
#undef sun4
|
240
|
-
#undef u370
|
241
|
-
#undef u3b
|
242
|
-
#undef u3b2
|
243
|
-
#undef u3b5
|
244
|
-
#undef unix
|
245
|
-
#undef vax
|
246
|
-
#endif
|
247
|
-
#endif
|