gecoder 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/COPYING +17 -0
  2. data/LGPL-LICENSE +458 -0
  3. data/README +20 -0
  4. data/Rakefile +6 -0
  5. data/ext/extconf.rb +29 -0
  6. data/ext/missing.cpp +295 -0
  7. data/ext/missing.h +116 -0
  8. data/ext/vararray.cpp +312 -0
  9. data/ext/vararray.h +146 -0
  10. data/lib/gecoder.rb +4 -0
  11. data/lib/gecoder/bindings.rb +7 -0
  12. data/lib/gecoder/bindings/bindings.rb +2055 -0
  13. data/lib/gecoder/interface.rb +6 -0
  14. data/lib/gecoder/interface/binding_changes.rb +111 -0
  15. data/lib/gecoder/interface/branch.rb +102 -0
  16. data/lib/gecoder/interface/constraints.rb +10 -0
  17. data/lib/gecoder/interface/constraints/distinct.rb +15 -0
  18. data/lib/gecoder/interface/constraints/linear.rb +158 -0
  19. data/lib/gecoder/interface/constraints/relation.rb +76 -0
  20. data/lib/gecoder/interface/enum_wrapper.rb +64 -0
  21. data/lib/gecoder/interface/model.rb +130 -0
  22. data/lib/gecoder/interface/search.rb +23 -0
  23. data/vendor/rust/README +28 -0
  24. data/vendor/rust/bin/cxxgenerator.rb +93 -0
  25. data/vendor/rust/include/rust_checks.hh +115 -0
  26. data/vendor/rust/include/rust_conversions.hh +103 -0
  27. data/vendor/rust/rust.rb +67 -0
  28. data/vendor/rust/rust/attribute.rb +51 -0
  29. data/vendor/rust/rust/bindings.rb +172 -0
  30. data/vendor/rust/rust/class.rb +334 -0
  31. data/vendor/rust/rust/constants.rb +48 -0
  32. data/vendor/rust/rust/container.rb +110 -0
  33. data/vendor/rust/rust/cppifaceparser.rb +129 -0
  34. data/vendor/rust/rust/cwrapper.rb +72 -0
  35. data/vendor/rust/rust/cxxclass.rb +98 -0
  36. data/vendor/rust/rust/element.rb +81 -0
  37. data/vendor/rust/rust/enum.rb +63 -0
  38. data/vendor/rust/rust/function.rb +407 -0
  39. data/vendor/rust/rust/namespace.rb +61 -0
  40. data/vendor/rust/rust/templates/AttributeDefinition.rusttpl +17 -0
  41. data/vendor/rust/rust/templates/AttributeInitBinding.rusttpl +9 -0
  42. data/vendor/rust/rust/templates/BindingsHeader.rusttpl +24 -0
  43. data/vendor/rust/rust/templates/BindingsUnit.rusttpl +46 -0
  44. data/vendor/rust/rust/templates/CWrapperClassDefinitions.rusttpl +64 -0
  45. data/vendor/rust/rust/templates/ClassDeclarations.rusttpl +7 -0
  46. data/vendor/rust/rust/templates/ClassInitialize.rusttpl +6 -0
  47. data/vendor/rust/rust/templates/ConstructorStub.rusttpl +21 -0
  48. data/vendor/rust/rust/templates/CxxClassDefinitions.rusttpl +91 -0
  49. data/vendor/rust/rust/templates/CxxMethodStub.rusttpl +12 -0
  50. data/vendor/rust/rust/templates/CxxStandaloneClassDefinitions.rusttpl +12 -0
  51. data/vendor/rust/rust/templates/EnumDeclarations.rusttpl +3 -0
  52. data/vendor/rust/rust/templates/EnumDefinitions.rusttpl +29 -0
  53. data/vendor/rust/rust/templates/FunctionDefinition.rusttpl +9 -0
  54. data/vendor/rust/rust/templates/FunctionInitAlias.rusttpl +5 -0
  55. data/vendor/rust/rust/templates/FunctionInitBinding.rusttpl +9 -0
  56. data/vendor/rust/rust/templates/MethodInitBinding.rusttpl +9 -0
  57. data/vendor/rust/rust/templates/ModuleDeclarations.rusttpl +3 -0
  58. data/vendor/rust/rust/templates/ModuleDefinitions.rusttpl +3 -0
  59. data/vendor/rust/rust/templates/StandaloneClassDeclarations.rusttpl +5 -0
  60. data/vendor/rust/rust/templates/VariableFunctionCall.rusttpl +14 -0
  61. data/vendor/rust/rust/type.rb +98 -0
  62. data/vendor/rust/test/Makefile +4 -0
  63. data/vendor/rust/test/constants.rb +35 -0
  64. data/vendor/rust/test/cppclass.cc +40 -0
  65. data/vendor/rust/test/cppclass.hh +63 -0
  66. data/vendor/rust/test/cppclass.rb +59 -0
  67. data/vendor/rust/test/cwrapper.c +74 -0
  68. data/vendor/rust/test/cwrapper.h +41 -0
  69. data/vendor/rust/test/cwrapper.rb +56 -0
  70. data/vendor/rust/test/dummyclass.hh +31 -0
  71. data/vendor/rust/test/lib/extension-test.rb +98 -0
  72. data/vendor/rust/test/test-constants.rb +43 -0
  73. data/vendor/rust/test/test-cppclass.rb +82 -0
  74. data/vendor/rust/test/test-cwrapper.rb +77 -0
  75. metadata +144 -0
