gecoder 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/CHANGES +6 -0
  2. data/README +1 -1
  3. data/example/square_tiling.rb +84 -0
  4. data/example/sudoku-set.rb +107 -0
  5. data/example/sudoku.rb +2 -6
  6. data/lib/gecoder/bindings.rb +1 -1
  7. data/lib/gecoder/bindings/bindings.rb +20 -0
  8. data/lib/gecoder/interface/binding_changes.rb +2 -2
  9. data/lib/gecoder/interface/branch.rb +50 -51
  10. data/lib/gecoder/interface/constraints.rb +10 -10
  11. data/lib/gecoder/interface/constraints/bool/boolean.rb +79 -5
  12. data/lib/gecoder/interface/constraints/bool/linear.rb +29 -0
  13. data/lib/gecoder/interface/constraints/bool_enum/boolean.rb +34 -4
  14. data/lib/gecoder/interface/constraints/bool_var_constraints.rb +14 -9
  15. data/lib/gecoder/interface/constraints/int/arithmetic.rb +26 -8
  16. data/lib/gecoder/interface/constraints/int/domain.rb +30 -3
  17. data/lib/gecoder/interface/constraints/int/linear.rb +82 -16
  18. data/lib/gecoder/interface/constraints/int_enum/arithmetic.rb +31 -3
  19. data/lib/gecoder/interface/constraints/int_enum/channel.rb +63 -3
  20. data/lib/gecoder/interface/constraints/int_enum/count.rb +20 -3
  21. data/lib/gecoder/interface/constraints/int_enum/distinct.rb +22 -2
  22. data/lib/gecoder/interface/constraints/int_enum/element.rb +23 -4
  23. data/lib/gecoder/interface/constraints/int_enum/equality.rb +9 -2
  24. data/lib/gecoder/interface/constraints/int_enum/sort.rb +28 -3
  25. data/lib/gecoder/interface/constraints/int_enum_constraints.rb +1 -1
  26. data/lib/gecoder/interface/constraints/int_var_constraints.rb +13 -8
  27. data/lib/gecoder/interface/constraints/set/cardinality.rb +27 -8
  28. data/lib/gecoder/interface/constraints/set/connection.rb +72 -6
  29. data/lib/gecoder/interface/constraints/set/domain.rb +46 -3
  30. data/lib/gecoder/interface/constraints/set/operation.rb +35 -4
  31. data/lib/gecoder/interface/constraints/set/relation.rb +59 -6
  32. data/lib/gecoder/interface/constraints/set_enum/distinct.rb +22 -3
  33. data/lib/gecoder/interface/constraints/set_enum/operation.rb +26 -2
  34. data/lib/gecoder/interface/constraints/set_enum/selection.rb +110 -36
  35. data/lib/gecoder/interface/constraints/set_var_constraints.rb +11 -7
  36. data/lib/gecoder/interface/model.rb +6 -6
  37. data/lib/gecoder/interface/search.rb +6 -6
  38. data/lib/gecoder/interface/variables.rb +56 -12
  39. data/lib/gecoder/version.rb +1 -1
  40. data/specs/constraints/linear.rb +167 -1
  41. data/specs/constraints/set_domain.rb +6 -0
  42. data/tasks/distribution.rake +25 -3
  43. data/tasks/website.rake +5 -12
  44. metadata +10 -4
  45. data/vendor/rust/configure.rb +0 -6
  46. data/vendor/rust/out.rb +0 -627
@@ -80,6 +80,12 @@ describe Gecode::Constraints::Set::Domain do
80
80
  end
81
81
  end
82
82
 
83
+ it 'should raise error if the right hand side is not a constant set' do
84
+ lambda do
85
+ @set.must_be.superset_of('not a constant set')
86
+ end.should raise_error(TypeError)
87
+ end
88
+
83
89
  it_should_behave_like 'reifiable set constraint'
84
90
  end
85
91
 
@@ -6,9 +6,31 @@ PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
6
6
 
7
7
  desc 'Generate RDoc'
8
8
  rd = Rake::RDocTask.new do |rdoc|
