gecoder 0.4.0 → 0.5.0

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