gecoder 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/CHANGES +11 -0
  2. data/README +12 -1
  3. data/example/example_helper.rb +1 -0
  4. data/example/magic_sequence.rb +43 -0
  5. data/example/queens.rb +43 -0
  6. data/example/raw_bindings.rb +42 -0
  7. data/example/send_more_money.rb +43 -0
  8. data/example/sudoku.rb +65 -0
  9. data/ext/missing.cpp +15 -21
  10. data/ext/missing.h +14 -20
  11. data/ext/vararray.cpp +14 -20
  12. data/ext/vararray.h +18 -22
  13. data/lib/gecoder/bindings/bindings.rb +1979 -1969
  14. data/lib/gecoder/interface/binding_changes.rb +123 -2
  15. data/lib/gecoder/interface/constraints/bool/boolean.rb +80 -65
  16. data/lib/gecoder/interface/constraints/bool_enum/boolean.rb +59 -0
  17. data/lib/gecoder/interface/constraints/bool_enum_constraints.rb +8 -0
  18. data/lib/gecoder/interface/constraints/bool_var_constraints.rb +42 -0
  19. data/lib/gecoder/interface/constraints/int/arithmetic.rb +21 -44
  20. data/lib/gecoder/interface/constraints/int/domain.rb +6 -4
  21. data/lib/gecoder/interface/constraints/int_enum/arithmetic.rb +18 -44
  22. data/lib/gecoder/interface/constraints/int_enum/count.rb +3 -18
  23. data/lib/gecoder/interface/constraints/int_enum/distinct.rb +4 -16
  24. data/lib/gecoder/interface/constraints/int_enum/element.rb +9 -20
  25. data/lib/gecoder/interface/constraints/int_var_constraints.rb +28 -0
  26. data/lib/gecoder/interface/constraints/set/cardinality.rb +56 -0
  27. data/lib/gecoder/interface/constraints/set/domain.rb +66 -0
  28. data/lib/gecoder/interface/constraints/set/relation.rb +125 -0
  29. data/lib/gecoder/interface/constraints/set_var_constraints.rb +37 -0
  30. data/lib/gecoder/interface/constraints.rb +229 -65
  31. data/lib/gecoder/interface/enum_wrapper.rb +42 -11
  32. data/lib/gecoder/interface/model.rb +75 -0
  33. data/lib/gecoder/interface/search.rb +4 -9
  34. data/lib/gecoder/interface/variables.rb +36 -2
  35. data/lib/gecoder/version.rb +1 -1
  36. data/specs/bool_var.rb +58 -0
  37. data/specs/constraints/arithmetic.rb +91 -90
  38. data/specs/constraints/bool_enum.rb +130 -0
  39. data/specs/constraints/boolean.rb +95 -2
  40. data/specs/constraints/cardinality.rb +127 -0
  41. data/specs/constraints/constraint_helper.rb +91 -0
  42. data/specs/constraints/constraints.rb +31 -0
  43. data/specs/constraints/element.rb +43 -72
  44. data/specs/constraints/{domain.rb → int_domain.rb} +4 -0
  45. data/specs/constraints/{relation.rb → int_relation.rb} +0 -0
  46. data/specs/constraints/set_domain.rb +165 -0
  47. data/specs/constraints/set_relation.rb +181 -0
  48. data/specs/enum_wrapper.rb +13 -2
  49. data/specs/int_var.rb +33 -1
  50. data/specs/model.rb +80 -0
  51. data/specs/set_var.rb +39 -0
  52. data/specs/spec_helper.rb +35 -0
  53. data/specs/tmp +11 -124
  54. data/tasks/distribution.rake +1 -1
  55. data/vendor/rust/rust/class.rb +10 -10
  56. data/vendor/rust/rust/constants.rb +1 -1
  57. data/vendor/rust/rust/function.rb +5 -5
  58. data/vendor/rust/rust/type.rb +1 -1
  59. data/vendor/rust/test/constants.rb +1 -0
  60. data/vendor/rust/test/cppclass.cc +5 -0
  61. data/vendor/rust/test/cppclass.hh +4 -0
  62. data/vendor/rust/test/lib/extension-test.rb +1 -1
  63. data/vendor/rust/test/operators.cc +41 -0
  64. data/vendor/rust/test/operators.hh +39 -0
  65. data/vendor/rust/test/operators.rb +39 -0
  66. data/vendor/rust/test/test-cwrapper.rb +3 -0
  67. data/vendor/rust/test/test-operators.rb +42 -0
  68. metadata +31 -4
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: gecoder
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.0
7
- date: 2007-07-03 00:00:00 +02:00
6
+ version: 0.5.0
7
+ date: 2007-07-11 00:00:00 +02:00
8
8
  summary: Ruby interface to Gecode, an environment for constraint programming.
9
9
  require_paths:
10
10
  - lib
@@ -50,6 +50,8 @@ files:
50
50
  - lib/gecoder/interface/constraints/bool_var_constraints.rb