9
- rdoc.rdoc_dir = "#{File.dirname(__FILE__)}/../doc/output/rdoc"
10
- rdoc.options << '--title' << 'Gecode/R' << '--line-numbers' << '--inline-source' << '--main' << 'README'
11
- rdoc.rdoc_files.include('README', 'lib/**/*.rb')
9
+ rdoc.rdoc_dir = 'doc/output/rdoc'
10
+ rdoc.options << '--title' << 'Gecode/R' << '--line-numbers' <<
11
+ '--inline-source' << '--accessor' << 'delegate' << '--main' << 'README'
12
+ rdoc.rdoc_files.include('README', 'CHANGES', 'LGPL-LICENSE', 'lib/**/*.rb')
13
+ end
14
+
15
+ desc 'Generate RDoc, ignoring nodoc'
16
+ Rake::RDocTask.new(:rdoc_dev) do |rdoc|
17
+ rdoc.rdoc_dir = 'doc/output/rdoc_dev'
18
+ rdoc.options << '--title' << 'Gecode/R Developers RDoc' << '--line-numbers' <<
19
+ '--inline-source' << '--accessor' << 'delegate'
20
+
21
+ # Copy the rdoc and remove all #:nodoc: .
22
+ TMP_DIR = 'doc/tmp/rdoc_dev'
23
+ Dir['lib/**/*.rb'].each do |source_name|
24
+ destination_name = source_name.sub('lib', TMP_DIR)
25
+ File.makedirs File.dirname(destination_name)
26
+ destination = File.open(destination_name, 'w')
27
+ File.open(source_name) do |source|
28
+ source.each{ |line| destination << line.gsub('#:nodoc:', '' ) }
29
+ end
30
+ destination.close
31
+ end
32
+
33
+ rdoc.rdoc_files.include("#{TMP_DIR}/**/*.rb")
12
34
  end
13
35
 
14
36
  spec = Gem::Specification.new do |s|
data/tasks/website.rake CHANGED
@@ -2,19 +2,11 @@ require 'rake/contrib/rubyforgepublisher'
2
2
 
3
3
  desc 'Regenerates the contents of the website'
4
4
  task :website do
5
- Rake::Task[:clobber].invoke
6
- mkdir 'doc/output'
7
- begin
8
- Rake::Task[:spec_html].invoke
9
- rescue
10
- # The task will fail unless all specs pass, we want it to continue.
11
- end
5
+ mkpath 'doc/output'
6
+ Rake::Task[:spec_html].invoke
12
7
  Rake::Task[:rdoc].invoke
13
- begin
14
- Rake::Task[:rcov].invoke
15
- rescue
16
- # The task will fail unless all specs pass, we want it to continue.
17
- end
8
+ Rake::Task[:rdoc_dev].invoke
9
+ Rake::Task[:rcov].invoke
18
10
  WebsiteRakeHelpers.webgen
19
11
  end
20
12
 
@@ -43,6 +35,7 @@ module WebsiteRakeHelpers
43
35
  # Remove generated documentation.
44
36
  def clobber
45
37
  rm_rf 'doc/output'
38
+ rm_rf 'doc/tmp'
46
39
  end
47
40
 
48
41
  # Generates the website with webgen.
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: gecoder
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.0
7
- date: 2007-07-27 00:00:00 +02:00
6
+ version: 0.7.1
7
+ date: 2007-08-10 00:00:00 +02:00
8
8
  summary: Ruby interface to Gecode, an environment for constraint programming.
9
9
  require_paths:
10
10
  - lib
@@ -54,6 +54,7 @@ files:
54
54
  - lib/gecoder/interface/constraints/set_enum_constraints.rb
55
55
  - lib/gecoder/interface/constraints/set_var_constraints.rb
56
56
  - lib/gecoder/interface/constraints/bool/boolean.rb
57
+ - lib/gecoder/interface/constraints/bool/linear.rb
57
58
  - lib/gecoder/interface/constraints/int/linear.rb
58
59
  - lib/gecoder/interface/constraints/int/domain.rb
59
60
  - lib/gecoder/interface/constraints/int/arithmetic.rb
@@ -81,16 +82,16 @@ files:
81
82
  - example/queens.rb
82
83
  - example/sudoku.rb
83
84
  - example/magic_sequence.rb
85
+ - example/sudoku-set.rb
84
86
  - example/send_most_money.rb
87
+ - example/square_tiling.rb
85
88
  - vendor/rust
86
89
  - vendor/rust/test
87
90
  - vendor/rust/include
88
91
  - vendor/rust/bin
89
92
  - vendor/rust/rust
90
- - vendor/rust/out.rb
91
93
  - vendor/rust/rust.rb
92
94
  - vendor/rust/README
93
- - vendor/rust/configure.rb
94
95
  - vendor/rust/test/lib
95
96
  - vendor/rust/test/test-constants.rb
96
97
  - vendor/rust/test/dummyclass.hh
@@ -229,10 +230,14 @@ rdoc_options:
229
230
  - Gecode/R
230
231
  - --line-numbers
231
232
  - --inline-source
233
+ - --accessor
234
+ - delegate
232
235
  - --main
