gecoder-with-gecode 0.7.1-mswin32

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