data/lib/gecoder.rb ADDED
@@ -0,0 +1,4 @@
1
+ $:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__))
2
+
3
+ require 'gecoder/bindings'
4
+ require 'gecoder/interface'
@@ -0,0 +1,7 @@
1
+ require 'gecode.so'
2
+ module Gecode
3
+ # The bindings are located in ::GecodeRaw, so we assign that to ::Gecode::Raw.
4
+ # This is done because bindings/bindings.rb use ::GecodeRaw and appears to
5
+ # have limitations that do not allow using a sub-namespace.
6
+ Raw = ::GecodeRaw
7
+ end
@@ -0,0 +1,2055 @@
1
+ # Copyright (c) 2007, David Cuadrado <krawek@gmail.com>
2
+ # All rights reserved.
3
+
4
+ # Redistribution and use in source and binary forms, with or without
5
+ # modification, are permitted provided that the following conditions are met:
6
+ #
7
+ # 1. Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ # 2. Redistributions in binary form must reproduce the above copyright
10
+ # notice, this list of conditions and the following disclaimer in the
11
+ # documentation and/or other materials provided with the distribution.
12
+ #
13
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
14
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
17
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
+ # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
+ # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
+ # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23
+ # POSSIBILITY OF SUCH DAMAGE.
24
+
25
+
26
+ RUST_PATH = File.dirname(__FILE__) + '/../../../vendor/rust'
27
+ $:.unshift(RUST_PATH) unless $:.include?(RUST_PATH)
28
+ require 'rust'
29
+
30
+ ruby2intargs = %@
31
+
32
+ bool is_Gecode_IntArgs(VALUE arr)
33
+ {
34
+ return is_array(arr);
35
+ }
36
+
37
+ Gecode::IntArgs ruby2Gecode_IntArgs(VALUE arr, int argn = -1);
38
+ Gecode::IntArgs ruby2Gecode_IntArgs(VALUE arr, int argn)
39
+ {
40
+ RArray *array = RARRAY(arr);
41
+ Gecode::IntArgs intargs(array->len);
42
+ for(int i = 0; i < array->len; i++)
43
+ {
44
+ intargs[i] = NUM2INT(array->ptr[i]);
45
+ }
46
+
47
+ return intargs;
48
+ }
49
+ @
50
+
51
+
52
+ Rust::Bindings::create_bindings Rust::Bindings::LangCxx, "gecode" do |b|
53
+ b.include_header 'gecode/kernel.hh', Rust::Bindings::HeaderGlobal
54
+ b.include_header 'gecode/int.hh', Rust::Bindings::HeaderGlobal
55
+ b.include_header 'gecode/search.hh', Rust::Bindings::HeaderGlobal
56
+ b.include_header 'gecode/minimodel.hh', Rust::Bindings::HeaderGlobal
57
+ b.include_header 'missing.h', Rust::Bindings::HeaderLocal
58
+
59
+ b.add_custom_definition ruby2intargs
60
+
61
+ # Is it possible to use namespaces with multiple levels in Rust? I.e. use
62
+ # Gecode::Raw instead of GecodeRaw here (and avoid the hidious renaming)
63
+ # when requiring them.
64
+ b.add_namespace "GecodeRaw", "Gecode" do |ns|
65
+ ns.add_enum "BvarSel" do |enum|
66
+ enum.add_value "BVAR_NONE"
67
+ enum.add_value "BVAR_MIN_MIN"
68
+ enum.add_value "BVAR_MIN_MAX"
69
+ enum.add_value "BVAR_MAX_MIN"
70
+ enum.add_value "BVAR_MAX_MAX"
71
+ enum.add_value "BVAR_SIZE_MIN"
72
+ enum.add_value "BVAR_SIZE_MAX"
73
+ enum.add_value "BVAR_DEGREE_MAX"
74
+ enum.add_value "BVAR_DEGREE_MIN"
75
+ enum.add_value "BVAR_REGRET_MIN_MIN"
76
+ enum.add_value "BVAR_REGRET_MIN_MAX"
77
+ enum.add_value "BVAR_REGRET_MAX_MIN"
78
+ enum.add_value "BVAR_REGRET_MAX_MAX"
79
+ end
80
+
81
+ ns.add_enum "SetBvarSel" do |enum|
82
+ enum.add_value "SETBVAR_NONE"
83
+ enum.add_value "SETBVAR_MIN_CARD"
84
+ enum.add_value "SETBVAR_MAX_CARD"
85
+ enum.add_value "SETBVAR_MIN_UNKNOWN_ELEM"
86
+ enum.add_value "SETBVAR_MAX_UNKNOWN_ELEM"
87
+ end
88
+
89
+ ns.add_enum "SetBvalSel" do |enum|
90
+ enum.add_value "SETBVAL_MIN"
91
+ enum.add_value "SETBVAL_MAX"
92
+ end
93
+
94
+
95
+ ns.add_enum "BvalSel" do |enum|
96
+ enum.add_value "BVAL_MIN"
97
+ enum.add_value "BVAL_MED"
98
+ enum.add_value "BVAL_MAX"
99
+ enum.add_value "BVAL_SPLIT_MIN"
100
+ enum.add_value "BVAL_SPLIT_MAX"
101
+ end
102
+
103
+ ns.add_enum "IntRelType" do |enum|
104
+ enum.add_value "IRT_EQ"
105
+ enum.add_value "IRT_NQ"
106
+ enum.add_value "IRT_LQ"
107
+ enum.add_value "IRT_LE"
108
+ enum.add_value "IRT_GQ"
109
+ enum.add_value "IRT_GR"
110
+ end
111
+
112
+ ns.add_enum "SetRelType" do |enum|
113
+ enum.add_value "SRT_EQ"
114
+ enum.add_value "SRT_NQ"
115
+ enum.add_value "SRT_SUB"
116
+ enum.add_value "SRT_SUP"
117
+ enum.add_value "SRT_DISJ"
118
+ enum.add_value "SRT_CMPL"
119
+ end
120
+
121
+ ns.add_enum "SetOpType " do |enum|
122
+ enum.add_value "SOT_UNION"
123
+ enum.add_value "SOT_DUNION"
124
+ enum.add_value "SOT_INTER"
125
+ enum.add_value "SOT_MINUS"
126
+ end
127
+
128
+ ns.add_enum "IntConLevel" do |enum|
129
+ enum.add_value "ICL_VAL"
130
+ enum.add_value "ICL_BND"
131
+ enum.add_value "ICL_DOM"
132
+ enum.add_value "ICL_DEF"
133
+ end
134
+
135
+ ns.add_enum "SpaceStatus" do |enum|
136
+ enum.add_value "SS_FAILED"
137
+ enum.add_value "SS_SOLVED"
138
+ enum.add_value "SS_BRANCH"
139
+ end
140
+
141
+ ns.add_enum "AvalSel" do |enum|
142
+ enum.add_value "AVAL_MIN"
143
+ enum.add_value "AVAL_MED"
144
+ enum.add_value "AVAL_MAX"
145
+ end
146
+
147
+ ns.add_cxx_class "MIntVarArray" do |klass|
148
+ klass.bindname = "IntVarArray"
149
+ klass.add_constructor
150
+ klass.add_constructor do |func|
151
+ func.add_parameter "Gecode::MSpace *", "home"
152
+ func.add_parameter "int", "n"
153
+ end
154
+
155
+ klass.add_constructor do |func|
156
+ func.add_parameter "Gecode::MSpace *", "home"
157
+ func.add_parameter "int", "n"
158
+ func.add_parameter "int", "min"
159
+ func.add_parameter "int", "max"
160
+ end
161
+
162
+ klass.add_constructor do |func|
163
+ func.add_parameter "Gecode::MSpace *", "home"
164
+ func.add_parameter "int", "n"
165
+ func.add_parameter "Gecode::IntSet", "s"
166
+ end
167
+
168
+ klass.add_method "at", "Gecode::IntVar&" do |method|
169
+ method.add_parameter "int", "index"
170
+ end
171
+
172
+ klass.add_operator "[]", "Gecode::IntVar&" do |method|
173
+ method.add_parameter "int", "index"
174
+ end
175
+
176
+ klass.add_operator "[]=", "Gecode::IntVar&" do |method|
177
+ method.add_parameter "int", "index"
178
+ method.add_parameter "Gecode::IntVar", "val"
179
+ end
180
+
181
+ klass.add_method "size", "int"
182
+
183
+ klass.add_method "debug"
184
+
185
+ end
186
+
187
+
188
+ ns.add_cxx_class "MBoolVarArray" do |klass|
189
+ klass.bindname = "BoolVarArray"
190
+ klass.add_constructor
191
+ klass.add_method "at", "Gecode::BoolVar&" do |method|
192
+ method.add_parameter "int", "index"
193
+ end
194
+
195
+ klass.add_operator "[]", "Gecode::BoolVar&" do |method|
196
+ method.add_parameter "int", "index"
197
+ end
198
+
199
+ klass.add_method "size", "int"
200
+
201
+ klass.add_method "debug"
202
+
203
+ end
204
+
205
+ ns.add_cxx_class "MSetVarArray" do |klass|
206
+ klass.bindname = "SetVarArray"
207
+ klass.add_constructor
208
+
209
+ klass.add_constructor do |method|
210
+ method.add_parameter "Gecode::MSpace *", "home"
211
+ method.add_parameter "int", "n"
212
+ end
213
+
214
+ klass.add_constructor do |method|
215
+ method.add_parameter "Gecode::MSpace *", "home"
216
+ method.add_parameter "int", "n"
217
+ method.add_parameter "int", "glbMin"
218
+ method.add_parameter "int", "glbMax"
219
+ method.add_parameter "int", "lubMin"
220
+ method.add_parameter "int", "lubMax"
221
+ method.add_parameter "int", "minCard"
222
+ method.add_parameter "int", "maxCard"
223
+ end
224
+
225
+ klass.add_constructor do |method|
226
+ method.add_parameter "Gecode::MSpace *", "home"
227
+ method.add_parameter "int", "n"
228
+ method.add_parameter "Gecode::IntSet", "glb"
229
+ method.add_parameter "int", "lubMin"
230
+ method.add_parameter "int", "lubMax"
231
+ method.add_parameter "int", "minCard", true
232
+ method.add_parameter "int", "maxCard", true
233
+ end
234
+
235
+ klass.add_constructor do |method|
236
+ method.add_parameter "Gecode::MSpace *", "home"
237
+ method.add_parameter "int", "n"
238
+ method.add_parameter "int", "glbMin"
239
+ method.add_parameter "int", "glbMax"
240
+ method.add_parameter "Gecode::IntSet", "lub"
241
+ method.add_parameter "int", "minCard", true
242
+ method.add_parameter "int", "maxCard", true
243
+ end
244
+
245
+ klass.add_constructor do |method|
246
+ method.add_parameter "Gecode::MSpace *", "home"
247
+ method.add_parameter "int", "n"
248
+ method.add_parameter "Gecode::IntSet", "glb"
249
+ method.add_parameter "Gecode::IntSet", "lub"
250
+ method.add_parameter "int", "minCard", true
251
+ method.add_parameter "int", "maxCard", true
252
+ end
253
+
254
+ klass.add_method "at", "Gecode::SetVar&" do |method|
255
+ method.add_parameter "int", "index"
256
+ end
257
+
258
+ klass.add_operator "[]", "Gecode::SetVar&" do |method|
259
+ method.add_parameter "int", "index"
260
+ end
261
+
262
+ klass.add_method "size", "int"
263
+
264
+ klass.add_method "debug"
265
+ end
266
+
267
+ ns.add_cxx_class "MBranchingDesc" do |klass|
268
+ klass.bindname = "BranchingDesc"
269
+ klass.add_constructor
270
+ klass.add_method "alternatives", "int"
271
+ klass.add_method "size", "int"
272
+ end
273
+
274
+ ns.add_cxx_class "MSpace" do |klass|
275
+ klass.bindname = "Space"
276
+
277
+ klass.add_constructor
278
+
279
+ klass.add_method "debug"
280
+
281
+ klass.add_method "own" do |method|
282
+ method.add_parameter "Gecode::MIntVarArray *", "x"
283
+ method.add_parameter "char*", "name"
284
+ end
285
+
286
+ klass.add_method "own" do |method|
287
+ method.add_parameter "Gecode::MBoolVarArray *", "x"
288
+ method.add_parameter "char*", "name"
289
+ end
290
+
291
+ klass.add_method "own" do |method|
292
+ method.add_parameter "Gecode::MSetVarArray *", "x"
293
+ method.add_parameter "char*", "name"
294
+ end
295
+
296
+ klass.add_method "intVarArray", "Gecode::MIntVarArray *" do |method|
297
+ method.add_parameter "char *", "name"
298
+ end
299
+
300
+ klass.add_method "boolVarArray", "Gecode::MBoolVarArray *" do |method|
301
+ method.add_parameter "char *", "name"
302
+ end
303
+
304
+ klass.add_method "setVarArray", "Gecode::MSetVarArray *" do |method|
305
+ method.add_parameter "char *", "name"
306
+ end
307
+
308
+ klass.add_method "clone", "Gecode::MSpace *" do |method|
309
+ method.add_parameter "bool", "shared"
310
+ end
311
+
312
+ klass.add_method "status", "int"
313
+
314
+ klass.add_method "propagators", "int"
315
+ klass.add_method "branchings", "int"
316
+ klass.add_method "failed", "bool"
317
+ klass.add_method "cached", "int"
318
+
319
+ klass.add_method "mdescription", "Gecode::MBranchingDesc *", "description"
320
+
321
+ klass.add_method "commit" do |method|
322
+ method.add_parameter "Gecode::MBranchingDesc", "desc" do |param|
323
+ param.custom_conversion = "ruby2Gecode_MBranchingDescPtr(desc, 1)->ptr()"
324
+ end
325
+ method.add_parameter "int", "a"
326
+ end
327
+ end
328
+
329
+ ns.add_namespace "Limits" do |limitsns|
330
+ limitsns.add_namespace "Int" do |intns|
331
+ intns.add_constant "int_max", "Gecode::Limits::Int::int_max"
332
+ intns.add_constant "int_min", "Gecode::Limits::Int::int_min"
333
+ intns.add_constant "double_max", "Gecode::Limits::Int::double_max"
334
+ intns.add_constant "double_min", "Gecode::Limits::Int::double_min"
335
+ end
336
+ limitsns.add_namespace "Set" do |setns|
337
+ setns.add_constant "int_max", "Gecode::Limits::Set::int_max"
338
+ setns.add_constant "int_min", "Gecode::Limits::Set::int_min"
339
+ setns.add_constant "card_max", "Gecode::Limits::Set::card_max"
340
+ end
341
+ end
342
+
343
+ ns.add_cxx_class "IntSet" do |klass|
344
+ klass.add_constructor do |method|
345
+ method.add_parameter "int", "min"
346
+ method.add_parameter "int", "max"
347
+ end
348
+
349
+ klass.add_constructor do |method|
350
+ method.add_parameter "int []", "r"
351
+ method.add_parameter "int", "n"
352
+ end
353
+
354
+ klass.add_method "size", "int"
355
+
356
+ klass.add_method "width", "unsigned int" do |method|
357
+ method.add_parameter "int", "i"
358
+ end
359
+
360
+ klass.add_method "max", "int" do |method|
361
+ method.add_parameter "int", "i"
362
+ end
363
+
364
+ klass.add_method "min", "int" do |method|
365
+ method.add_parameter "int", "i"
366
+ end
367
+
368
+ klass.add_constant "empty", "(Gecode::IntSet *)&Gecode::IntSet::empty"
369
+ end
370
+
371
+ ns.add_cxx_class "IntVar" do |klass|
372
+ klass.add_constructor do |method|
373
+ method.add_parameter "Gecode::MSpace*", "home"
374
+ method.add_parameter "int", "min"
375
+ method.add_parameter "int", "max"
376
+ end
377
+
378
+ klass.add_method "max", "int"
379
+
380
+ klass.add_method "min", "int"
381
+ klass.add_method "med", "int"
382
+ klass.add_method "val", "int"
383
+ klass.add_method "size", "unsigned int"
384
+ klass.add_method "width", "unsigned int"
385
+ klass.add_method "degree", "unsigned int"
386
+
387
+ klass.add_method "range", "bool"
388
+ klass.add_method "assigned", "bool"
389
+ klass.add_method "in", "bool" do |method|
390
+ method.add_parameter "int", "n"
391
+ end
392
+
393
+ klass.add_method "update" do |method|
394
+ method.add_parameter "Gecode::MSpace*", "home"
395
+ method.add_parameter "bool", "share"
396
+ method.add_parameter "Gecode::IntVar", "x"
397
+ end
398
+
399
+ klass.add_operator "+", "Gecode::MiniModel::LinExpr" do |operator|
400
+ operator.add_parameter("int", "i")
401
+ end
402
+
403
+ klass.add_operator "-", "Gecode::MiniModel::LinExpr" do |operator|
404
+ operator.add_parameter("int", "i")
405
+ end
406
+
407
+ klass.add_operator "*", "Gecode::MiniModel::LinExpr" do |operator|
408
+ operator.add_parameter("int", "i")
409
+ end
410
+
411
+ klass.add_operator "!=", "Gecode::MiniModel::LinRel", "different" do |operator|
412
+ operator.add_parameter("Gecode::IntVar", "other")
413
+ end
414
+
415
+ klass.add_operator "==", "Gecode::MiniModel::LinRel", "equal" do |operator|
416
+ operator.add_parameter("Gecode::IntVar", "other")
417
+ end
418
+
419
+ end
420
+
421
+ ns.add_cxx_class "BoolVar" do |klass|
422
+ klass.add_constructor
423
+ klass.add_constructor do |method|
424
+ method.add_parameter "Gecode::MSpace*", "home"
425
+ method.add_parameter "int", "min"
426
+ method.add_parameter "int", "max"
427
+ end
428
+ klass.add_constructor do |method|
429
+ method.add_parameter "Gecode::IntVar", "x"
430
+ end
431
+ klass.add_method "update", "void" do |method|
432
+ method.add_parameter "Gecode::MSpace*", "home"
433
+ method.add_parameter "bool", "share"
434
+ method.add_parameter "Gecode::BoolVar", "x"
435
+ end
436
+ end
437
+
438
+ ns.add_cxx_class "SetVar" do |klass|
439
+ klass.add_constructor
440
+ klass.add_constructor do |method|
441
+ method.add_parameter "Gecode::MSpace*", "home"
442
+ end
443
+ klass.add_constructor do |method|
444
+ method.add_parameter "Gecode::MSpace*", "home"
445
+ method.add_parameter "int", "glbMin"
446
+ method.add_parameter "int", "glbMax"
447
+ method.add_parameter "int", "lubMin"
448
+ method.add_parameter "int", "lubMax"
449
+ method.add_parameter "int", "cardMin"
450
+ method.add_parameter "int", "cardMax"
451
+ end
452
+
453
+ klass.add_constructor do |method|
454
+ method.add_parameter "Gecode::MSpace*", "home"
455
+ method.add_parameter "Gecode::IntSet", "glbD"
456
+ method.add_parameter "int", "lubMin"
457
+ method.add_parameter "int", "lubMax"
458
+ method.add_parameter "int", "cardMin", true
459
+ method.add_parameter "int", "cardMax", true
460
+ end
461
+
462
+ klass.add_constructor do |method|
463
+ method.add_parameter "Gecode::MSpace*", "home"
464
+ method.add_parameter "int", "glbMin"
465
+ method.add_parameter "int", "glbMax"
466
+ method.add_parameter "Gecode::IntSet", "lubD"
467
+ method.add_parameter "int", "cardMin", true
468
+ method.add_parameter "int", "cardMax", true
469
+ end
470
+
471
+ klass.add_constructor do |method|
472
+ method.add_parameter "Gecode::MSpace*", "home"
473
+ method.add_parameter "Gecode::IntSet", "glbD"
474
+ method.add_parameter "Gecode::IntSet", "lubD"
475
+ method.add_parameter "int", "cardMin", true
476
+ method.add_parameter "int", "cardMax", true
477
+ end
478
+
479
+ klass.add_method "glbSize", "int"
480
+ klass.add_method "lubSize", "int"
481
+ klass.add_method "unknownSize", "int"
482
+ klass.add_method "cardMin", "int"
483
+ klass.add_method "cardMax", "int"
484
+ klass.add_method "lubMin", "int"
485
+ klass.add_method "lubMax", "int"
486
+ klass.add_method "glbMin", "int"
487
+ klass.add_method "glbMax", "int"
488
+ klass.add_method "glbSize", "int"
489
+ klass.add_method "contains", "bool" do |method|
490
+ method.add_parameter "int", "i"
491
+ end
492
+
493
+ klass.add_method "notContains", "bool" do |method|
494
+ method.add_parameter "int", "i"
495
+ end
496
+
497
+ klass.add_method "assigned", "bool"
498
+
499
+ klass.add_method "update" do |method|
500
+ method.add_parameter "Gecode::MSpace *", "home"
501
+ method.add_parameter "bool", "shared"
502
+ method.add_parameter "Gecode::SetVar", "x"
503
+ end
504
+ end
505
+
506
+ ns.add_cxx_class "MDFS" do |klass|
507
+ klass.bindname = "DFS"
508
+ klass.add_constructor do |method|
509
+ method.add_parameter "Gecode::MSpace *", "s"
510
+ method.add_parameter "int", "c_d"
511
+ method.add_parameter "int", "a_d"
512
+ method.add_parameter "Gecode::Search::MStop *", "st"
513
+ end
514
+
515
+ klass.add_method "next", "Gecode::MSpace *"
516
+ klass.add_method "statistics", "Gecode::Search::Statistics"
517
+ end
518
+
519
+ # SEARCH NAMESPACE
520
+
521
+ ns.add_namespace "Search" do |searchns|
522
+ searchns.add_cxx_class "MStop" do |klass|
523
+ klass.bindname = "Stop"
524
+ klass.add_constructor
525
+ end
526
+
527
+ searchns.add_cxx_class "Statistics" do |klass|
528
+ klass.add_constructor
529
+ klass.add_attribute "memory", "int"
530
+ klass.add_attribute "propagate", "int"
531
+ klass.add_attribute "fail", "int"
532
+ klass.add_attribute "clone", "int"
533
+ klass.add_attribute "commit", "int"
534
+ end
535
+ end
536
+
537
+ # MINIMODEL NAMESPACE
538
+
539
+ ns.add_namespace "MiniModel" do |minimodelns|
540
+ minimodelns.add_cxx_class "LinExpr" do |klass|
541
+ klass.add_constructor
542
+
543
+ klass.add_method "post" do |method|
544
+ method.add_parameter "Gecode::MSpace *", "home"
545
+ method.add_parameter "Gecode::IntRelType", "irt"
546
+ method.add_parameter "Gecode::IntConLevel", "icl"
547
+ end
548
+
549
+ klass.add_operator "+", "Gecode::MiniModel::LinExpr" do |operator|
550
+ operator.add_parameter("Gecode::MiniModel::LinExpr", "exp")
551
+ end
552
+
553
+ klass.add_operator "+", "Gecode::MiniModel::LinExpr" do |operator|
554
+ operator.add_parameter("Gecode::IntVar", "exp")
555
+ end
556
+
557
+ klass.add_operator "+", "Gecode::MiniModel::LinExpr" do |operator|
558
+ operator.add_parameter("int", "c")
559
+ end
560
+
561
+ klass.add_operator "-", "Gecode::MiniModel::LinExpr" do |operator|
562
+ operator.add_parameter("Gecode::MiniModel::LinExpr", "exp")
563
+ end
564
+
565
+ klass.add_operator "-", "Gecode::MiniModel::LinExpr" do |operator|
566
+ operator.add_parameter("Gecode::IntVar", "exp")
567
+ end
568
+
569
+ klass.add_operator "-", "Gecode::MiniModel::LinExpr" do |operator|
570
+ operator.add_parameter("int", "c")
571
+ end
572
+
573
+ klass.add_operator "*", "Gecode::MiniModel::LinExpr" do |operator|
574
+ operator.add_parameter("int", "c")
575
+ end
576
+
577
+ klass.add_operator "==", "Gecode::MiniModel::LinRel", "equal" do |operator|
578
+ operator.add_parameter "Gecode::MiniModel::LinExpr", "other"
579
+ end
580
+
581
+ klass.add_operator "!=", "Gecode::MiniModel::LinRel", "different" do |operator|
582
+ operator.add_parameter "Gecode::MiniModel::LinExpr", "other"
583
+ end
584
+ end
585
+
586
+ minimodelns.add_cxx_class "BoolExpr" do |klass| # TODO
587
+ klass.add_enum "NodeType" do |enum|
588
+ enum.add_value "BT_VAR"
589
+ enum.add_value "BT_NOT"
590
+ enum.add_value "BT_AND"
591
+ enum.add_value "BT_OR"
592
+ enum.add_value "BT_IMP"
593
+ enum.add_value "BT_XOR"
594
+ enum.add_value "BT_EQV"
595
+ enum.add_value "BT_RLIN"
596
+ end
597
+ klass.add_constructor do |method|
598
+ method.add_parameter "Gecode::MiniModel::BoolExpr", "e"
599
+ end
600
+
601
+ klass.add_constructor do |method|
602
+ method.add_parameter "Gecode::MiniModel::BoolExpr", "l"
603
+ method.add_parameter "Gecode::MiniModel::BoolExpr::NodeType", "t"
604
+ method.add_parameter "Gecode::MiniModel::BoolExpr", "r"
605
+ end
606
+
607
+ klass.add_constructor do |method|
608
+ method.add_parameter "Gecode::BoolVar", "e"
609
+ end
610
+
611
+ klass.add_constructor do |method|
612
+ method.add_parameter "Gecode::MiniModel::BoolExpr", "l"
613
+ method.add_parameter "Gecode::MiniModel::BoolExpr::NodeType", "t"
614
+ end
615
+
616
+ klass.add_constructor do |method|
617
+ method.add_parameter "Gecode::MiniModel::LinRel", "e"
618
+ end
619
+ end
620
+
621
+ minimodelns.add_cxx_class "BoolRel" do |klass|
622
+ klass.add_constructor do |method|
623
+ method.add_parameter "Gecode::MiniModel::BoolExpr", "e"
624
+ method.add_parameter "bool", "t"
625
+ end
626
+ end
627
+
628
+ minimodelns.add_cxx_class "LinRel" do |klass|
629
+ klass.add_constructor
630
+
631
+ klass.add_constructor do |method|
632
+ method.add_parameter "Gecode::MiniModel::LinExpr", "l"
633
+ method.add_parameter "Gecode::IntRelType", "irt"
634
+ method.add_parameter "Gecode::MiniModel::LinExpr", "r"
635
+ end
636
+
637
+ klass.add_constructor do |method|
638
+ method.add_parameter "Gecode::MiniModel::LinExpr", "l"
639
+ method.add_parameter "Gecode::IntRelType", "irt"
640
+ method.add_parameter "int", "r"
641
+ end
642
+
643
+ klass.add_constructor do |method|
644
+ method.add_parameter "int", "l"
645
+ method.add_parameter "Gecode::IntRelType", "irt"
646
+ method.add_parameter "Gecode::MiniModel::LinExpr", "r"
647
+ end
648
+
649
+ klass.add_method "post", "void" do |method|
650
+ method.add_parameter "Gecode::MSpace*", "home"
651
+ method.add_parameter "bool", "t"
652
+ method.add_parameter "Gecode::IntConLevel", "icl"
653
+ end
654
+ klass.add_method "post", "void" do |method|
655
+ method.add_parameter "Gecode::MSpace*", "home"
656
+ method.add_parameter "Gecode::BoolVar", "b"
657
+ end
658
+
659
+ # klass.add_operator "==", "Gecode::MiniModel::LinRel", "equal" do |operator|
660
+ # operator.add_parameter "int", "i"
661
+ # end
662
+ end
663
+ end
664
+
665
+
666
+
667
+ # INT POSTING FUNCTIONS
668
+
669
+ ns.add_function "abs" do |func|
670
+ func.add_parameter "Gecode::MSpace *", "home"
671
+ func.add_parameter "Gecode::IntVar", "x0"
672
+ func.add_parameter "Gecode::IntVar", "x1"
673
+ func.add_parameter "Gecode::IntConLevel", "icl", true
674
+ end
675
+
676
+ ns.add_function "max" do |func|
677
+ func.add_parameter "Gecode::MSpace *", "home"
678
+ func.add_parameter "Gecode::IntVar", "x0"
679
+ func.add_parameter "Gecode::IntVar", "x1"
680
+ func.add_parameter "Gecode::IntVar", "x2"
681
+ func.add_parameter "Gecode::IntConLevel", "icl", true
682
+ end
683
+
684
+ ns.add_function "max" do |func|
685
+ func.add_parameter "Gecode::MSpace *", "home"
686
+ func.add_parameter "Gecode::MIntVarArray", "arr" do |param|
687
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 1)->ptr()"
688
+ end
689
+ func.add_parameter "Gecode::IntVar", "y"
690
+ func.add_parameter "Gecode::IntConLevel", "icl", true
691
+ end
692
+
693
+ ns.add_function "min" do |func|
694
+ func.add_parameter "Gecode::MSpace *", "home"
695
+ func.add_parameter "Gecode::IntVar", "x0"
696
+ func.add_parameter "Gecode::IntVar", "x1"
697
+ func.add_parameter "Gecode::IntVar", "x2"
698
+ func.add_parameter "Gecode::IntConLevel", "icl", true
699
+ end
700
+
701
+ ns.add_function "min" do |func|
702
+ func.add_parameter "Gecode::MSpace *", "home"
703
+ func.add_parameter "Gecode::MIntVarArray", "x" do |param|
704
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 1)->ptr()"
705
+ end
706
+ func.add_parameter "Gecode::IntVar", "y"
707
+ func.add_parameter "Gecode::IntConLevel", "icl", true
708
+ end
709
+
710
+ ns.add_function "mult" do |func|
711
+ func.add_parameter "Gecode::MSpace *", "home"
712
+ func.add_parameter "Gecode::IntVar", "x0"
713
+ func.add_parameter "Gecode::IntVar", "x1"
714
+ func.add_parameter "Gecode::IntVar", "x2"
715
+ func.add_parameter "Gecode::IntConLevel", "icl", true
716
+ end
717
+
718
+ # Bool post functions
719
+
720
+ ns.add_function "bool_not" do |func|
721
+ func.add_parameter "Gecode::MSpace *", "home"
722
+ func.add_parameter "Gecode::BoolVar", "b0"
723
+ func.add_parameter "Gecode::BoolVar", "b1"
724
+ func.add_parameter "Gecode::IntConLevel", "icl", true
725
+ end
726
+
727
+ ns.add_function "bool_eq" do |func|
728
+ func.add_parameter "Gecode::MSpace *", "home"
729
+ func.add_parameter "Gecode::BoolVar", "b0"
730
+ func.add_parameter "Gecode::BoolVar", "b1"
731
+ func.add_parameter "Gecode::IntConLevel", "icl", true
732
+ end
733
+
734
+ ns.add_function "bool_and" do |func|
735
+ func.add_parameter "Gecode::MSpace *", "home"
736
+ func.add_parameter "Gecode::BoolVar", "b0"
737
+ func.add_parameter "Gecode::BoolVar", "b1"
738
+ func.add_parameter "Gecode::BoolVar", "b2"
739
+ func.add_parameter "Gecode::IntConLevel", "icl", true
740
+ end
741
+
742
+ ns.add_function "bool_and" do |func|
743
+ func.add_parameter "Gecode::MSpace *", "home"
744
+ func.add_parameter "Gecode::BoolVar", "b0"
745
+ func.add_parameter "Gecode::BoolVar", "b1"
746
+ func.add_parameter "bool", "b2"
747
+ func.add_parameter "Gecode::IntConLevel", "icl", true
748
+ end
749
+
750
+ ns.add_function "bool_and" do |func|
751
+ func.add_parameter "Gecode::MSpace *", "home"
752
+ func.add_parameter "Gecode::MBoolVarArray", "b0" do |param|
753
+ param.custom_conversion = "*reinterpret_cast<Gecode::BoolVarArgs *>(ruby2Gecode_MBoolVarArrayPtr(argv[1], 1)->ptr())"
754
+ end
755
+ func.add_parameter "Gecode::BoolVar", "c"
756
+ func.add_parameter "Gecode::IntConLevel", "icl", true
757
+ end
758
+
759
+ ns.add_function "bool_and" do |func|
760
+ func.add_parameter "Gecode::MSpace *", "home"
761
+ func.add_parameter "Gecode::MBoolVarArray", "b0" do |param|
762
+ param.custom_conversion = "*reinterpret_cast<Gecode::BoolVarArgs *>(ruby2Gecode_MBoolVarArrayPtr(argv[1], 1)->ptr())"
763
+ end
764
+ func.add_parameter "bool", "c"
765
+ func.add_parameter "Gecode::IntConLevel", "icl", true
766
+ end
767
+
768
+ ns.add_function "bool_or" do |func|
769
+ func.add_parameter "Gecode::MSpace *", "home"
770
+ func.add_parameter "Gecode::BoolVar", "b0"
771
+ func.add_parameter "Gecode::BoolVar", "b1"
772
+ func.add_parameter "Gecode::BoolVar", "b2"
773
+ func.add_parameter "Gecode::IntConLevel", "icl", true
774
+ end
775
+
776
+ ns.add_function "bool_or" do |func|
777
+ func.add_parameter "Gecode::MSpace *", "home"
778
+ func.add_parameter "Gecode::BoolVar", "b0"
779
+ func.add_parameter "Gecode::BoolVar", "b1"
780
+ func.add_parameter "bool", "b2"
781
+ func.add_parameter "Gecode::IntConLevel", "icl", true
782
+ end
783
+
784
+ ns.add_function "bool_or" do |func|
785
+ func.add_parameter "Gecode::MSpace *", "home"
786
+ func.add_parameter "Gecode::MBoolVarArray", "b" do |param|
787
+ param.custom_conversion = "*reinterpret_cast<Gecode::BoolVarArgs *>(ruby2Gecode_MBoolVarArrayPtr(argv[1], 2)->ptr())"
788
+ end
789
+ func.add_parameter "Gecode::BoolVar", "c"
790
+ func.add_parameter "Gecode::IntConLevel", "icl", true
791
+ end
792
+
793
+ ns.add_function "bool_or" do |func|
794
+ func.add_parameter "Gecode::MSpace *", "home"
795
+ func.add_parameter "Gecode::MBoolVarArray", "b" do |param|
796
+ param.custom_conversion = "*reinterpret_cast<Gecode::BoolVarArgs *>(ruby2Gecode_MBoolVarArrayPtr(argv[1], 2)->ptr())"
797
+ end
798
+ func.add_parameter "bool", "c"
799
+ func.add_parameter "Gecode::IntConLevel", "icl", true
800
+ end
801
+
802
+ ns.add_function "bool_imp" do |func|
803
+ func.add_parameter "Gecode::MSpace *", "home"
804
+ func.add_parameter "Gecode::BoolVar", "b0"
805
+ func.add_parameter "Gecode::BoolVar", "b1"
806
+ func.add_parameter "Gecode::BoolVar", "b2"
807
+ func.add_parameter "Gecode::IntConLevel", "icl", true
808
+ end
809
+
810
+ ns.add_function "bool_imp" do |func|
811
+ func.add_parameter "Gecode::MSpace *", "home"
812
+ func.add_parameter "Gecode::BoolVar", "b0"
813
+ func.add_parameter "Gecode::BoolVar", "b1"
814
+ func.add_parameter "bool", "b2"
815
+ func.add_parameter "Gecode::IntConLevel", "icl", true
816
+ end
817
+
818
+ ns.add_function "bool_eqv" do |func|
819
+ func.add_parameter "Gecode::MSpace *", "home"
820
+ func.add_parameter "Gecode::BoolVar", "b0"
821
+ func.add_parameter "Gecode::BoolVar", "b1"
822
+ func.add_parameter "Gecode::BoolVar", "b2"
823
+ func.add_parameter "Gecode::IntConLevel", "icl", true
824
+ end
825
+
826
+ ns.add_function "bool_eqv" do |func|
827
+ func.add_parameter "Gecode::MSpace *", "home"
828
+ func.add_parameter "Gecode::BoolVar", "b0"
829
+ func.add_parameter "Gecode::BoolVar", "b1"
830
+ func.add_parameter "bool", "b2"
831
+ func.add_parameter "Gecode::IntConLevel", "icl", true
832
+ end
833
+
834
+ ns.add_function "bool_xor" do |func|
835
+ func.add_parameter "Gecode::MSpace *", "home"
836
+ func.add_parameter "Gecode::BoolVar", "b0"
837
+ func.add_parameter "Gecode::BoolVar", "b1"
838
+ func.add_parameter "Gecode::BoolVar", "b2"
839
+ func.add_parameter "Gecode::IntConLevel", "icl", true
840
+ end
841
+
842
+ ns.add_function "bool_xor" do |func|
843
+ func.add_parameter "Gecode::MSpace *", "home"
844
+ func.add_parameter "Gecode::BoolVar", "b0"
845
+ func.add_parameter "Gecode::BoolVar", "b1"
846
+ func.add_parameter "bool", "b2"
847
+ func.add_parameter "Gecode::IntConLevel", "icl", true
848
+ end
849
+
850
+ #
851
+
852
+ ns.add_function "branch" do |func|
853
+ func.add_parameter "Gecode::MSpace *", "home"
854
+ func.add_parameter "Gecode::MIntVarArray *", "iva" do |param|
855
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
856
+ end
857
+ func.add_parameter "Gecode::BvarSel", "vars"
858
+ func.add_parameter "Gecode::BvalSel", "vals"
859
+ end
860
+
861
+ ns.add_function "branch" do |func|
862
+ func.add_parameter "Gecode::MSpace *", "home"
863
+ func.add_parameter "Gecode::MSetVarArray *", "sva" do |param|
864
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(argv[1], 2)->ptr()"
865
+ end
866
+ func.add_parameter "Gecode::SetBvarSel", "vars"
867
+ func.add_parameter "Gecode::SetBvalSel", "vals"
868
+ end
869
+
870
+ ns.add_function "assign" do |func|
871
+ func.add_parameter "Gecode::MSpace *", "home"
872
+ func.add_parameter "Gecode::MIntVarArray *", "iva" do |param|
873
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(iva, 1)->ptr()"
874
+ end
875
+ func.add_parameter "Gecode::AvalSel", "vals"
876
+ end
877
+
878
+ ns.add_function "channel" do |func|
879
+ func.add_parameter "Gecode::MSpace*", "home"
880
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
881
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
882
+ end
883
+ func.add_parameter "Gecode::MIntVarArray *", "y" do |param|
884
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
885
+ end
886
+ func.add_parameter "Gecode::IntConLevel", "icl", true
887
+ end
888
+
889
+ ns.add_function "count" do |func|
890
+ func.add_parameter "Gecode::MSpace*", "home"
891
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
892
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
893
+ end
894
+
895
+ func.add_parameter "int", "y"
896
+ func.add_parameter "Gecode::IntRelType", "r"
897
+ func.add_parameter "int", "m"
898
+ func.add_parameter "Gecode::IntConLevel", "icl", true
899
+ end
900
+
901
+ ns.add_function "count" do |func|
902
+ func.add_parameter "Gecode::MSpace*", "home"
903
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
904
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
905
+ end
906
+
907
+ func.add_parameter "Gecode::IntVar", "y"
908
+ func.add_parameter "Gecode::IntRelType", "r"
909
+ func.add_parameter "int", "m"
910
+ func.add_parameter "Gecode::IntConLevel", "icl", true
911
+ end
912
+
913
+ ns.add_function "count" do |func|
914
+ func.add_parameter "Gecode::MSpace*", "home"
915
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
916
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
917
+ end
918
+
919
+ func.add_parameter "int", "y"
920
+ func.add_parameter "Gecode::IntRelType", "r"
921
+ func.add_parameter "Gecode::IntVar", "m"
922
+ func.add_parameter "Gecode::IntConLevel", "icl", true
923
+ end
924
+
925
+ ns.add_function "count" do |func|
926
+ func.add_parameter "Gecode::MSpace*", "home"
927
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
928
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
929
+ end
930
+
931
+ func.add_parameter "Gecode::IntVar", "y"
932
+ func.add_parameter "Gecode::IntRelType", "r"
933
+ func.add_parameter "Gecode::IntVar", "m"
934
+ func.add_parameter "Gecode::IntConLevel", "icl", true
935
+ end
936
+
937
+
938
+ ns.add_function "cumulatives", "void" do |method|
939
+ method.add_parameter "Gecode::MSpace*", "home"
940
+ method.add_parameter "Gecode::IntArgs&", "machine" do |param|
941
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
942
+ end
943
+ method.add_parameter "Gecode::MIntVarArray", "start" do |param|
944
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
945
+ end
946
+ method.add_parameter "Gecode::MIntVarArray", "duration" do |param|
947
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
948
+ end
949
+ method.add_parameter "Gecode::MIntVarArray", "end" do |param|
950
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[4], 5)->ptr()"
951
+ end
952
+ method.add_parameter "Gecode::MIntVarArray", "height" do |param|
953
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[5], 6)->ptr()"
954
+ end
955
+ method.add_parameter "Gecode::IntArgs&", "limit"
956
+ method.add_parameter "bool", "at_most"
957
+ method.add_parameter "Gecode::IntConLevel", "icl", true
958
+ end
959
+
960
+ ns.add_function "cumulatives", "void" do |method|
961
+ method.add_parameter "Gecode::MSpace*", "home"
962
+ method.add_parameter "Gecode::IntArgs&", "machine" do |param|
963
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
964
+ end
965
+ method.add_parameter "Gecode::MIntVarArray", "start" do |param|
966
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
967
+ end
968
+ method.add_parameter "Gecode::IntArgs&", "duration"
969
+ method.add_parameter "Gecode::MIntVarArray", "end" do |param|
970
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[4], 5)->ptr()"
971
+ end
972
+ method.add_parameter "Gecode::MIntVarArray", "height" do |param|
973
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[5], 6)->ptr()"
974
+ end
975
+ method.add_parameter "Gecode::IntArgs&", "limit"
976
+ method.add_parameter "bool", "at_most"
977
+ method.add_parameter "Gecode::IntConLevel", "icl", true
978
+ end
979
+
980
+ ns.add_function "cumulatives", "void" do |method|
981
+ method.add_parameter "Gecode::MSpace*", "home"
982
+ method.add_parameter "Gecode::IntArgs&", "machine"
983
+ method.add_parameter "Gecode::MIntVarArray", "start" do |param|
984
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
985
+ end
986
+ method.add_parameter "Gecode::IntArgs&", "duration"
987
+ method.add_parameter "Gecode::MIntVarArray", "end" do |param|
988
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[4], 5)->ptr()"
989
+ end
990
+ method.add_parameter "Gecode::MIntVarArray", "height" do |param|
991
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[5], 6)->ptr()"
992
+ end
993
+ method.add_parameter "Gecode::IntArgs&", "limit"
994
+ method.add_parameter "bool", "at_most"
995
+ method.add_parameter "Gecode::IntConLevel", "icl", true
996
+ end
997
+
998
+ ns.add_function "cumulatives", "void" do |method|
999
+ method.add_parameter "Gecode::MSpace*", "home"
1000
+ method.add_parameter "Gecode::IntArgs&", "machine" do |param|
1001
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1002
+ end
1003
+ method.add_parameter "Gecode::MIntVarArray", "start" do |param|
1004
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1005
+ end
1006
+ method.add_parameter "Gecode::MIntVarArray", "duration" do |param|
1007
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
1008
+ end
1009
+ method.add_parameter "Gecode::MIntVarArray", "end" do |param|
1010
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[4], 5)->ptr()"
1011
+ end
1012
+ method.add_parameter "Gecode::IntArgs&", "height"
1013
+ method.add_parameter "Gecode::IntArgs&", "limit"
1014
+ method.add_parameter "bool", "at_most"
1015
+ method.add_parameter "Gecode::IntConLevel", "icl", true
1016
+ end
1017
+
1018
+ ns.add_function "cumulatives", "void" do |method|
1019
+ method.add_parameter "Gecode::MSpace*", "home"
1020
+ method.add_parameter "Gecode::IntArgs&", "machine"
1021
+ method.add_parameter "Gecode::MIntVarArray", "start" do |param|
1022
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1023
+ end
1024
+ method.add_parameter "Gecode::MIntVarArray", "duration" do |param|
1025
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
1026
+ end
1027
+ method.add_parameter "Gecode::MIntVarArray", "end" do |param|
1028
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[4], 5)->ptr()"
1029
+ end
1030
+ method.add_parameter "Gecode::IntArgs&", "height"
1031
+ method.add_parameter "Gecode::IntArgs&", "limit"
1032
+ method.add_parameter "bool", "at_most"
1033
+ method.add_parameter "Gecode::IntConLevel", "icl"
1034
+ end
1035
+
1036
+ ns.add_function "cumulatives", "void" do |method|
1037
+ method.add_parameter "Gecode::MSpace*", "home"
1038
+ method.add_parameter "Gecode::IntArgs&", "machine" do |param|
1039
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1040
+ end
1041
+ method.add_parameter "Gecode::MIntVarArray", "start" do |param|
1042
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1043
+ end
1044
+ method.add_parameter "Gecode::IntArgs&", "duration"
1045
+ method.add_parameter "Gecode::MIntVarArray", "end" do |param|
1046
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[4], 5)->ptr()"
1047
+ end
1048
+ method.add_parameter "Gecode::IntArgs&", "height"
1049
+ method.add_parameter "Gecode::IntArgs&", "limit"
1050
+ method.add_parameter "bool", "at_most"
1051
+ method.add_parameter "Gecode::IntConLevel", "icl"
1052
+ end
1053
+
1054
+ ns.add_function "cumulatives", "void" do |method|
1055
+ method.add_parameter "Gecode::MSpace*", "home"
1056
+ method.add_parameter "Gecode::IntArgs&", "machine"
1057
+ method.add_parameter "Gecode::MIntVarArray", "start" do |param|
1058
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1059
+ end
1060
+ method.add_parameter "Gecode::IntArgs&", "duration"
1061
+ method.add_parameter "Gecode::MIntVarArray", "end" do |param|
1062
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[4], 5)->ptr()"
1063
+ end
1064
+ method.add_parameter "Gecode::IntArgs&", "height"
1065
+ method.add_parameter "Gecode::IntArgs&", "limit"
1066
+ method.add_parameter "bool", "at_most"
1067
+ method.add_parameter "Gecode::IntConLevel", "icl", true
1068
+ end
1069
+
1070
+ ns.add_function "distinct" do |func|
1071
+ func.add_parameter "Gecode::MSpace*", "home"
1072
+ func.add_parameter "Gecode::MIntVarArray *", "iva" do |param|
1073
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1074
+ end
1075
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1076
+ end
1077
+
1078
+ ns.add_function "distinct" do |func|
1079
+ func.add_parameter "Gecode::MSpace*", "home"
1080
+ func.add_parameter "Gecode::IntArgs", "x"
1081
+ func.add_parameter "Gecode::MIntVarArray *", "iva" do |param|
1082
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1083
+ end
1084
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1085
+ end
1086
+
1087
+
1088
+ ns.add_function "dom" do |func|
1089
+ func.add_parameter "Gecode::MSpace*", "home"
1090
+ func.add_parameter "Gecode::IntVar", "x"
1091
+ func.add_parameter "int", "l"
1092
+ func.add_parameter "int", "m"
1093
+ func.add_parameter "Gecode::IntConLevel", "icl"
1094
+ end
1095
+
1096
+ ns.add_function "dom" do |func|
1097
+ func.add_parameter "Gecode::MSpace*", "home"
1098
+ func.add_parameter "Gecode::MIntVarArray *", "iva" do |param|
1099
+ param.custom_conversion = "*reinterpret_cast<Gecode::IntVarArgs *>(ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr())"
1100
+ end
1101
+ func.add_parameter "int", "l"
1102
+ func.add_parameter "int", "m"
1103
+ func.add_parameter "Gecode::IntConLevel", "icl"
1104
+ end
1105
+
1106
+ ns.add_function "dom" do |func|
1107
+ func.add_parameter "Gecode::MSpace*", "home"
1108
+ func.add_parameter "Gecode::IntVar", "x"
1109
+ func.add_parameter "Gecode::IntSet", "s"
1110
+ func.add_parameter "Gecode::IntConLevel", "icl"
1111
+ end
1112
+
1113
+ ns.add_function "dom" do |func|
1114
+ func.add_parameter "Gecode::MSpace*", "home"
1115
+ func.add_parameter "Gecode::MIntVarArray *", "iva" do |param|
1116
+ param.custom_conversion = "*reinterpret_cast<Gecode::IntVarArgs *>(ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr())"
1117
+ end
1118
+ func.add_parameter "Gecode::IntSet", "s"
1119
+ func.add_parameter "Gecode::IntConLevel", "icl"
1120
+ end
1121
+
1122
+ ns.add_function "dom" do |func|
1123
+ func.add_parameter "Gecode::MSpace*", "home"
1124
+ func.add_parameter "Gecode::IntVar", "x"
1125
+ func.add_parameter "int", "l"
1126
+ func.add_parameter "int", "m"
1127
+ func.add_parameter "Gecode::BoolVar", "b"
1128
+ func.add_parameter "Gecode::IntConLevel", "icl"
1129
+ end
1130
+
1131
+ ns.add_function "dom" do |func|
1132
+ func.add_parameter "Gecode::MSpace*", "home"
1133
+ func.add_parameter "Gecode::IntVar", "x"
1134
+ func.add_parameter "Gecode::IntSet", "s"
1135
+ func.add_parameter "Gecode::BoolVar", "b"
1136
+ func.add_parameter "Gecode::IntConLevel", "icl"
1137
+ end
1138
+
1139
+ ns.add_function "element", "void" do |func|
1140
+ func.add_parameter "Gecode::MSpace*", "home"
1141
+ func.add_parameter "Gecode::IntArgs&", "x"
1142
+ func.add_parameter "Gecode::IntVar", "y0"
1143
+ func.add_parameter "Gecode::IntVar", "y1"
1144
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1145
+ end
1146
+
1147
+ ns.add_function "element", "void" do |func|
1148
+ func.add_parameter "Gecode::MSpace*", "home"
1149
+ func.add_parameter "Gecode::MIntVarArray *", "iva" do |param|
1150
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1151
+ end
1152
+ func.add_parameter "Gecode::IntVar", "y0"
1153
+ func.add_parameter "Gecode::IntVar", "y1"
1154
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1155
+ end
1156
+
1157
+ ns.add_function "gcc", "void" do |func|
1158
+ func.add_parameter "Gecode::MSpace*", "home"
1159
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1160
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1161
+ end
1162
+ func.add_parameter "Gecode::IntArgs", "c"
1163
+ func.add_parameter "int", "m"
1164
+ func.add_parameter "int", "unspec_low"
1165
+ func.add_parameter "int", "unspec_up"
1166
+ func.add_parameter "int", "min"
1167
+ func.add_parameter "int", "max"
1168
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1169
+ end
1170
+
1171
+ ns.add_function "gcc", "void" do |func|
1172
+ func.add_parameter "Gecode::MSpace*", "home"
1173
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1174
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1175
+ end
1176
+ func.add_parameter "Gecode::IntArgs", "c"
1177
+ func.add_parameter "int", "m"
1178
+ func.add_parameter "int", "unspec"
1179
+ func.add_parameter "int", "min"
1180
+ func.add_parameter "int", "max"
1181
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1182
+ end
1183
+
1184
+ ns.add_function "gcc", "void" do |func|
1185
+ func.add_parameter "Gecode::MSpace*", "home"
1186
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1187
+ param.custom_conversion = "*reinterpret_cast<Gecode::IntVarArgs *>(ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr())"
1188
+ end
1189
+ func.add_parameter "int", "lb"
1190
+ func.add_parameter "int", "ub"
1191
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1192
+ end
1193
+
1194
+ ns.add_function "gcc", "void" do |func|
1195
+ func.add_parameter "Gecode::MSpace*", "home"
1196
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1197
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1198
+ end
1199
+ func.add_parameter "int", "ub"
1200
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1201
+ end
1202
+
1203
+ ns.add_function "gcc", "void" do |func|
1204
+ func.add_parameter "Gecode::MSpace*", "home"
1205
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1206
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1207
+ end
1208
+ func.add_parameter "Gecode::MIntVarArray *", "c" do |param|
1209
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1210
+ end
1211
+ func.add_parameter "int", "min"
1212
+ func.add_parameter "int", "max"
1213
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1214
+ end
1215
+
1216
+ ns.add_function "gcc", "void" do |func|
1217
+ func.add_parameter "Gecode::MSpace*", "home"
1218
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1219
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1220
+ end
1221
+ func.add_parameter "Gecode::IntArgs", "v"
1222
+ func.add_parameter "Gecode::MIntVarArray *", "c" do |param|
1223
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
1224
+ end
1225
+ func.add_parameter "int", "m"
1226
+ func.add_parameter "int", "unspec"
1227
+ func.add_parameter "bool", "all"
1228
+ func.add_parameter "int", "min"
1229
+ func.add_parameter "int", "max"
1230
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1231
+ end
1232
+
1233
+ ns.add_function "linear", "void" do |func|
1234
+ func.add_parameter "Gecode::MSpace*", "home"
1235
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1236
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1237
+ end
1238
+ func.add_parameter "Gecode::IntRelType", "r"
1239
+ func.add_parameter "int", "c"
1240
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1241
+ end
1242
+ ns.add_function "linear", "void" do |func|
1243
+ func.add_parameter "Gecode::MSpace*", "home"
1244
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1245
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1246
+ end
1247
+ func.add_parameter "Gecode::IntRelType", "r"
1248
+ func.add_parameter "int", "c"
1249
+ func.add_parameter "Gecode::BoolVar", "b"
1250
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1251
+ end
1252
+
1253
+ ns.add_function "linear", "void" do |func|
1254
+ func.add_parameter "Gecode::MSpace*", "home"
1255
+ func.add_parameter "Gecode::IntArgs", "a"
1256
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1257
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1258
+ end
1259
+ func.add_parameter "Gecode::IntRelType", "r"
1260
+ func.add_parameter "int", "c"
1261
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1262
+ end
1263
+
1264
+ ns.add_function "linear", "void" do |func|
1265
+ func.add_parameter "Gecode::MSpace*", "home"
1266
+ func.add_parameter "Gecode::IntArgs", "a"
1267
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1268
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1269
+ end
1270
+ func.add_parameter "Gecode::IntRelType", "r"
1271
+ func.add_parameter "int", "c"
1272
+ func.add_parameter "Gecode::BoolVar", "b"
1273
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1274
+ end
1275
+
1276
+ ns.add_function "linear", "void" do |func|
1277
+ func.add_parameter "Gecode::MSpace*", "home"
1278
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1279
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1280
+ end
1281
+ func.add_parameter "Gecode::IntRelType", "r"
1282
+ func.add_parameter "Gecode::IntVar", "c"
1283
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1284
+ end
1285
+
1286
+ ns.add_function "linear", "void" do |func|
1287
+ func.add_parameter "Gecode::MSpace*", "home"
1288
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1289
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1290
+ end
1291
+ func.add_parameter "Gecode::IntRelType", "r"
1292
+ func.add_parameter "Gecode::IntVar", "c"
1293
+ func.add_parameter "Gecode::BoolVar", "b"
1294
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1295
+ end
1296
+
1297
+
1298
+ ns.add_function "linear", "void" do |func|
1299
+ func.add_parameter "Gecode::MSpace*", "home"
1300
+ func.add_parameter "Gecode::IntArgs", "a"
1301
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1302
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1303
+ end
1304
+ func.add_parameter "Gecode::IntRelType", "r"
1305
+ func.add_parameter "Gecode::IntVar", "y"
1306
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1307
+ end
1308
+
1309
+ ns.add_function "linear", "void" do |func|
1310
+ func.add_parameter "Gecode::MSpace*", "home"
1311
+ func.add_parameter "Gecode::IntArgs", "a"
1312
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1313
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1314
+ end
1315
+ func.add_parameter "Gecode::IntRelType", "r"
1316
+ func.add_parameter "Gecode::IntVar", "y"
1317
+ func.add_parameter "Gecode::BoolVar", "b"
1318
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1319
+ end
1320
+
1321
+ ns.add_function "linear", "void" do |func|
1322
+ func.add_parameter "Gecode::MSpace*", "home"
1323
+ func.add_parameter "Gecode::MBoolVarArray *", "x" do |param|
1324
+ param.custom_conversion = "*ruby2Gecode_MBoolVarArrayPtr(argv[1], 2)->ptr()"
1325
+ end
1326
+ func.add_parameter "Gecode::IntRelType", "r"
1327
+ func.add_parameter "int", "y"
1328
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1329
+ end
1330
+
1331
+ ns.add_function "linear", "void" do |func|
1332
+ func.add_parameter "Gecode::MSpace*", "home"
1333
+ func.add_parameter "Gecode::MBoolVarArray *", "x" do |param|
1334
+ param.custom_conversion = "*ruby2Gecode_MBoolVarArrayPtr(argv[1], 2)->ptr()"
1335
+ end
1336
+ func.add_parameter "Gecode::IntRelType", "r"
1337
+ func.add_parameter "Gecode::IntVar", "y"
1338
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1339
+ end
1340
+
1341
+ # ns.add_function "regular", "void" do |func|
1342
+ # func.add_parameter "Gecode::MSpace*", "home"
1343
+ # func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1344
+ # param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1345
+ # end
1346
+ # func.add_parameter "Gecode::DFA", "dfa" # TODO: add class DFA
1347
+ # func.add_parameter "Gecode::IntConLevel", "icl", true
1348
+ # end
1349
+
1350
+ ns.add_function "rel" do |func|
1351
+ func.add_parameter "Gecode::MSpace*", "home"
1352
+ func.add_parameter "Gecode::IntVar", "x0"
1353
+ func.add_parameter "Gecode::IntRelType", "r"
1354
+ func.add_parameter "int", "c"
1355
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1356
+ end
1357
+
1358
+ ns.add_function "rel" do |func|
1359
+ func.add_parameter "Gecode::MSpace*", "home"
1360
+ func.add_parameter "Gecode::IntVar", "x0"
1361
+ func.add_parameter "Gecode::IntRelType", "r"
1362
+ func.add_parameter "Gecode::IntVar", "x1"
1363
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1364
+ end
1365
+
1366
+ ns.add_function "rel" do |func|
1367
+ func.add_parameter "Gecode::MSpace*", "home"
1368
+ func.add_parameter "Gecode::IntVar", "x0"
1369
+ func.add_parameter "Gecode::IntRelType", "r"
1370
+ func.add_parameter "Gecode::IntVar", "x1"
1371
+ func.add_parameter "Gecode::BoolVar", "b"
1372
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1373
+ end
1374
+
1375
+ ns.add_function "rel" do |func|
1376
+ func.add_parameter "Gecode::MSpace*", "home"
1377
+ func.add_parameter "Gecode::IntVar", "x0"
1378
+ func.add_parameter "Gecode::IntRelType", "r"
1379
+ func.add_parameter "int", "c"
1380
+ func.add_parameter "Gecode::BoolVar", "b"
1381
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1382
+ end
1383
+
1384
+ ns.add_function "rel" do |func|
1385
+ func.add_parameter "Gecode::MSpace*", "home"
1386
+ func.add_parameter "Gecode::MBoolVarArray *", "x" do |param|
1387
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1388
+ end
1389
+ func.add_parameter "Gecode::IntRelType", "r"
1390
+ func.add_parameter "Gecode::MIntVarArray *", "y" do |param|
1391
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
1392
+ end
1393
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1394
+ end
1395
+
1396
+ ns.add_function "eq", "void" do |func|
1397
+ func.add_parameter "Gecode::MSpace*", "home"
1398
+ func.add_parameter "Gecode::IntVar", "x1"
1399
+ func.add_parameter "Gecode::IntVar", "x2"
1400
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1401
+ end
1402
+
1403
+ ns.add_function "eq", "void" do |func|
1404
+ func.add_parameter "Gecode::MSpace*", "home"
1405
+ func.add_parameter "Gecode::IntVar", "x"
1406
+ func.add_parameter "int", "n"
1407
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1408
+ end
1409
+
1410
+ ns.add_function "eq", "void" do |method|
1411
+ method.add_parameter "Gecode::MSpace*", "home"
1412
+ method.add_parameter "Gecode::IntVar", "x0"
1413
+ method.add_parameter "Gecode::IntVar", "x1"
1414
+ method.add_parameter "Gecode::BoolVar", "b"
1415
+ method.add_parameter "Gecode::IntConLevel", "icl", true
1416
+ end
1417
+
1418
+ ns.add_function "eq", "void" do |method|
1419
+ method.add_parameter "Gecode::MSpace*", "home"
1420
+ method.add_parameter "Gecode::IntVar", "x"
1421
+ method.add_parameter "int", "n"
1422
+ method.add_parameter "Gecode::BoolVar", "b"
1423
+ method.add_parameter "Gecode::IntConLevel", "icl", true
1424
+ end
1425
+
1426
+ ns.add_function "eq", "void" do |method|
1427
+ method.add_parameter "Gecode::MSpace*", "home"
1428
+ method.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1429
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1430
+ end
1431
+ method.add_parameter "Gecode::IntConLevel", "icl", true
1432
+ end
1433
+
1434
+ ns.add_function "sortedness", "void" do |method|
1435
+ method.add_parameter "Gecode::MSpace*", "home"
1436
+ method.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1437
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1438
+ end
1439
+ method.add_parameter "Gecode::MIntVarArray *", "y" do |param|
1440
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1441
+ end
1442
+ method.add_parameter "Gecode::IntConLevel", "icl", true
1443
+ end
1444
+ ns.add_function "sortedness", "void" do |method|
1445
+ method.add_parameter "Gecode::MSpace*", "home"
1446
+ method.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1447
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1448
+ end
1449
+ method.add_parameter "Gecode::MIntVarArray *", "y" do |param|
1450
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1451
+ end
1452
+ method.add_parameter "Gecode::MIntVarArray *", "z" do |param|
1453
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
1454
+ end
1455
+ method.add_parameter "Gecode::IntConLevel", "icl", true
1456
+ end
1457
+
1458
+ ns.add_function "post", "Gecode::BoolVar" do |func|
1459
+ func.add_parameter "Gecode::MSpace*", "home"
1460
+ func.add_parameter "Gecode::MiniModel::BoolExpr", "e"
1461
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1462
+ end
1463
+
1464
+ ns.add_function "post", "Gecode::BoolVar" do |func|
1465
+ func.add_parameter "Gecode::MSpace*", "home"
1466
+ func.add_parameter "Gecode::BoolVar", "e"
1467
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1468
+ end
1469
+
1470
+ ns.add_function "post" do |func|
1471
+ func.add_parameter "Gecode::MSpace*", "home"
1472
+ func.add_parameter "Gecode::MiniModel::BoolRel", "r"
1473
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1474
+ end
1475
+
1476
+ ns.add_function "post", "Gecode::IntVar" do |func|
1477
+ func.add_parameter "Gecode::MSpace*", "home"
1478
+ func.add_parameter "Gecode::IntVar", "e"
1479
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1480
+ end
1481
+
1482
+ ns.add_function "post", "Gecode::IntVar" do |func|
1483
+ func.add_parameter "Gecode::MSpace*", "home"
1484
+ func.add_parameter "int", "n"
1485
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1486
+ end
1487
+
1488
+ ns.add_function "post", "Gecode::IntVar" do |func|
1489
+ func.add_parameter "Gecode::MSpace*", "home"
1490
+ func.add_parameter "Gecode::MiniModel::LinExpr", "e"
1491
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1492
+ end
1493
+
1494
+ ns.add_function "post" do |func|
1495
+ func.add_parameter "Gecode::MSpace*", "home"
1496
+ func.add_parameter "Gecode::MiniModel::LinRel", "e"
1497
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1498
+ end
1499
+
1500
+ ns.add_function "post" do |func|
1501
+ func.add_parameter "Gecode::MSpace*", "home"
1502
+ func.add_parameter "bool", "r"
1503
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1504
+ end
1505
+
1506
+ ns.add_function "producer_consumer" do |func|
1507
+ func.add_parameter "Gecode::MSpace*", "home"
1508
+ func.add_parameter "Gecode::MIntVarArray *", "produce_date" do |param|
1509
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1510
+ end
1511
+ func.add_parameter "Gecode::IntArgs", "produce_amount"
1512
+ func.add_parameter "Gecode::MIntVarArray *", "consume_date" do |param|
1513
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
1514
+ end
1515
+ func.add_parameter "Gecode::IntArgs", "consume_amount"
1516
+ func.add_parameter "int", "initial"
1517
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1518
+ end
1519
+
1520
+ ns.add_function "cumulative" do |func|
1521
+ func.add_parameter "Gecode::MSpace*", "home"
1522
+ func.add_parameter "Gecode::MIntVarArray *", "start" do |param|
1523
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1524
+ end
1525
+ func.add_parameter "Gecode::MIntVarArray *", "duration" do |param|
1526
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1527
+ end
1528
+ func.add_parameter "Gecode::MIntVarArray *", "height" do |param|
1529
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1530
+ end
1531
+ func.add_parameter "int", "limit"
1532
+ func.add_parameter "bool", "at_most", true
1533
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1534
+ end
1535
+
1536
+ ns.add_function "cumulative" do |func|
1537
+ func.add_parameter "Gecode::MSpace*", "home"
1538
+ func.add_parameter "Gecode::MIntVarArray *", "start" do |param|
1539
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1540
+ end
1541
+ func.add_parameter "Gecode::IntArgs", "duration"
1542
+ func.add_parameter "Gecode::MIntVarArray *", "height" do |param|
1543
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1544
+ end
1545
+ func.add_parameter "int", "limit"
1546
+ func.add_parameter "bool", "at_most", true
1547
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1548
+ end
1549
+
1550
+ ns.add_function "cumulative" do |func|
1551
+ func.add_parameter "Gecode::MSpace*", "home"
1552
+ func.add_parameter "Gecode::MIntVarArray *", "start" do |param|
1553
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1554
+ end
1555
+ func.add_parameter "Gecode::MIntVarArray *", "duration" do |param|
1556
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1557
+ end
1558
+ func.add_parameter "Gecode::IntArgs", "height"
1559
+ func.add_parameter "int", "limit"
1560
+ func.add_parameter "bool", "at_most", true
1561
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1562
+ end
1563
+
1564
+ ns.add_function "cumulative" do |func|
1565
+ func.add_parameter "Gecode::MSpace*", "home"
1566
+ func.add_parameter "Gecode::MIntVarArray *", "start" do |param|
1567
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1568
+ end
1569
+ func.add_parameter "Gecode::IntArgs", "duration"
1570
+ func.add_parameter "Gecode::IntArgs", "height"
1571
+ func.add_parameter "int", "limit"
1572
+ func.add_parameter "bool", "at_most", true
1573
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1574
+ end
1575
+
1576
+ ns.add_function "serialized" do |func|
1577
+ func.add_parameter "Gecode::MSpace*", "home"
1578
+ func.add_parameter "Gecode::MIntVarArray *", "start" do |param|
1579
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1580
+ end
1581
+ func.add_parameter "Gecode::MIntVarArray *", "duration" do |param|
1582
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1583
+ end
1584
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1585
+ end
1586
+
1587
+ ns.add_function "serialized" do |func|
1588
+ func.add_parameter "Gecode::MSpace*", "home"
1589
+ func.add_parameter "Gecode::MIntVarArray *", "start" do |param|
1590
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1591
+ end
1592
+ func.add_parameter "Gecode::IntArgs", "duration"
1593
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1594
+ end
1595
+
1596
+ ns.add_function "atmost" do |func|
1597
+ func.add_parameter "Gecode::MSpace*", "home"
1598
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1599
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1600
+ end
1601
+ func.add_parameter "int", "n"
1602
+ func.add_parameter "int", "m"
1603
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1604
+ end
1605
+
1606
+ ns.add_function "atmost" do |func|
1607
+ func.add_parameter "Gecode::MSpace*", "home"
1608
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1609
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1610
+ end
1611
+ func.add_parameter "Gecode::IntVar", "n"
1612
+ func.add_parameter "int", "m"
1613
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1614
+ end
1615
+
1616
+ ns.add_function "atmost" do |func|
1617
+ func.add_parameter "Gecode::MSpace*", "home"
1618
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1619
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1620
+ end
1621
+ func.add_parameter "int", "n"
1622
+ func.add_parameter "Gecode::IntVar", "m"
1623
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1624
+ end
1625
+
1626
+ ns.add_function "atmost" do |func|
1627
+ func.add_parameter "Gecode::MSpace*", "home"
1628
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1629
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1630
+ end
1631
+ func.add_parameter "Gecode::IntVar", "n"
1632
+ func.add_parameter "Gecode::IntVar", "m"
1633
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1634
+ end
1635
+
1636
+ ns.add_function "atleast" do |func|
1637
+ func.add_parameter "Gecode::MSpace*", "home"
1638
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1639
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1640
+ end
1641
+ func.add_parameter "int", "n"
1642
+ func.add_parameter "int", "m"
1643
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1644
+ end
1645
+
1646
+ ns.add_function "atleast" do |func|
1647
+ func.add_parameter "Gecode::MSpace*", "home"
1648
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1649
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1650
+ end
1651
+ func.add_parameter "Gecode::IntVar", "n"
1652
+ func.add_parameter "int", "m"
1653
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1654
+ end
1655
+
1656
+ ns.add_function "atleast" do |func|
1657
+ func.add_parameter "Gecode::MSpace*", "home"
1658
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1659
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1660
+ end
1661
+ func.add_parameter "int", "n"
1662
+ func.add_parameter "Gecode::IntVar", "m"
1663
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1664
+ end
1665
+
1666
+ ns.add_function "atleast" do |func|
1667
+ func.add_parameter "Gecode::MSpace*", "home"
1668
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1669
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1670
+ end
1671
+ func.add_parameter "Gecode::IntVar", "n"
1672
+ func.add_parameter "Gecode::IntVar", "m"
1673
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1674
+ end
1675
+
1676
+ ns.add_function "exactly" do |func|
1677
+ func.add_parameter "Gecode::MSpace*", "home"
1678
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1679
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1680
+ end
1681
+ func.add_parameter "int", "n"
1682
+ func.add_parameter "int", "m"
1683
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1684
+ end
1685
+
1686
+ ns.add_function "exactly" do |func|
1687
+ func.add_parameter "Gecode::MSpace*", "home"
1688
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1689
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1690
+ end
1691
+ func.add_parameter "Gecode::IntVar", "n"
1692
+ func.add_parameter "int", "m"
1693
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1694
+ end
1695
+
1696
+ ns.add_function "exactly" do |func|
1697
+ func.add_parameter "Gecode::MSpace*", "home"
1698
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1699
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1700
+ end
1701
+ func.add_parameter "int", "n"
1702
+ func.add_parameter "Gecode::IntVar", "m"
1703
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1704
+ end
1705
+
1706
+ ns.add_function "exactly" do |func|
1707
+ func.add_parameter "Gecode::MSpace*", "home"
1708
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1709
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1710
+ end
1711
+ func.add_parameter "Gecode::IntVar", "n"
1712
+ func.add_parameter "Gecode::IntVar", "m"
1713
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1714
+ end
1715
+
1716
+ ns.add_function "lex" do |func|
1717
+ func.add_parameter "Gecode::MSpace*", "home"
1718
+ func.add_parameter "Gecode::MIntVarArray *", "x" do |param|
1719
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1720
+ end
1721
+ func.add_parameter "Gecode::IntRelType", "r"
1722
+ func.add_parameter "Gecode::MIntVarArray *", "y" do |param|
1723
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[3], 4)->ptr()"
1724
+ end
1725
+ func.add_parameter "Gecode::IntConLevel", "icl", true
1726
+ end
1727
+
1728
+ ns.add_function "cardinality" do |func|
1729
+ func.add_parameter "Gecode::MSpace*", "home"
1730
+ func.add_parameter "Gecode::SetVar", "x"
1731
+ func.add_parameter "int", "i"
1732
+ func.add_parameter "int", "j"
1733
+ end
1734
+
1735
+ ns.add_function "cardinality" do |func|
1736
+ func.add_parameter "Gecode::MSpace*", "home"
1737
+ func.add_parameter "Gecode::SetVar", "s"
1738
+ func.add_parameter "Gecode::IntVar", "x"
1739
+ end
1740
+
1741
+ ns.add_function "convex" do |func|
1742
+ func.add_parameter "Gecode::MSpace*", "home"
1743
+ func.add_parameter "Gecode::SetVar", "s"
1744
+ end
1745
+
1746
+ ns.add_function "convexHull" do |func|
1747
+ func.add_parameter "Gecode::MSpace*", "home"
1748
+ func.add_parameter "Gecode::SetVar", "x"
1749
+ func.add_parameter "Gecode::SetVar", "y"
1750
+ end
1751
+
1752
+ ns.add_function "atmostOne" do |func|
1753
+ func.add_parameter "Gecode::MSpace*", "home"
1754
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
1755
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(x, 2)->ptr()"
1756
+ end
1757
+ func.add_parameter "int", "c"
1758
+ end
1759
+
1760
+ ns.add_function "distinct" do |func|
1761
+ func.add_parameter "Gecode::MSpace*", "home"
1762
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
1763
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(argv[1], 2)->ptr()"
1764
+ end
1765
+ func.add_parameter "int", "c"
1766
+ end
1767
+
1768
+ ns.add_function "dom" do |func|
1769
+ func.add_parameter "Gecode::MSpace*", "home"
1770
+ func.add_parameter "Gecode::SetVar", "x"
1771
+ func.add_parameter "Gecode::SetRelType", "r"
1772
+ func.add_parameter "int", "i"
1773
+ end
1774
+
1775
+ ns.add_function "dom" do |func|
1776
+ func.add_parameter "Gecode::MSpace*", "home"
1777
+ func.add_parameter "Gecode::SetVar", "x"
1778
+ func.add_parameter "Gecode::SetRelType", "r"
1779
+ func.add_parameter "int", "i"
1780
+ func.add_parameter "int", "j"
1781
+ end
1782
+
1783
+
1784
+ ns.add_function "dom" do |func|
1785
+ func.add_parameter "Gecode::MSpace*", "home"
1786
+ func.add_parameter "Gecode::SetVar", "x"
1787
+ func.add_parameter "Gecode::SetRelType", "r"
1788
+ func.add_parameter "Gecode::IntSet", "s"
1789
+ end
1790
+
1791
+ ns.add_function "dom" do |func|
1792
+ func.add_parameter "Gecode::MSpace*", "home"
1793
+ func.add_parameter "Gecode::SetVar", "x"
1794
+ func.add_parameter "Gecode::SetRelType", "r"
1795
+ func.add_parameter "int", "i"
1796
+ func.add_parameter "Gecode::BoolVar", "b"
1797
+ end
1798
+
1799
+ ns.add_function "dom" do |func|
1800
+ func.add_parameter "Gecode::MSpace*", "home"
1801
+ func.add_parameter "Gecode::SetVar", "x"
1802
+ func.add_parameter "Gecode::SetRelType", "r"
1803
+ func.add_parameter "int", "i"
1804
+ func.add_parameter "int", "j"
1805
+ func.add_parameter "Gecode::BoolVar", "b"
1806
+ end
1807
+
1808
+ ns.add_function "dom" do |func|
1809
+ func.add_parameter "Gecode::MSpace*", "home"
1810
+ func.add_parameter "Gecode::SetVar", "x"
1811
+ func.add_parameter "Gecode::SetRelType", "r"
1812
+ func.add_parameter "Gecode::IntSet", "s"
1813
+ func.add_parameter "Gecode::BoolVar", "b"
1814
+ end
1815
+
1816
+ ns.add_function "rel" do |func|
1817
+ func.add_parameter "Gecode::MSpace*", "home"
1818
+ func.add_parameter "Gecode::SetVar", "s"
1819
+ func.add_parameter "Gecode::IntRelType", "r"
1820
+ func.add_parameter "Gecode::IntVar", "x"
1821
+ end
1822
+
1823
+ ns.add_function "rel" do |func|
1824
+ func.add_parameter "Gecode::MSpace*", "home"
1825
+ func.add_parameter "Gecode::IntVar", "x"
1826
+ func.add_parameter "Gecode::IntRelType", "r"
1827
+ func.add_parameter "Gecode::SetVar", "s"
1828
+ end
1829
+
1830
+ ns.add_function "min" do |func|
1831
+ func.add_parameter "Gecode::MSpace*", "home"
1832
+ func.add_parameter "Gecode::SetVar", "s"
1833
+ func.add_parameter "Gecode::IntVar", "x"
1834
+ end
1835
+
1836
+ ns.add_function "max" do |func|
1837
+ func.add_parameter "Gecode::MSpace*", "home"
1838
+ func.add_parameter "Gecode::SetVar", "s"
1839
+ func.add_parameter "Gecode::IntVar", "x"
1840
+ end
1841
+
1842
+ ns.add_function "match" do |func|
1843
+ func.add_parameter "Gecode::MSpace*", "home"
1844
+ func.add_parameter "Gecode::SetVar", "s"
1845
+ func.add_parameter "Gecode::MIntVarArray", "x" do |param|
1846
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(x, 3)->ptr()"
1847
+ end
1848
+ end
1849
+
1850
+ ns.add_function "channel" do |func|
1851
+ func.add_parameter "Gecode::MSpace*", "home"
1852
+ func.add_parameter "Gecode::MIntVarArray", "x" do |param|
1853
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[1], 2)->ptr()"
1854
+ end
1855
+ func.add_parameter "Gecode::MSetVarArray", "y" do |param|
1856
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(argv[2], 3)->ptr()"
1857
+ end
1858
+ end
1859
+
1860
+ ns.add_function "weights" do |func|
1861
+ func.add_parameter "Gecode::MSpace*", "home"
1862
+ func.add_parameter "Gecode::IntArgs", "elements"
1863
+ func.add_parameter "Gecode::IntArgs", "weights"
1864
+ func.add_parameter "Gecode::SetVar", "x"
1865
+ func.add_parameter "Gecode::IntVar", "y"
1866
+ end
1867
+
1868
+ ns.add_function "rel" do |func|
1869
+ func.add_parameter "Gecode::MSpace*", "home"
1870
+ func.add_parameter "Gecode::IntSet", "x"
1871
+ func.add_parameter "Gecode::SetOpType", "op"
1872
+ func.add_parameter "Gecode::SetVar", "y"
1873
+ func.add_parameter "Gecode::SetRelType", "r"
1874
+ func.add_parameter "Gecode::SetVar", "z"
1875
+ end
1876
+
1877
+ ns.add_function "rel" do |func|
1878
+ func.add_parameter "Gecode::MSpace*", "home"
1879
+ func.add_parameter "Gecode::SetVar", "x"
1880
+ func.add_parameter "Gecode::SetOpType", "op"
1881
+ func.add_parameter "Gecode::IntSet", "y"
1882
+ func.add_parameter "Gecode::SetRelType", "r"
1883
+ func.add_parameter "Gecode::SetVar", "z"
1884
+ end
1885
+
1886
+ ns.add_function "rel" do |func|
1887
+ func.add_parameter "Gecode::MSpace*", "home"
1888
+ func.add_parameter "Gecode::SetVar", "x"
1889
+ func.add_parameter "Gecode::SetOpType", "op"
1890
+ func.add_parameter "Gecode::SetVar", "y"
1891
+ func.add_parameter "Gecode::SetRelType", "r"
1892
+ func.add_parameter "Gecode::IntSet", "z"
1893
+ end
1894
+
1895
+ ns.add_function "rel" do |func|
1896
+ func.add_parameter "Gecode::MSpace*", "home"
1897
+ func.add_parameter "Gecode::IntSet", "x"
1898
+ func.add_parameter "Gecode::SetOpType", "op"
1899
+ func.add_parameter "Gecode::IntSet", "y"
1900
+ func.add_parameter "Gecode::SetRelType", "r"
1901
+ func.add_parameter "Gecode::SetVar", "z"
1902
+ end
1903
+
1904
+ ns.add_function "rel" do |func|
1905
+ func.add_parameter "Gecode::MSpace*", "home"
1906
+ func.add_parameter "Gecode::IntSet", "x"
1907
+ func.add_parameter "Gecode::SetOpType", "op"
1908
+ func.add_parameter "Gecode::SetVar", "y"
1909
+ func.add_parameter "Gecode::SetRelType", "r"
1910
+ func.add_parameter "Gecode::IntSet", "z"
1911
+ end
1912
+
1913
+ ns.add_function "rel" do |func|
1914
+ func.add_parameter "Gecode::MSpace*", "home"
1915
+ func.add_parameter "Gecode::SetVar", "x"
1916
+ func.add_parameter "Gecode::SetOpType", "op"
1917
+ func.add_parameter "Gecode::IntSet", "y"
1918
+ func.add_parameter "Gecode::SetRelType", "r"
1919
+ func.add_parameter "Gecode::IntSet", "z"
1920
+ end
1921
+
1922
+ ns.add_function "rel" do |func|
1923
+ func.add_parameter "Gecode::MSpace*", "home"
1924
+ func.add_parameter "Gecode::SetVar", "x"
1925
+ func.add_parameter "Gecode::SetOpType", "op"
1926
+ func.add_parameter "Gecode::SetVar", "y"
1927
+ func.add_parameter "Gecode::SetRelType", "r"
1928
+ func.add_parameter "Gecode::SetVar", "z"
1929
+ end
1930
+
1931
+
1932
+ ns.add_function "rel" do |func|
1933
+ func.add_parameter "Gecode::MSpace*", "home"
1934
+ func.add_parameter "Gecode::SetOpType", "op"
1935
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
1936
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(argv[2], 3)->ptr()"
1937
+ end
1938
+ func.add_parameter "Gecode::SetVar", "y"
1939
+ end
1940
+
1941
+ ns.add_function "rel" do |func|
1942
+ func.add_parameter "Gecode::MSpace*", "home"
1943
+ func.add_parameter "Gecode::SetOpType", "op"
1944
+ func.add_parameter "Gecode::MIntVarArray", "x" do |param|
1945
+ param.custom_conversion = "*ruby2Gecode_MIntVarArrayPtr(argv[2], 3)->ptr()"
1946
+ end
1947
+ func.add_parameter "Gecode::SetVar", "y"
1948
+ end
1949
+
1950
+ ns.add_function "rel" do |func|
1951
+ func.add_parameter "Gecode::MSpace*", "home"
1952
+ func.add_parameter "Gecode::SetVar", "x"
1953
+ func.add_parameter "Gecode::SetRelType", "r"
1954
+ func.add_parameter "Gecode::SetVar", "y"
1955
+ end
1956
+
1957
+ ns.add_function "rel" do |func|
1958
+ func.add_parameter "Gecode::MSpace*", "home"
1959
+ func.add_parameter "Gecode::SetVar", "x"
1960
+ func.add_parameter "Gecode::SetRelType", "r"
1961
+ func.add_parameter "Gecode::IntVar", "y"
1962
+ end
1963
+
1964
+ ns.add_function "rel" do |func|
1965
+ func.add_parameter "Gecode::MSpace*", "home"
1966
+ func.add_parameter "Gecode::IntVar", "x"
1967
+ func.add_parameter "Gecode::SetRelType", "r"
1968
+ func.add_parameter "Gecode::SetVar", "y"
1969
+ end
1970
+
1971
+ ns.add_function "rel" do |func|
1972
+ func.add_parameter "Gecode::MSpace*", "home"
1973
+ func.add_parameter "Gecode::SetVar", "x"
1974
+ func.add_parameter "Gecode::SetRelType", "r"
1975
+ func.add_parameter "Gecode::SetVar", "y"
1976
+ func.add_parameter "Gecode::BoolVar", "b"
1977
+ end
1978
+
1979
+ ns.add_function "rel" do |func|
1980
+ func.add_parameter "Gecode::MSpace*", "home"
1981
+ func.add_parameter "Gecode::SetVar", "x"
1982
+ func.add_parameter "Gecode::SetRelType", "r"
1983
+ func.add_parameter "Gecode::IntVar", "y"
1984
+ func.add_parameter "Gecode::BoolVar", "b"
1985
+ end
1986
+
1987
+ ns.add_function "rel" do |func|
1988
+ func.add_parameter "Gecode::MSpace*", "home"
1989
+ func.add_parameter "Gecode::IntVar", "x"
1990
+ func.add_parameter "Gecode::SetRelType", "r"
1991
+ func.add_parameter "Gecode::SetVar", "y"
1992
+ func.add_parameter "Gecode::BoolVar", "b"
1993
+ end
1994
+
1995
+ ns.add_function "selectUnion" do |func|
1996
+ func.add_parameter "Gecode::MSpace*", "home"
1997
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
1998
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(x, 2)->ptr()"
1999
+ end
2000
+ func.add_parameter "Gecode::SetVar", "y"
2001
+ func.add_parameter "Gecode::SetVar", "z"
2002
+ end
2003
+
2004
+ ns.add_function "selectInter" do |func|
2005
+ func.add_parameter "Gecode::MSpace*", "home"
2006
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
2007
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(x, 2)->ptr()"
2008
+ end
2009
+ func.add_parameter "Gecode::SetVar", "y"
2010
+ func.add_parameter "Gecode::SetVar", "z"
2011
+ end
2012
+
2013
+ ns.add_function "selectInterIn" do |func|
2014
+ func.add_parameter "Gecode::MSpace*", "home"
2015
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
2016
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(x, 2)->ptr()"
2017
+ end
2018
+ func.add_parameter "Gecode::SetVar", "y"
2019
+ func.add_parameter "Gecode::SetVar", "z"
2020
+ func.add_parameter "Gecode::IntSet", "universe"
2021
+ end
2022
+
2023
+ ns.add_function "selectSet" do |func|
2024
+ func.add_parameter "Gecode::MSpace*", "home"
2025
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
2026
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(x, 2)->ptr()"
2027
+ end
2028
+ func.add_parameter "Gecode::IntVar", "y"
2029
+ func.add_parameter "Gecode::SetVar", "z"
2030
+ end
2031
+
2032
+ ns.add_function "selectDisjoint" do |func|
2033
+ func.add_parameter "Gecode::MSpace*", "home"
2034
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
2035
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(x, 2)->ptr()"
2036
+ end
2037
+ func.add_parameter "Gecode::SetVar", "y"
2038
+ end
2039
+
2040
+ ns.add_function "sequence" do |func|
2041
+ func.add_parameter "Gecode::MSpace*", "home"
2042
+ func.add_parameter "Gecode::MSetVarArray", "x" do |param|
2043
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(x, 2)->ptr()"
2044
+ end
2045
+ end
2046
+
2047
+ ns.add_function "sequentialUnion" do |func|
2048
+ func.add_parameter "Gecode::MSpace*", "home"
2049
+ func.add_parameter "Gecode::MSetVarArray", "y" do |param|
2050
+ param.custom_conversion = "*ruby2Gecode_MSetVarArrayPtr(y, 2)->ptr()"
2051
+ end
2052
+ func.add_parameter "Gecode::SetVar", "x"
2053
+ end
2054
+ end
2055
+ end