51
51
  - lib/gecoder/interface/constraints/int_var_constraints.rb
52
52
  - lib/gecoder/interface/constraints/int_enum_constraints.rb
53
+ - lib/gecoder/interface/constraints/bool_enum_constraints.rb
54
+ - lib/gecoder/interface/constraints/set_var_constraints.rb
53
55
  - lib/gecoder/interface/constraints/bool/boolean.rb
54
56
  - lib/gecoder/interface/constraints/int/linear.rb
55
57
  - lib/gecoder/interface/constraints/int/domain.rb
@@ -61,7 +63,17 @@ files:
61
63
  - lib/gecoder/interface/constraints/int_enum/count.rb
62
64
  - lib/gecoder/interface/constraints/int_enum/sort.rb
63
65
  - lib/gecoder/interface/constraints/int_enum/arithmetic.rb
66
+ - lib/gecoder/interface/constraints/bool_enum/boolean.rb
67
+ - lib/gecoder/interface/constraints/set/domain.rb
68
+ - lib/gecoder/interface/constraints/set/relation.rb
69
+ - lib/gecoder/interface/constraints/set/cardinality.rb
64
70
  - lib/gecoder/bindings/bindings.rb
71
+ - example/example_helper.rb
72
+ - example/raw_bindings.rb
73
+ - example/send_more_money.rb
74
+ - example/queens.rb
75
+ - example/sudoku.rb
76
+ - example/magic_sequence.rb
65
77
  - vendor/rust
66
78
  - vendor/rust/test
67
79
  - vendor/rust/include
@@ -82,6 +94,10 @@ files:
82
94
  - vendor/rust/test/cppclass.cc
83
95
  - vendor/rust/test/Makefile
84
96
  - vendor/rust/test/constants.rb
97
+ - vendor/rust/test/operators.rb
98
+ - vendor/rust/test/operators.cc
99
+ - vendor/rust/test/test-operators.rb
100
+ - vendor/rust/test/operators.hh
85
101
  - vendor/rust/test/lib/extension-test.rb
86
102
  - vendor/rust/include/rust_conversions.hh
87
103
  - vendor/rust/include/rust_checks.hh
@@ -138,20 +154,25 @@ files:
138
154
  - specs/constraints
139
155
  - specs/bool_var.rb
140
156
  - specs/enum_matrix.rb
157
+ - specs/set_var.rb
141
158
  - specs/constraints/linear.rb
142
- - specs/constraints/relation.rb
159
+ - specs/constraints/set_relation.rb
143
160
  - specs/constraints/distinct.rb
144
161
  - specs/constraints/constraint_helper.rb
145
162
  - specs/constraints/constraints.rb
146
163
  - specs/constraints/boolean.rb
147
164
  - specs/constraints/reification_sugar.rb
148
- - specs/constraints/domain.rb
149
165
  - specs/constraints/equality.rb
150
166
  - specs/constraints/channel.rb
151
167
  - specs/constraints/element.rb
152
168
  - specs/constraints/count.rb
153
169
  - specs/constraints/sort.rb
154
170
  - specs/constraints/arithmetic.rb
171
+ - specs/constraints/bool_enum.rb
172
+ - specs/constraints/int_domain.rb
173
+ - specs/constraints/set_domain.rb
174
+ - specs/constraints/int_relation.rb
175
+ - specs/constraints/cardinality.rb
155
176
  - ext/missing.h
156
177
  - ext/extconf.rb
157
178
  - ext/vararray.cpp
@@ -184,6 +205,8 @@ extra_rdoc_files:
184
205
  - lib/gecoder/interface/constraints/bool_var_constraints.rb
185
206
  - lib/gecoder/interface/constraints/int_var_constraints.rb
186
207
  - lib/gecoder/interface/constraints/int_enum_constraints.rb
208
+ - lib/gecoder/interface/constraints/bool_enum_constraints.rb
209
+ - lib/gecoder/interface/constraints/set_var_constraints.rb
187
210
  - lib/gecoder/interface/constraints/bool/boolean.rb
188
211
  - lib/gecoder/interface/constraints/int/linear.rb
189
212
  - lib/gecoder/interface/constraints/int/domain.rb
@@ -195,6 +218,10 @@ extra_rdoc_files:
195
218
  - lib/gecoder/interface/constraints/int_enum/count.rb
196
219
  - lib/gecoder/interface/constraints/int_enum/sort.rb
197
220
  - lib/gecoder/interface/constraints/int_enum/arithmetic.rb
221
+ - lib/gecoder/interface/constraints/bool_enum/boolean.rb
222
+ - lib/gecoder/interface/constraints/set/domain.rb
223
+ - lib/gecoder/interface/constraints/set/relation.rb
224
+ - lib/gecoder/interface/constraints/set/cardinality.rb
198
225
  - lib/gecoder/bindings/bindings.rb
199
226
  executables: []
200
227