233
236
  - README
234
237
  extra_rdoc_files:
235
238
  - README
239
+ - CHANGES
240
+ - LGPL-LICENSE
236
241
  - lib/gecoder.rb
237
242
  - lib/gecoder/interface.rb
238
243
  - lib/gecoder/bindings.rb
@@ -253,6 +258,7 @@ extra_rdoc_files:
253
258
  - lib/gecoder/interface/constraints/set_enum_constraints.rb
254
259
  - lib/gecoder/interface/constraints/set_var_constraints.rb
255
260
  - lib/gecoder/interface/constraints/bool/boolean.rb
261
+ - lib/gecoder/interface/constraints/bool/linear.rb
256
262
  - lib/gecoder/interface/constraints/int/linear.rb
257
263
  - lib/gecoder/interface/constraints/int/domain.rb
258
264
  - lib/gecoder/interface/constraints/int/arithmetic.rb
@@ -1,6 +0,0 @@
1
-
2
- require 'mkmf'
3
- find_header("rust_conversions.hh", "./include" )
4
- eval File.open("out.rb").readlines.to_s
5
- create_makefile("Gecode")
6
-
data/vendor/rust/out.rb DELETED
@@ -1,627 +0,0 @@
1
-
2
- require 'rust'
3
-
4
- Rust::Bindings::create_bindings Rust::Bindings::LangCxx, "Gecode" do |b|
5
- b.include_header '/home/andreas/conprog/gecode-1.3.1/gecode/int/view.icc', Rust::Bindings::HeaderGlobal
6
- b.add_namespace "Gecode", "" do |ns|
7
- ns.add_cxx_class "ViewRanges" do |klass|
8
- klass.add_constructor
9
- klass.add_constructor do |method|
10
- method.add_parameter "View&", "x"
11
- end
12
- klass.add_method "init", "void" do |method|
13
- method.add_parameter "View&", "x"
14
- end
15
- klass.add_method "operator", "bool"
16
- klass.add_method "min", "int"
17
- klass.add_method "max", "int"
18
- klass.add_method "width", "int"
19
- end
20
- ns.add_cxx_class "ViewValues" do |klass|
21
- klass.add_constructor
22
- klass.add_constructor do |method|
23
- method.add_parameter "View&", "x"
24
- end
25
- klass.add_method "init", "void" do |method|
26
- method.add_parameter "View&", "x"
27
- end
28
- end
29
- ns.add_cxx_class "IntView" do |klass|
30
- klass.add_constructor
31
- klass.add_constructor do |method|
32
- method.add_parameter "IntVar&", "x"
33
- end
34
- klass.add_method "min", "int"
35
- klass.add_method "max", "int"
36
- klass.add_method "med", "int"
37
- klass.add_method "val", "int"
38
- klass.add_method "size", "int"
39
- klass.add_method "width", "int"
40
- klass.add_method "regret_min", "int"
41
- klass.add_method "regret_max", "int"
42
- klass.add_method "range", "bool"
43
- klass.add_method "assigned", "bool"
44
- klass.add_method "in", "bool" do |method|
45
- method.add_parameter "int", "n"
46
- end
47
- klass.add_method "in", "bool" do |method|
48
- method.add_parameter "double", "n"
49
- end
50
- klass.add_method "lq", "ModEvent" do |method|
51
- method.add_parameter "Space*", "home"
52
- method.add_parameter "int", "n"
53
- end
54
- klass.add_method "lq", "ModEvent" do |method|
55
- method.add_parameter "Space*", "home"
56
- method.add_parameter "double", "n"
57
- end
58
- klass.add_method "le", "ModEvent" do |method|
59
- method.add_parameter "Space*", "home"
60
- method.add_parameter "int", "n"
61
- end
62
- klass.add_method "le", "ModEvent" do |method|
63
- method.add_parameter "Space*", "home"
64
- method.add_parameter "double", "n"
65
- end
66
- klass.add_method "gq", "ModEvent" do |method|
67
- method.add_parameter "Space*", "home"
68
- method.add_parameter "int", "n"
69
- end
70
- klass.add_method "gq", "ModEvent" do |method|
71
- method.add_parameter "Space*", "home"
72
- method.add_parameter "double", "n"
73
- end
74
- klass.add_method "gr", "ModEvent" do |method|
75
- method.add_parameter "Space*", "home"
76
- method.add_parameter "int", "n"
77
- end
78
- klass.add_method "gr", "ModEvent" do |method|
79
- method.add_parameter "Space*", "home"
80
- method.add_parameter "double", "n"
81
- end
82
- klass.add_method "nq", "ModEvent" do |method|
83
- method.add_parameter "Space*", "home"
84
- method.add_parameter "int", "n"
85
- end
86
- klass.add_method "nq", "ModEvent" do |method|
87
- method.add_parameter "Space*", "home"
88
- method.add_parameter "double", "n"
89
- end
90
- klass.add_method "eq", "ModEvent" do |method|
91
- method.add_parameter "Space*", "home"
92
- method.add_parameter "int", "n"
93
- end
94
- klass.add_method "eq", "ModEvent" do |method|
95
- method.add_parameter "Space*", "home"
96
- method.add_parameter "double", "n"
97
- end
98
- end
99
- ns.add_cxx_class "I" do |klass|
100
- klass.add_method "narrow", "ModEvent" do |method|
101
- method.add_parameter "Space*", "home"
102
- method.add_parameter "I&", "i"
103
- end
104
- klass.add_method "update", "void" do |method|
105
- method.add_parameter "Space*", "home"
106
- method.add_parameter "bool", "share"
107
- method.add_parameter "IntView&", "x"
108
- end
109
- end
110
- ns.add_cxx_class "MinusView" do |klass|
111
- klass.add_constructor
112
- klass.add_constructor do |method|
113
- method.add_parameter "IntView&", "x"
114
- end
115
- klass.add_method "init", "void" do |method|
116
- method.add_parameter "IntView&", "x"
117
- end
118
- klass.add_method "min", "int"
119
- klass.add_method "max", "int"
120
- klass.add_method "med", "int"
121
- klass.add_method "val", "int"
122
- klass.add_method "size", "int"
123
- klass.add_method "width", "int"
124
- klass.add_method "regret_min", "int"
125
- klass.add_method "regret_max", "int"
126
- klass.add_method "range", "bool"
127
- klass.add_method "assigned", "bool"
128
- klass.add_method "in", "bool" do |method|
129
- method.add_parameter "int", "n"
130
- end
131
- klass.add_method "in", "bool" do |method|
132
- method.add_parameter "double", "n"
133
- end
134
- klass.add_method "lq", "ModEvent" do |method|
135
- method.add_parameter "Space*", "home"
136
- method.add_parameter "int", "n"
137
- end
138
- klass.add_method "lq", "ModEvent" do |method|
139
- method.add_parameter "Space*", "home"
140
- method.add_parameter "double", "n"
141
- end
142
- klass.add_method "le", "ModEvent" do |method|
143
- method.add_parameter "Space*", "home"
144
- method.add_parameter "int", "n"
145
- end
146
- klass.add_method "le", "ModEvent" do |method|
147
- method.add_parameter "Space*", "home"
148
- method.add_parameter "double", "n"
149
- end
150
- klass.add_method "gq", "ModEvent" do |method|
151
- method.add_parameter "Space*", "home"
152
- method.add_parameter "int", "n"
153
- end
154
- klass.add_method "gq", "ModEvent" do |method|
155
- method.add_parameter "Space*", "home"
156
- method.add_parameter "double", "n"
157
- end
158
- klass.add_method "gr", "ModEvent" do |method|
159
- method.add_parameter "Space*", "home"
160
- method.add_parameter "int", "n"
161
- end
162
- klass.add_method "gr", "ModEvent" do |method|
163
- method.add_parameter "Space*", "home"
164
- method.add_parameter "double", "n"
165
- end
166
- klass.add_method "nq", "ModEvent" do |method|
167
- method.add_parameter "Space*", "home"
168
- method.add_parameter "int", "n"
169
- end
170
- klass.add_method "nq", "ModEvent" do |method|
171
- method.add_parameter "Space*", "home"
172
- method.add_parameter "double", "n"
173
- end
174
- klass.add_method "eq", "ModEvent" do |method|
175
- method.add_parameter "Space*", "home"
176
- method.add_parameter "int", "n"
177
- end
178
- klass.add_method "eq", "ModEvent" do |method|
179
- method.add_parameter "Space*", "home"
180
- method.add_parameter "double", "n"
181
- end
182
- end
183
- ns.add_cxx_class "I" do |klass|
184
- klass.add_method "narrow", "ModEvent" do |method|
185
- method.add_parameter "Space*", "home"
186
- method.add_parameter "I&", "i"
187
- end
188
- klass.add_method "pme", "ModEvent" do |method|
189
- method.add_parameter "Propagator*", "p"
190
- end
191
- klass.add_method "pme", "PropModEvent" do |method|
192
- method.add_parameter "ModEvent", "me"
193
- end
194
- klass.add_method "subscribe", "void" do |method|
195
- method.add_parameter "Space*", "home"
196
- method.add_parameter "Propagator*", "p"
197
- method.add_parameter "PropCond", "pc"
198
- method.add_parameter "bool", "process"
199
- end
200
- klass.add_method "cancel", "void" do |method|
201
- method.add_parameter "Space*", "home"
202
- method.add_parameter "Propagator*", "p"
203
- method.add_parameter "PropCond", "pc"
204
- end
205
- klass.add_method "update", "void" do |method|
206
- method.add_parameter "Space*", "home"
207
- method.add_parameter "bool", "share"
208
- method.add_parameter "MinusView&", "x"
209
- end
210
- klass.add_method "same", "bool" do |method|
211
- method.add_parameter "Int::MinusViewInt::&", "x"
212
- method.add_parameter "Int::MinusViewInt::&", "y"
213
- end
214
- klass.add_method "before", "bool" do |method|
215
- method.add_parameter "Int::MinusViewInt::&", "x"
216
- method.add_parameter "Int::MinusViewInt::&", "y"
217
- end
218
- end
219
- ns.add_cxx_class "OffsetView" do |klass|
220
- klass.add_constructor
221
- klass.add_constructor do |method|
222
- method.add_parameter "IntView&", "x"
223
- method.add_parameter "int", "c"
224
- end
225
- klass.add_method "init", "void" do |method|
226
- method.add_parameter "IntView&", "x"
227
- method.add_parameter "int", "c"
228
- end
229
- klass.add_method "offset", "int"
230
- klass.add_method "min", "int"
231
- klass.add_method "max", "int"
232
- klass.add_method "med", "int"
233
- klass.add_method "val", "int"
234
- klass.add_method "size", "int"
235
- klass.add_method "width", "int"
236
- klass.add_method "regret_min", "int"
237
- klass.add_method "regret_max", "int"
238
- klass.add_method "range", "bool"
239
- klass.add_method "assigned", "bool"
240
- klass.add_method "in", "bool" do |method|
241
- method.add_parameter "int", "n"
242
- end
243
- klass.add_method "in", "bool" do |method|
244
- method.add_parameter "double", "n"
245
- end
246
- klass.add_method "lq", "ModEvent" do |method|
247
- method.add_parameter "Space*", "home"
248
- method.add_parameter "int", "n"
249
- end
250
- klass.add_method "lq", "ModEvent" do |method|
251
- method.add_parameter "Space*", "home"
252
- method.add_parameter "double", "n"
253
- end
254
- klass.add_method "le", "ModEvent" do |method|
255
- method.add_parameter "Space*", "home"
256
- method.add_parameter "int", "n"
257
- end
258
- klass.add_method "le", "ModEvent" do |method|
259
- method.add_parameter "Space*", "home"
260
- method.add_parameter "double", "n"
261
- end
262
- klass.add_method "gq", "ModEvent" do |method|
263
- method.add_parameter "Space*", "home"
264
- method.add_parameter "int", "n"
265
- end
266
- klass.add_method "gq", "ModEvent" do |method|
267
- method.add_parameter "Space*", "home"
268
- method.add_parameter "double", "n"
269
- end
270
- klass.add_method "gr", "ModEvent" do |method|
271
- method.add_parameter "Space*", "home"
272
- method.add_parameter "int", "n"
273
- end
274
- klass.add_method "gr", "ModEvent" do |method|
275
- method.add_parameter "Space*", "home"
276
- method.add_parameter "double", "n"
277
- end
278
- klass.add_method "nq", "ModEvent" do |method|
279
- method.add_parameter "Space*", "home"
280
- method.add_parameter "int", "n"
281
- end
282
- klass.add_method "nq", "ModEvent" do |method|
283
- method.add_parameter "Space*", "home"
284
- method.add_parameter "double", "n"
285
- end
286
- klass.add_method "eq", "ModEvent" do |method|
287
- method.add_parameter "Space*", "home"
288
- method.add_parameter "int", "n"
289
- end
290
- klass.add_method "eq", "ModEvent" do |method|
291
- method.add_parameter "Space*", "home"
292
- method.add_parameter "double", "n"
293
- end
294
- end
295
- ns.add_cxx_class "I" do |klass|
296
- klass.add_method "narrow", "ModEvent" do |method|
297
- method.add_parameter "Space*", "home"
298
- method.add_parameter "I&", "i"
299
- end
300
- klass.add_method "pme", "ModEvent" do |method|
301
- method.add_parameter "Propagator*", "p"
302
- end
303
- klass.add_method "pme", "PropModEvent" do |method|
304
- method.add_parameter "ModEvent", "me"
305
- end
306
- klass.add_method "subscribe", "void" do |method|
307
- method.add_parameter "Space*", "home"
308
- method.add_parameter "Propagator*", "p"
309
- method.add_parameter "PropCond", "pc"
310
- method.add_parameter "bool", "process"
311
- end
312
- klass.add_method "cancel", "void" do |method|
313
- method.add_parameter "Space*", "home"
314
- method.add_parameter "Propagator*", "p"
315
- method.add_parameter "PropCond", "pc"
316
- end
317
- klass.add_method "update", "void" do |method|
318
- method.add_parameter "Space*", "home"
319
- method.add_parameter "bool", "share"
320
- method.add_parameter "OffsetView&", "x"
321
- end
322
- klass.add_method "same", "bool" do |method|
323
- method.add_parameter "Int::OffsetViewInt::&", "x"
324
- method.add_parameter "Int::OffsetViewInt::&", "y"
325
- end
326
- klass.add_method "before", "bool" do |method|
327
- method.add_parameter "Int::OffsetViewInt::&", "x"
328
- method.add_parameter "Int::OffsetViewInt::&", "y"
329
- end
330
- end
331
- ns.add_cxx_class "ScaleView" do |klass|
332
- klass.add_constructor
333
- klass.add_constructor do |method|
334
- method.add_parameter "int", "b"
335
- method.add_parameter "IntView&", "y"
336
- end
337
- klass.add_method "init", "void" do |method|
338
- method.add_parameter "int", "b"
339
- method.add_parameter "IntView&", "y"
340
- end
341
- klass.add_method "scale", "int"
342
- klass.add_method "min", "Val"
343
- klass.add_method "max", "Val"
344
- klass.add_method "med", "Val"
345
- klass.add_method "val", "Val"
346
- klass.add_method "size", "UnsVal"
347
- klass.add_method "width", "UnsVal"
348
- klass.add_method "regret_min", "UnsVal"
349
- klass.add_method "regret_max", "UnsVal"
350
- klass.add_method "range", "bool"
351
- klass.add_method "assigned", "bool"
352
- klass.add_method "in", "bool" do |method|
353
- method.add_parameter "Val", "n"
354
- end
355
- klass.add_method "lq", "ModEvent" do |method|
356
- method.add_parameter "Space*", "home"
357
- method.add_parameter "Val", "n"
358
- end
359
- klass.add_method "le", "ModEvent" do |method|
360
- method.add_parameter "Space*", "home"
361
- method.add_parameter "Val", "n"
362
- end
363
- klass.add_method "gq", "ModEvent" do |method|
364
- method.add_parameter "Space*", "home"
365
- method.add_parameter "Val", "n"
366
- end
367
- klass.add_method "gr", "ModEvent" do |method|
368
- method.add_parameter "Space*", "home"
369
- method.add_parameter "Val", "n"
370
- end
371
- klass.add_method "nq", "ModEvent" do |method|
372
- method.add_parameter "Space*", "home"
373
- method.add_parameter "Val", "n"
374
- end
375
- klass.add_method "eq", "ModEvent" do |method|
376
- method.add_parameter "Space*", "home"
377
- method.add_parameter "Val", "n"
378
- end
379
- klass.add_method "pme", "ModEvent" do |method|
380
- method.add_parameter "Propagator*", "p"
381
- end
382
- klass.add_method "pme", "PropModEvent" do |method|
383
- method.add_parameter "ModEvent", "me"
384
- end
385
- klass.add_method "subscribe", "void" do |method|
386
- method.add_parameter "Space*", "home"
387
- method.add_parameter "Propagator*", "p"
388
- method.add_parameter "PropCond", "pc"
389
- method.add_parameter "bool", "process"
390
- end
391
- klass.add_method "cancel", "void" do |method|
392
- method.add_parameter "Space*", "home"
393
- method.add_parameter "Propagator*", "p"
394
- method.add_parameter "PropCond", "pc"
395
- end
396
- klass.add_method "update", "void" do |method|
397
- method.add_parameter "Space*", "home"
398
- method.add_parameter "bool", "share"
399
- method.add_parameter "Val", "par2"
400
- method.add_parameter "x", "par3"
401
- end
402
- end
403
- ns.add_cxx_class "ConstIntView" do |klass|
404
- klass.add_constructor
405
- klass.add_constructor do |method|
406
- method.add_parameter "int", "n"
407
- end
408
- klass.add_method "init", "void" do |method|
409
- method.add_parameter "int", "n"
410
- end
411
- klass.add_method "min", "int"
412
- klass.add_method "max", "int"
413
- klass.add_method "med", "int"
414
- klass.add_method "val", "int"
415
- klass.add_method "size", "int"
416
- klass.add_method "width", "int"
417
- klass.add_method "regret_min", "int"
418
- klass.add_method "regret_max", "int"
419
- klass.add_method "range", "bool"
420
- klass.add_method "assigned", "bool"
421
- klass.add_method "in", "bool" do |method|
422
- method.add_parameter "int", "n"
423
- end
424
- klass.add_method "in", "bool" do |method|
425
- method.add_parameter "double", "n"
426
- end
427
- klass.add_method "lq", "ModEvent" do |method|
428
- method.add_parameter "Space*", "home"
429
- method.add_parameter "int", "n"
430
- end
431
- klass.add_method "lq", "ModEvent" do |method|
432
- method.add_parameter "Space*", "home"
433
- method.add_parameter "double", "n"
434
- end
435
- klass.add_method "le", "ModEvent" do |method|
436
- method.add_parameter "Space*", "home"
437
- method.add_parameter "int", "n"
438
- end
439
- klass.add_method "le", "ModEvent" do |method|
440
- method.add_parameter "Space*", "home"
441
- method.add_parameter "double", "n"
442
- end
443
- klass.add_method "gq", "ModEvent" do |method|
444
- method.add_parameter "Space*", "home"
445
- method.add_parameter "int", "n"
446
- end
447
- klass.add_method "gq", "ModEvent" do |method|
448
- method.add_parameter "Space*", "home"
449
- method.add_parameter "double", "n"
450
- end
451
- klass.add_method "gr", "ModEvent" do |method|
452
- method.add_parameter "Space*", "home"
453
- method.add_parameter "int", "n"
454
- end
455
- klass.add_method "gr", "ModEvent" do |method|
456
- method.add_parameter "Space*", "home"
457
- method.add_parameter "double", "n"
458
- end
459
- klass.add_method "nq", "ModEvent" do |method|
460
- method.add_parameter "Space*", "home"
461
- method.add_parameter "int", "n"
462
- end
463
- klass.add_method "nq", "ModEvent" do |method|
464
- method.add_parameter "Space*", "home"
465
- method.add_parameter "double", "n"
466
- end
467
- klass.add_method "eq", "ModEvent" do |method|
468
- method.add_parameter "Space*", "home"
469
- method.add_parameter "int", "n"
470
- end
471
- klass.add_method "eq", "ModEvent" do |method|
472
- method.add_parameter "Space*", "home"
473
- method.add_parameter "double", "n"
474
- end
475
- end
476
- ns.add_cxx_class "I" do |klass|
477
- klass.add_method "narrow", "ModEvent" do |method|
478
- method.add_parameter "Space*", "home"
479
- method.add_parameter "I&", "i"
480
- end
481
- klass.add_method "pme", "ModEvent" do |method|
482
- method.add_parameter "Propagator*", "p"
483
- end
484
- klass.add_method "pme", "PropModEvent" do |method|
485
- method.add_parameter "ModEvent", "me"
486
- end
487
- klass.add_method "subscribe", "void" do |method|
488
- method.add_parameter "Space*", "home"
489
- method.add_parameter "Propagator*", "p"
490
- method.add_parameter "PropCond", "pc"
491
- method.add_parameter "bool", "process"
492
- end
493
- klass.add_method "cancel", "void" do |method|
494
- method.add_parameter "Space*", "home"
495
- method.add_parameter "Propagator*", "p"
496
- method.add_parameter "PropCond", "pc"
497
- end
498
- klass.add_method "update", "void" do |method|
499
- method.add_parameter "Space*", "home"
500
- method.add_parameter "bool", "share"
501
- method.add_parameter "ConstIntView&", "x"
502
- end
503
- klass.add_method "same", "bool" do |method|
504
- method.add_parameter "Int::ConstIntViewInt::&", "x"
505
- method.add_parameter "Int::ConstIntViewInt::&", "y"
506
- end
507
- end
508
- ns.add_cxx_class "View" do |klass|
509
- klass.add_method "before", "bool" do |method|
510
- method.add_parameter "Int::ConstIntViewInt::&", "x"
511
- method.add_parameter "Int::ConstIntViewInt::&", "y"
512
- end
513
- end
514
- ns.add_cxx_class "ViewArray" do |klass|
515
- klass.add_method "BoolView", "explicit" do |method|
516
- method.add_parameter "IntView&", "x"
517
- end
518
- klass.add_method "zero", "bool"
519
- klass.add_method "one", "bool"
520
- klass.add_method "none", "bool"
521
- klass.add_method "t_one", "ModEvent" do |method|
522
- method.add_parameter "Space*", "home"
523
- end
524
- klass.add_method "t_zero", "ModEvent" do |method|
525
- method.add_parameter "Space*", "home"
526
- end
527
- klass.add_method "t_one_none", "void" do |method|
528
- method.add_parameter "Space*", "home"
529
- end
530
- klass.add_method "t_zero_none", "void" do |method|
531
- method.add_parameter "Space*", "home"
532
- end
533
- klass.add_method "update", "void" do |method|
534
- method.add_parameter "Space*", "home"
535
- method.add_parameter "bool", "share"
536
- method.add_parameter "BoolView&", "x"
537
- end
538
- end
539
- ns.add_cxx_class "NegBoolView" do |klass|
540
- klass.add_constructor
541
- klass.add_constructor do |method|
542
- method.add_parameter "BoolView&", "b"
543
- end
544
- klass.add_method "init", "void" do |method|
545
- method.add_parameter "BoolView&", "b"
546
- end
547
- klass.add_method "zero", "bool"
548
- klass.add_method "one", "bool"
549
- klass.add_method "none", "bool"
550
- klass.add_method "t_one", "ModEvent" do |method|
551
- method.add_parameter "Space*", "home"
552
- end
553
- klass.add_method "t_zero", "ModEvent" do |method|
554
- method.add_parameter "Space*", "home"
555
- end
556
- klass.add_method "t_one_none", "void" do |method|
557
- method.add_parameter "Space*", "home"
558
- end
559
- klass.add_method "t_zero_none", "void" do |method|
560
- method.add_parameter "Space*", "home"
561
- end
562
- klass.add_method "min", "int"
563
- klass.add_method "max", "int"
564
- klass.add_method "val", "int"
565
- klass.add_method "assigned", "bool"
566
- klass.add_method "pme", "ModEvent" do |method|
567
- method.add_parameter "Propagator*", "p"
568
- end
569
- klass.add_method "pme", "PropModEvent" do |method|
570
- method.add_parameter "ModEvent", "me"
571
- end
572
- klass.add_method "subscribe", "void" do |method|
573
- method.add_parameter "Space*", "home"
574
- method.add_parameter "Propagator*", "p"
575
- method.add_parameter "PropCond", "pc"
576
- method.add_parameter "bool", "process"
577
- end
578
- klass.add_method "cancel", "void" do |method|
579
- method.add_parameter "Space*", "home"
580
- method.add_parameter "Propagator*", "p"
581
- method.add_parameter "PropCond", "pc"
582
- end
583
- klass.add_method "update", "void" do |method|
584
- method.add_parameter "Space*", "home"
585
- method.add_parameter "bool", "share"
586
- method.add_parameter "NegBoolView&", "x"
587
- end
588
- klass.add_method "bool_test", "BoolTest" do |method|
589
- method.add_parameter "BoolView&", "b0"
590
- method.add_parameter "BoolView&", "b1"
591
- end
592
- klass.add_method "bool_test", "BoolTest" do |method|
593
- method.add_parameter "BoolView&", "b0"
594
- method.add_parameter "NegBoolView&", "b1"
595
- end
596
- klass.add_method "bool_test", "BoolTest" do |method|
597
- method.add_parameter "NegBoolView&", "b0"
598
- method.add_parameter "BoolView&", "b1"
599
- end
600
- klass.add_method "bool_test", "BoolTest" do |method|
601
- method.add_parameter "NegBoolView&", "b0"
602
- method.add_parameter "NegBoolView&", "b1"
603
- end
604
- klass.add_method "same", "bool" do |method|
605
- method.add_parameter "Int::NegBoolViewInt::&", "x"
606
- method.add_parameter "Int::NegBoolViewInt::&", "y"
607
- end
608
- klass.add_method "before", "bool" do |method|
609
- method.add_parameter "Int::NegBoolViewInt::&", "x"
610
- method.add_parameter "Int::NegBoolViewInt::&", "y"
611
- end
612
- end
613
- ns.add_cxx_class "ViewVarTraits" do |klass|
614
- klass.add_method "vx", "Gecode::Int::IntView" do |method|
615
- method.add_parameter "x", "par0"
616
- end
617
- end
618
- ns.add_cxx_class "View" do |klass|
619
- klass.add_method "rtest_eq_bnd", "RelTest" do |method|
620
- method.add_parameter "View", "x"
621
- method.add_parameter "View", "y"
622
- end
623
- end
624
-
625
- end
626
- end
627
-