dep-selector-libgecode 1.0.0.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (806) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +26 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +20 -0
  7. data/dep-selector-libgecode.gemspec +25 -0
  8. data/ext/libgecode3/Makefile +8 -0
  9. data/ext/libgecode3/extconf.rb +57 -0
  10. data/ext/libgecode3/vendor/gecode-3.7.3/LICENSE +25 -0
  11. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.contribs +88 -0
  12. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.dep +11307 -0
  13. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.in +1795 -0
  14. data/ext/libgecode3/vendor/gecode-3.7.3/changelog.in +6132 -0
  15. data/ext/libgecode3/vendor/gecode-3.7.3/configure +13054 -0
  16. data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac +356 -0
  17. data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac.in +352 -0
  18. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/README +26 -0
  19. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/AbstractWorker.hh +42 -0
  20. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Doxyfile +263 -0
  21. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Makefile.in.in +162 -0
  22. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.cc +82 -0
  23. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.hh +124 -0
  24. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.cc +306 -0
  25. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.hh +166 -0
  26. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.cc +239 -0
  27. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.hh +140 -0
  28. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/README +6 -0
  29. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.cc +253 -0
  30. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.hh +112 -0
  31. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.cc +59 -0
  32. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.hh +49 -0
  33. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableBranching.hh +34 -0
  34. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.cc +61 -0
  35. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.hh +45 -0
  36. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.cc +48 -0
  37. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.hh +64 -0
  38. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkComparators.hh +67 -0
  39. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.cc +376 -0
  40. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.hh +96 -0
  41. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.cc +285 -0
  42. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.hh +70 -0
  43. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/clean +5 -0
  44. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure +2637 -0
  45. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure.ac +44 -0
  46. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myDom.cc +59 -0
  47. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.cc +119 -0
  48. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.hh +79 -0
  49. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qecode.hh +56 -0
  50. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.cc +41 -0
  51. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.hh +43 -0
  52. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.cc +268 -0
  53. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.hh +56 -0
  54. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.cc +163 -0
  55. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.hh +63 -0
  56. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.cc +423 -0
  57. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.hh +84 -0
  58. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/shortdesc.ac +1 -0
  59. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/vartype.hh +31 -0
  60. data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.conf.in +1245 -0
  61. data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.hh.in +594 -0
  62. data/ext/libgecode3/vendor/gecode-3.7.3/examples/all-interval.cpp +136 -0
  63. data/ext/libgecode3/vendor/gecode-3.7.3/examples/alpha.cpp +151 -0
  64. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bacp.cpp +596 -0
  65. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bibd.cpp +182 -0
  66. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bin-packing.cpp +25363 -0
  67. data/ext/libgecode3/vendor/gecode-3.7.3/examples/black-hole.cpp +413 -0
  68. data/ext/libgecode3/vendor/gecode-3.7.3/examples/car-sequencing.cpp +653 -0
  69. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crew.cpp +269 -0
  70. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crossword.cpp +3954 -0
  71. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crowded-chess.cpp +424 -0
  72. data/ext/libgecode3/vendor/gecode-3.7.3/examples/dominating-queens.cpp +170 -0
  73. data/ext/libgecode3/vendor/gecode-3.7.3/examples/domino.cpp +346 -0
  74. data/ext/libgecode3/vendor/gecode-3.7.3/examples/donald.cpp +135 -0
  75. data/ext/libgecode3/vendor/gecode-3.7.3/examples/efpa.cpp +323 -0
  76. data/ext/libgecode3/vendor/gecode-3.7.3/examples/eq20.cpp +128 -0
  77. data/ext/libgecode3/vendor/gecode-3.7.3/examples/golf.cpp +190 -0
  78. data/ext/libgecode3/vendor/gecode-3.7.3/examples/golomb-ruler.cpp +157 -0
  79. data/ext/libgecode3/vendor/gecode-3.7.3/examples/graph-color.cpp +425 -0
  80. data/ext/libgecode3/vendor/gecode-3.7.3/examples/grocery.cpp +116 -0
  81. data/ext/libgecode3/vendor/gecode-3.7.3/examples/hamming.cpp +144 -0
  82. data/ext/libgecode3/vendor/gecode-3.7.3/examples/ind-set.cpp +144 -0
  83. data/ext/libgecode3/vendor/gecode-3.7.3/examples/kakuro.cpp +627 -0
  84. data/ext/libgecode3/vendor/gecode-3.7.3/examples/knights.cpp +430 -0
  85. data/ext/libgecode3/vendor/gecode-3.7.3/examples/langford-number.cpp +218 -0
  86. data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-sequence.cpp +133 -0
  87. data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-square.cpp +141 -0
  88. data/ext/libgecode3/vendor/gecode-3.7.3/examples/minesweeper.cpp +311 -0
  89. data/ext/libgecode3/vendor/gecode-3.7.3/examples/money.cpp +132 -0
  90. data/ext/libgecode3/vendor/gecode-3.7.3/examples/nonogram.cpp +1215 -0
  91. data/ext/libgecode3/vendor/gecode-3.7.3/examples/open-shop.cpp +412 -0
  92. data/ext/libgecode3/vendor/gecode-3.7.3/examples/ortho-latin.cpp +183 -0
  93. data/ext/libgecode3/vendor/gecode-3.7.3/examples/partition.cpp +145 -0
  94. data/ext/libgecode3/vendor/gecode-3.7.3/examples/pentominoes.cpp +952 -0
  95. data/ext/libgecode3/vendor/gecode-3.7.3/examples/perfect-square.cpp +317 -0
  96. data/ext/libgecode3/vendor/gecode-3.7.3/examples/photo.cpp +166 -0
  97. data/ext/libgecode3/vendor/gecode-3.7.3/examples/queen-armies.cpp +335 -0
  98. data/ext/libgecode3/vendor/gecode-3.7.3/examples/queens.cpp +214 -0
  99. data/ext/libgecode3/vendor/gecode-3.7.3/examples/radiotherapy.cpp +943 -0
  100. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sat.cpp +260 -0
  101. data/ext/libgecode3/vendor/gecode-3.7.3/examples/schurs-lemma.cpp +142 -0
  102. data/ext/libgecode3/vendor/gecode-3.7.3/examples/scowl.hpp +14149 -0
  103. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sports-league.cpp +353 -0
  104. data/ext/libgecode3/vendor/gecode-3.7.3/examples/steel-mill.cpp +654 -0
  105. data/ext/libgecode3/vendor/gecode-3.7.3/examples/steiner.cpp +170 -0
  106. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sudoku.cpp +2294 -0
  107. data/ext/libgecode3/vendor/gecode-3.7.3/examples/tsp.cpp +339 -0
  108. data/ext/libgecode3/vendor/gecode-3.7.3/examples/warehouses.cpp +185 -0
  109. data/ext/libgecode3/vendor/gecode-3.7.3/examples/word-square.cpp +168 -0
  110. data/ext/libgecode3/vendor/gecode-3.7.3/gecode.m4 +1272 -0
  111. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver.hh +602 -0
  112. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.cpp +435 -0
  113. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.hpp +418 -0
  114. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.cpp +104 -0
  115. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.hpp +388 -0
  116. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc.hh +417 -0
  117. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/CHANGES +63 -0
  118. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/ast.hh +492 -0
  119. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/conexpr.hh +82 -0
  120. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.cpp +49 -0
  121. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.hh +47 -0
  122. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.pro +51 -0
  123. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/test_myplugin.fzn +1 -0
  124. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/flatzinc.cpp +1056 -0
  125. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.lxx +137 -0
  126. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.yy.cpp +2458 -0
  127. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_different_int.mzn +37 -0
  128. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_equal_int.mzn +37 -0
  129. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/among.mzn +37 -0
  130. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_int.mzn +37 -0
  131. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_set.mzn +38 -0
  132. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_int.mzn +37 -0
  133. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_set.mzn +38 -0
  134. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing.mzn +44 -0
  135. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_capa.mzn +45 -0
  136. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_load.mzn +45 -0
  137. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/circuit.mzn +40 -0
  138. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/count.mzn +37 -0
  139. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/cumulative.mzn +53 -0
  140. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_bool.mzn +37 -0
  141. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_int.mzn +37 -0
  142. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/diffn.mzn +44 -0
  143. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/disjoint.mzn +37 -0
  144. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/distribute.mzn +46 -0
  145. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_int.mzn +40 -0
  146. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_set.mzn +38 -0
  147. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/gecode.mzn +98 -0
  148. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality.mzn +43 -0
  149. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_closed.mzn +39 -0
  150. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up.mzn +40 -0
  151. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up_closed.mzn +40 -0
  152. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_bool.mzn +37 -0
  153. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_int.mzn +37 -0
  154. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/int_set_channel.mzn +49 -0
  155. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/inverse.mzn +42 -0
  156. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_less_int.mzn +42 -0
  157. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_lesseq_int.mzn +42 -0
  158. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/link_set_to_booleans.mzn +47 -0
  159. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/maximum_int.mzn +37 -0
  160. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_bool.mzn +41 -0
  161. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_int.mzn +41 -0
  162. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/minimum_int.mzn +37 -0
  163. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/nvalue.mzn +37 -0
  164. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/partition_set.mzn +42 -0
  165. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/precedence.mzn +41 -0
  166. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/range.mzn +51 -0
  167. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/redefinitions.mzn +62 -0
  168. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/regular.mzn +38 -0
  169. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/roots.mzn +63 -0
  170. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sort.mzn +37 -0
  171. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sum_pred.mzn +42 -0
  172. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_bool.mzn +37 -0
  173. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_int.mzn +37 -0
  174. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/option.hh +70 -0
  175. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.hh +265 -0
  176. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.cpp +3571 -0
  177. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.hh +164 -0
  178. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.yxx +1604 -0
  179. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/plugin.hh +83 -0
  180. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.cpp +1812 -0
  181. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.hh +71 -0
  182. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/symboltable.hh +96 -0
  183. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/varspec.hh +163 -0
  184. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist.hh +298 -0
  185. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.cpp +288 -0
  186. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hh +110 -0
  187. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hpp +84 -0
  188. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.cpp +673 -0
  189. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.hh +65 -0
  190. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.cpp +120 -0
  191. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.hpp +207 -0
  192. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hh +69 -0
  193. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hpp +70 -0
  194. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.cpp +341 -0
  195. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.hh +129 -0
  196. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.cpp +82 -0
  197. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hh +160 -0
  198. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hpp +210 -0
  199. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hh +215 -0
  200. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hpp +271 -0
  201. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.cpp +138 -0
  202. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.hh +81 -0
  203. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hh +96 -0
  204. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hpp +126 -0
  205. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.cpp +90 -0
  206. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.hh +59 -0
  207. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.cpp +190 -0
  208. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.hh +96 -0
  209. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.cpp +809 -0
  210. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.hh +294 -0
  211. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.cpp +369 -0
  212. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hh +221 -0
  213. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hpp +191 -0
  214. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/mygist.cpp +80 -0
  215. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/standalone_example.pro +18 -0
  216. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.cpp +90 -0
  217. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.hh +82 -0
  218. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.cpp +175 -0
  219. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.hh +75 -0
  220. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.cpp +1430 -0
  221. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.hh +369 -0
  222. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.cpp +473 -0
  223. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hh +237 -0
  224. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hpp +220 -0
  225. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/zoomToFitIcon.hpp +114 -0
  226. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int.hh +3477 -0
  227. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.cpp +185 -0
  228. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.hh +666 -0
  229. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/abs.hpp +236 -0
  230. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/divmod.hpp +350 -0
  231. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/max.hpp +398 -0
  232. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/mult.hpp +750 -0
  233. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqr.hpp +377 -0
  234. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqrt.hpp +217 -0
  235. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array-traits.hpp +147 -0
  236. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.cpp +113 -0
  237. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.hpp +111 -0
  238. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.cpp +71 -0
  239. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.hh +184 -0
  240. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.cpp +388 -0
  241. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.hpp +219 -0
  242. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.cpp +755 -0
  243. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.hh +581 -0
  244. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/base.hpp +137 -0
  245. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/clause.hpp +353 -0
  246. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eq.hpp +196 -0
  247. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.cpp +104 -0
  248. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.hpp +202 -0
  249. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/lq.hpp +241 -0
  250. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/or.hpp +850 -0
  251. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.cpp +152 -0
  252. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.hh +607 -0
  253. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-bool.hpp +81 -0
  254. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-int.hpp +107 -0
  255. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.bs +121 -0
  256. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.cpp +438 -0
  257. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.bs +121 -0
  258. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.cpp +438 -0
  259. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-val.hpp +229 -0
  260. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-values.hpp +213 -0
  261. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-view.hpp +364 -0
  262. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.cpp +172 -0
  263. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.hh +249 -0
  264. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/base.hpp +78 -0
  265. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/dom.hpp +332 -0
  266. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.cpp +241 -0
  267. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.hpp +84 -0
  268. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.cpp +77 -0
  269. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.hpp +71 -0
  270. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/val.hpp +256 -0
  271. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.cpp +229 -0
  272. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.hh +160 -0
  273. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/base.hpp +270 -0
  274. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/dom.hpp +128 -0
  275. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/val.hpp +105 -0
  276. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.cpp +417 -0
  277. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.hh +410 -0
  278. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-base.hpp +80 -0
  279. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-eq.hpp +143 -0
  280. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-gq.hpp +137 -0
  281. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-lq.hpp +136 -0
  282. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/rel.hpp +281 -0
  283. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-base.hpp +131 -0
  284. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-eq.hpp +117 -0
  285. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-gq.hpp +109 -0
  286. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-lq.hpp +96 -0
  287. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.cpp +432 -0
  288. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.hh +745 -0
  289. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/basic.hpp +211 -0
  290. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/edge-finding.hpp +185 -0
  291. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/man-prop.hpp +127 -0
  292. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/opt-prop.hpp +171 -0
  293. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/overload.hpp +63 -0
  294. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task-view.hpp +84 -0
  295. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task.hpp +256 -0
  296. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/tree.hpp +272 -0
  297. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.cpp +187 -0
  298. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.hh +133 -0
  299. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives/val.hpp +380 -0
  300. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.cpp +97 -0
  301. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.hh +314 -0
  302. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/bnd.hpp +444 -0
  303. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom-ctrl.hpp +81 -0
  304. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom.hpp +123 -0
  305. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/graph.hpp +266 -0
  306. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/ter-dom.hpp +113 -0
  307. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/val.hpp +185 -0
  308. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.cpp +135 -0
  309. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.hh +118 -0
  310. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/range.hpp +105 -0
  311. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/spec.hpp +124 -0
  312. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.cpp +190 -0
  313. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.hh +384 -0
  314. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/int.hpp +443 -0
  315. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.cpp +151 -0
  316. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.hpp +74 -0
  317. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/view.hpp +559 -0
  318. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exception.hpp +196 -0
  319. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.cpp +83 -0
  320. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.hh +87 -0
  321. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.cpp +77 -0
  322. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.hpp +51 -0
  323. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.cpp +124 -0
  324. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.hh +508 -0
  325. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/base.hpp +163 -0
  326. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/basic.hpp +148 -0
  327. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.cpp +535 -0
  328. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.hpp +282 -0
  329. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/incremental.hpp +454 -0
  330. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/layered-graph.hpp +982 -0
  331. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.cpp +222 -0
  332. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.hpp +184 -0
  333. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.cpp +172 -0
  334. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.hh +268 -0
  335. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd-sup.hpp +608 -0
  336. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd.hpp +829 -0
  337. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom-sup.hpp +1777 -0
  338. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom.hpp +315 -0
  339. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/post.hpp +169 -0
  340. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/val.hpp +299 -0
  341. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/view.hpp +410 -0
  342. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-1.hpp +249 -0
  343. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-2.hpp +51 -0
  344. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set.cpp +167 -0
  345. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/limits.hpp +94 -0
  346. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-bool.cpp +196 -0
  347. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-int.cpp +194 -0
  348. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear.hh +1560 -0
  349. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-int.hpp +743 -0
  350. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-post.cpp +602 -0
  351. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-scale.hpp +695 -0
  352. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-view.hpp +319 -0
  353. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-bin.hpp +439 -0
  354. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-dom.hpp +484 -0
  355. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-nary.hpp +864 -0
  356. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-noview.hpp +251 -0
  357. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-post.cpp +561 -0
  358. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-ter.hpp +273 -0
  359. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/post.hpp +152 -0
  360. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.cpp +85 -0
  361. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.hh +125 -0
  362. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/prop.hpp +175 -0
  363. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/re-prop.hpp +178 -0
  364. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.cpp +226 -0
  365. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.hh +318 -0
  366. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/base.hpp +88 -0
  367. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/box.hpp +198 -0
  368. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/dim.hpp +197 -0
  369. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/man.hpp +119 -0
  370. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/opt.hpp +153 -0
  371. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.cpp +244 -0
  372. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.hh +429 -0
  373. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-base.hpp +98 -0
  374. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-eq.hpp +174 -0
  375. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-gq.hpp +149 -0
  376. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-lq.hpp +151 -0
  377. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/graph.hpp +283 -0
  378. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-base.hpp +347 -0
  379. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-eq.hpp +167 -0
  380. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-gq.hpp +130 -0
  381. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-lq.hpp +154 -0
  382. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/range-event.hpp +51 -0
  383. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/sym-bit-matrix.hpp +69 -0
  384. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.cpp +73 -0
  385. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.hh +113 -0
  386. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede/single.hpp +232 -0
  387. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/propagator.hpp +311 -0
  388. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.cpp +381 -0
  389. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.hh +665 -0
  390. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/eq.hpp +676 -0
  391. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lex.hpp +414 -0
  392. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lq-le.hpp +537 -0
  393. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/nq.hpp +196 -0
  394. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.cpp +197 -0
  395. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.hh +154 -0
  396. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/int.hpp +168 -0
  397. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/set-op.hpp +154 -0
  398. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/view.hpp +499 -0
  399. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/violations.hpp +101 -0
  400. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.cpp +82 -0
  401. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.hh +107 -0
  402. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/matching.hpp +173 -0
  403. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/narrowing.hpp +250 -0
  404. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/order.hpp +213 -0
  405. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/propagate.hpp +646 -0
  406. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/sortsup.hpp +564 -0
  407. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hh +154 -0
  408. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hpp +187 -0
  409. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task.hh +454 -0
  410. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/array.hpp +179 -0
  411. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/fwd-to-bwd.hpp +102 -0
  412. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/iter.hpp +92 -0
  413. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/man-to-opt.hpp +100 -0
  414. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/prop.hpp +70 -0
  415. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/purge.hpp +74 -0
  416. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/sort.hpp +234 -0
  417. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/tree.hpp +189 -0
  418. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.cpp +258 -0
  419. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.hh +839 -0
  420. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/detectable.hpp +116 -0
  421. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/edge-finding.hpp +78 -0
  422. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/man-prop.hpp +78 -0
  423. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/not-first-not-last.hpp +133 -0
  424. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/opt-prop.hpp +116 -0
  425. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/overload.hpp +93 -0
  426. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/subsumption.hpp +55 -0
  427. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task-view.hpp +105 -0
  428. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task.hpp +532 -0
  429. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/tree.hpp +229 -0
  430. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unshare.cpp +146 -0
  431. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hh +118 -0
  432. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hpp +186 -0
  433. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp.hpp +710 -0
  434. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.cpp +65 -0
  435. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.hpp +431 -0
  436. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.vis +75 -0
  437. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/delta.hpp +64 -0
  438. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.cpp +361 -0
  439. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.hpp +1029 -0
  440. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.vis +117 -0
  441. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.cpp +53 -0
  442. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.hpp +121 -0
  443. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.cpp +61 -0
  444. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.hpp +145 -0
  445. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/print.hpp +56 -0
  446. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph.hh +334 -0
  447. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/bi-link.hpp +89 -0
  448. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/comb-ptr-flag.hpp +78 -0
  449. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/edge.hpp +124 -0
  450. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/graph.hpp +202 -0
  451. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/iter-prune-val.hpp +70 -0
  452. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/node.hpp +171 -0
  453. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view.hpp +1690 -0
  454. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool-test.hpp +64 -0
  455. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool.hpp +314 -0
  456. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/cached.hpp +402 -0
  457. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/constint.hpp +324 -0
  458. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/int.hpp +264 -0
  459. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/iter.hpp +65 -0
  460. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/minus.hpp +300 -0
  461. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/neg-bool.hpp +177 -0
  462. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/offset.hpp +303 -0
  463. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/print.hpp +162 -0
  464. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/rel-test.hpp +231 -0
  465. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/scale.hpp +368 -0
  466. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/zero.hpp +305 -0
  467. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter.hh +96 -0
  468. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-add.hpp +144 -0
  469. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-append.hpp +222 -0
  470. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-array.hpp +139 -0
  471. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-cache.hpp +106 -0
  472. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-compl.hpp +220 -0
  473. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-diff.hpp +142 -0
  474. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-empty.hpp +111 -0
  475. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-inter.hpp +309 -0
  476. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-list.hpp +263 -0
  477. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-map.hpp +260 -0
  478. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minmax.hpp +118 -0
  479. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minus.hpp +107 -0
  480. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-negative.hpp +137 -0
  481. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-offset.hpp +127 -0
  482. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-operations.hpp +157 -0
  483. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-positive.hpp +139 -0
  484. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-rangelist.hpp +115 -0
  485. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-scale.hpp +238 -0
  486. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton-append.hpp +111 -0
  487. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton.hpp +86 -0
  488. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-size.hpp +146 -0
  489. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-union.hpp +361 -0
  490. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-values.hpp +140 -0
  491. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-array.hpp +120 -0
  492. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-bitset.hpp +114 -0
  493. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-inter.hpp +130 -0
  494. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-list.hpp +186 -0
  495. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-map.hpp +136 -0
  496. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-minus.hpp +105 -0
  497. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-negative.hpp +116 -0
  498. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-offset.hpp +113 -0
  499. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-positive.hpp +123 -0
  500. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-ranges.hpp +106 -0
  501. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-singleton.hpp +109 -0
  502. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-union.hpp +137 -0
  503. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-unique.hpp +118 -0
  504. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel.hh +194 -0
  505. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/advisor.hpp +102 -0
  506. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/allocators.hpp +476 -0
  507. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.cpp +70 -0
  508. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.hpp +298 -0
  509. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/array.hpp +2133 -0
  510. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.cpp +121 -0
  511. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.hpp +254 -0
  512. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-tiebreak.hpp +615 -0
  513. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-val.hpp +126 -0
  514. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-view.hpp +455 -0
  515. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher.hpp +431 -0
  516. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.cpp +563 -0
  517. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.hpp +3668 -0
  518. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/exception.hpp +124 -0
  519. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/global-prop-info.hpp +258 -0
  520. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/macros.hpp +118 -0
  521. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-config.hpp +154 -0
  522. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.cpp +53 -0
  523. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.hpp +511 -0
  524. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/modevent.hpp +69 -0
  525. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/propagator.hpp +699 -0
  526. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/range-list.hpp +184 -0
  527. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.cpp +85 -0
  528. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.hpp +459 -0
  529. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/shared-array.hpp +345 -0
  530. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-imp.hpp +332 -0
  531. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-type.hpp +767 -0
  532. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var.hpp +144 -0
  533. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/view.hpp +715 -0
  534. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/wait.hh +244 -0
  535. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel.hh +1870 -0
  536. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/arithmetic.cpp +408 -0
  537. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.cpp +522 -0
  538. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.hpp +87 -0
  539. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/exception.hpp +84 -0
  540. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.cpp +594 -0
  541. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.hpp +297 -0
  542. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.cpp +414 -0
  543. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.hpp +85 -0
  544. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/matrix.hpp +247 -0
  545. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/optimize.hpp +62 -0
  546. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.cpp +817 -0
  547. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.hpp +94 -0
  548. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.cpp +704 -0
  549. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.hpp +96 -0
  550. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.cpp +81 -0
  551. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.hpp +84 -0
  552. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search.hh +458 -0
  553. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.cpp +62 -0
  554. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.hpp +91 -0
  555. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.cpp +62 -0
  556. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.hpp +84 -0
  557. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.cpp +72 -0
  558. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.hpp +49 -0
  559. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.cpp +178 -0
  560. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.hh +203 -0
  561. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.cpp +176 -0
  562. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.hh +195 -0
  563. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.cpp +118 -0
  564. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.hh +418 -0
  565. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/path.hh +477 -0
  566. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.cpp +167 -0
  567. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.hh +73 -0
  568. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.cpp +62 -0
  569. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.hpp +88 -0
  570. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/bab.hh +177 -0
  571. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/dfs.hh +176 -0
  572. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/path.hh +411 -0
  573. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/restart.hh +89 -0
  574. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/statistics.hpp +70 -0
  575. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.cpp +83 -0
  576. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.hpp +137 -0
  577. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/support.hh +91 -0
  578. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/worker.hh +202 -0
  579. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set.hh +1144 -0
  580. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array-traits.hpp +86 -0
  581. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.cpp +219 -0
  582. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.hpp +64 -0
  583. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.cpp +128 -0
  584. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.hh +438 -0
  585. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-val.hpp +107 -0
  586. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.bs +109 -0
  587. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.cpp +370 -0
  588. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-val.hpp +204 -0
  589. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-view.hpp +306 -0
  590. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/cardinality.cpp +65 -0
  591. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.cpp +60 -0
  592. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.hh +107 -0
  593. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.cpp +97 -0
  594. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.hpp +67 -0
  595. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.cpp +116 -0
  596. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.hpp +68 -0
  597. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.cpp +56 -0
  598. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.hh +79 -0
  599. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.cpp +162 -0
  600. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.hpp +66 -0
  601. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/dom.cpp +300 -0
  602. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.cpp +255 -0
  603. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.hh +218 -0
  604. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/disjoint.hpp +324 -0
  605. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/inter.hpp +308 -0
  606. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/union.hpp +342 -0
  607. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/unionConst.hpp +293 -0
  608. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exception.hpp +146 -0
  609. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exec.cpp +58 -0
  610. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.cpp +191 -0
  611. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.hh +459 -0
  612. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/card.hpp +93 -0
  613. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-bool.hpp +282 -0
  614. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-int.hpp +158 -0
  615. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/match.hpp +199 -0
  616. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/minmax.hpp +645 -0
  617. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/weights.hpp +353 -0
  618. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/limits.hpp +62 -0
  619. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.cpp +74 -0
  620. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.hh +115 -0
  621. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede/single.hpp +255 -0
  622. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvc.cpp +66 -0
  623. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvv.cpp +65 -0
  624. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcc.cpp +168 -0
  625. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcv.cpp +166 -0
  626. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vvc.cpp +63 -0
  627. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-singleton.cpp +115 -0
  628. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-ternary.cpp +60 -0
  629. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.cpp +105 -0
  630. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.hh +297 -0
  631. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/common.hpp +619 -0
  632. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/inter.hpp +389 -0
  633. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/partition.hpp +164 -0
  634. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvc.cpp +58 -0
  635. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvv.cpp +54 -0
  636. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-vvc.cpp +57 -0
  637. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl.cpp +54 -0
  638. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvc.cpp +55 -0
  639. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvv.cpp +54 -0
  640. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-vvc.cpp +54 -0
  641. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl.cpp +54 -0
  642. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post.hpp +266 -0
  643. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/subofunion.hpp +166 -0
  644. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/superofinter.hpp +167 -0
  645. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/union.hpp +319 -0
  646. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.cpp +232 -0
  647. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.hh +322 -0
  648. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/common.hpp +125 -0
  649. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/eq.hpp +116 -0
  650. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/lq.hpp +417 -0
  651. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nosubset.hpp +104 -0
  652. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nq.hpp +160 -0
  653. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-eq.hpp +152 -0
  654. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-lq.hpp +182 -0
  655. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-subset.hpp +146 -0
  656. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/subset.hpp +96 -0
  657. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.cpp +64 -0
  658. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.hh +115 -0
  659. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/common.hpp +100 -0
  660. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.cpp +145 -0
  661. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.hpp +79 -0
  662. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.cpp +76 -0
  663. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.hpp +69 -0
  664. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp.hpp +634 -0
  665. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/delta.hpp +78 -0
  666. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.cpp +348 -0
  667. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.hpp +426 -0
  668. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/iter.hpp +63 -0
  669. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.cpp +142 -0
  670. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.hpp +531 -0
  671. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.vis +197 -0
  672. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/print.hpp +49 -0
  673. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.cpp +111 -0
  674. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.hpp +254 -0
  675. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view.hpp +1142 -0
  676. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/cached.hpp +399 -0
  677. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/complement.hpp +556 -0
  678. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/const.hpp +723 -0
  679. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/print.hpp +140 -0
  680. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/set.hpp +263 -0
  681. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/singleton.hpp +402 -0
  682. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support.hh +135 -0
  683. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/auto-link.hpp +73 -0
  684. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset-base.hpp +379 -0
  685. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset.hpp +81 -0
  686. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/block-allocator.hpp +169 -0
  687. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/cast.hpp +52 -0
  688. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/config.hpp.in +109 -0
  689. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-array.hpp +140 -0
  690. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-queue.hpp +156 -0
  691. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-stack.hpp +186 -0
  692. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.cpp +65 -0
  693. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.hpp +102 -0
  694. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.cpp +49 -0
  695. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.hpp +593 -0
  696. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/int-type.hpp +172 -0
  697. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/macros.hpp +103 -0
  698. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/marked-pointer.hpp +79 -0
  699. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/random.hpp +128 -0
  700. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/sort.hpp +268 -0
  701. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/static-stack.hpp +148 -0
  702. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread.hpp +272 -0
  703. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/none.hpp +87 -0
  704. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.cpp +66 -0
  705. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.hpp +142 -0
  706. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.cpp +72 -0
  707. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.hpp +114 -0
  708. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.cpp +68 -0
  709. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.hpp +108 -0
  710. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/timer.hpp +103 -0
  711. data/ext/libgecode3/vendor/gecode-3.7.3/install-sh +323 -0
  712. data/ext/libgecode3/vendor/gecode-3.7.3/misc/allexamples.perl +60 -0
  713. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/back.png +0 -0
  714. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/footer.html +3 -0
  715. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/gecode-logo-100.png +0 -0
  716. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/header.html +66 -0
  717. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/stylesheet.css +468 -0
  718. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixautoheader.perl +55 -0
  719. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixmanifest.perl +84 -0
  720. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixproperties.sh +98 -0
  721. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gecode-logo.ico +0 -0
  722. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genbranch.perl +310 -0
  723. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genchangelog.perl +249 -0
  724. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gencurrentchangelog.perl +191 -0
  725. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlcovmakefile.perl +148 -0
  726. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlicense.perl +121 -0
  727. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genrc.perl +236 -0
  728. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genstatistics.perl +178 -0
  729. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gentxtchangelog.perl +198 -0
  730. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genvarimp.perl +877 -0
  731. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genxcodeproj.perl +144 -0
  732. data/ext/libgecode3/vendor/gecode-3.7.3/misc/getrevision.perl +47 -0
  733. data/ext/libgecode3/vendor/gecode-3.7.3/misc/makedepend.perl +85 -0
  734. data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore-root.txt +43 -0
  735. data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore.txt +18 -0
  736. data/ext/libgecode3/vendor/gecode-3.7.3/test/afc.cpp +143 -0
  737. data/ext/libgecode3/vendor/gecode-3.7.3/test/array.cpp +277 -0
  738. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.cpp +278 -0
  739. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.hh +119 -0
  740. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/bool.cpp +61 -0
  741. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/int.cpp +70 -0
  742. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/set.cpp +72 -0
  743. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.cpp +504 -0
  744. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.hh +119 -0
  745. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/bool.cpp +61 -0
  746. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/int.cpp +70 -0
  747. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/set.cpp +72 -0
  748. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.cpp +655 -0
  749. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hh +353 -0
  750. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hpp +314 -0
  751. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/arithmetic.cpp +772 -0
  752. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/basic.cpp +82 -0
  753. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bin-packing.cpp +237 -0
  754. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bool.cpp +500 -0
  755. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/channel.cpp +234 -0
  756. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/circuit.cpp +359 -0
  757. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/count.cpp +410 -0
  758. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulative.cpp +560 -0
  759. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulatives.cpp +276 -0
  760. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/distinct.cpp +248 -0
  761. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/dom.cpp +174 -0
  762. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/element.cpp +602 -0
  763. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/exec.cpp +150 -0
  764. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/extensional.cpp +571 -0
  765. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/gcc.cpp +320 -0
  766. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/linear.cpp +394 -0
  767. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/member.cpp +138 -0
  768. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-arithmetic.cpp +368 -0
  769. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-bool.cpp +4344 -0
  770. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-count.cpp +295 -0
  771. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-lin.cpp +2179 -0
  772. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-rel.cpp +136 -0
  773. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/no-overlap.cpp +259 -0
  774. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/nvalues.cpp +241 -0
  775. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/precede.cpp +115 -0
  776. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/rel.cpp +568 -0
  777. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sequence.cpp +168 -0
  778. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sorted.cpp +165 -0
  779. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unary.cpp +327 -0
  780. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unshare.cpp +109 -0
  781. data/ext/libgecode3/vendor/gecode-3.7.3/test/search.cpp +487 -0
  782. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.cpp +638 -0
  783. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hh +362 -0
  784. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hpp +121 -0
  785. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/construct.cpp +225 -0
  786. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/convex.cpp +139 -0
  787. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/distinct.cpp +116 -0
  788. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/dom.cpp +346 -0
  789. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/element.cpp +397 -0
  790. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/exec.cpp +86 -0
  791. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/int.cpp +532 -0
  792. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/mm-set.cpp +4532 -0
  793. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/precede.cpp +136 -0
  794. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op-const.cpp +368 -0
  795. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op.cpp +504 -0
  796. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel.cpp +157 -0
  797. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/sequence.cpp +133 -0
  798. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.cpp +281 -0
  799. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hh +161 -0
  800. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hpp +76 -0
  801. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/fz.cpp +93 -0
  802. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.bat.in +41 -0
  803. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.in +41 -0
  804. data/lib/dep-selector-libgecode.rb +15 -0
  805. data/lib/dep-selector-libgecode/version.rb +3 -0
  806. metadata +878 -0
@@ -0,0 +1,244 @@
1
+ /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Main authors:
4
+ * Christian Schulte <schulte@gecode.org>
5
+ *
6
+ * Copyright:
7
+ * Christian Schulte, 2009
8
+ *
9
+ * Last modified:
10
+ * $Date: 2010-03-04 03:32:21 +1100 (Thu, 04 Mar 2010) $ by $Author: schulte $
11
+ * $Revision: 10364 $
12
+ *
13
+ * This file is part of Gecode, the generic constraint
14
+ * development environment:
15
+ * http://www.gecode.org
16
+ *
17
+ * Permission is hereby granted, free of charge, to any person obtaining
18
+ * a copy of this software and associated documentation files (the
19
+ * "Software"), to deal in the Software without restriction, including
20
+ * without limitation the rights to use, copy, modify, merge, publish,
21
+ * distribute, sublicense, and/or sell copies of the Software, and to
22
+ * permit persons to whom the Software is furnished to do so, subject to
23
+ * the following conditions:
24
+ *
25
+ * The above copyright notice and this permission notice shall be
26
+ * included in all copies or substantial portions of the Software.
27
+ *
28
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35
+ *
36
+ */
37
+
38
+ #ifndef __GECODE_KERNEL_WAIT_HH__
39
+ #define __GECODE_KERNEL_WAIT_HH__
40
+
41
+ #include <gecode/kernel.hh>
42
+
43
+ namespace Gecode { namespace Kernel {
44
+
45
+ /**
46
+ * \brief Wait propagator for single view
47
+ *
48
+ * Requires \code #include <gecode/kernel/wait.hh> \endcode
49
+ * \ingroup FuncKernelProp
50
+ */
51
+ template<class View>
52
+ class UnaryWait : public Propagator {
53
+ protected:
54
+ /// View to wait for becoming assigned
55
+ View x;
56
+ /// Continuation to execute
57
+ void (*c)(Space&);
58
+ /// Constructor for creation
59
+ UnaryWait(Space& home, View x, void (*c0)(Space&));
60
+ /// Constructor for cloning \a p
61
+ UnaryWait(Space& home, bool shared, UnaryWait& p);
62
+ public:
63
+ /// Perform copying during cloning
64
+ virtual Actor* copy(Space& home, bool share);
65
+ /// Const function (defined as low unary)
66
+ virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
67
+ /// Perform propagation
68
+ virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
69
+ /// Post propagator that waits until \a x becomes assigned and then executes \a c
70
+ static ExecStatus post(Space& home, View x, void (*c)(Space&));
71
+ /// Delete propagator and return its size
72
+ virtual size_t dispose(Space& home);
73
+ };
74
+
75
+ /**
76
+ * \brief Wait propagator for several views
77
+ *
78
+ * Requires \code #include <gecode/kernel/wait.hh> \endcode
79
+ * \ingroup FuncKernelProp
80
+ */
81
+ template<class View>
82
+ class NaryWait : public Propagator {
83
+ protected:
84
+ /// Views to wait for becoming assigned
85
+ ViewArray<View> x;
86
+ /// Continuation to execute
87
+ void (*c)(Space&);
88
+ /// Constructor for creation
89
+ NaryWait(Space& home, ViewArray<View>& x, void (*c0)(Space&));
90
+ /// Constructor for cloning \a p
91
+ NaryWait(Space& home, bool shared, NaryWait& p);
92
+ public:
93
+ /// Perform copying during cloning
94
+ virtual Actor* copy(Space& home, bool share);
95
+ /// Const function (defined as high unary)
96
+ virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
97
+ /// Perform propagation
98
+ virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
99
+ /// Post propagator that waits until \a x becomes assigned and then executes \a c
100
+ static ExecStatus post(Space& home, ViewArray<View>& x, void (*c)(Space&));
101
+ /// Delete propagator and return its size
102
+ virtual size_t dispose(Space& home);
103
+ };
104
+
105
+
106
+ /*
107
+ * Wait propagator for single view
108
+ *
109
+ */
110
+ template<class View>
111
+ forceinline
112
+ UnaryWait<View>::UnaryWait(Space& home, View x0, void (*c0)(Space&))
113
+ : Propagator(home), x(x0), c(c0) {
114
+ x.subscribe(home,*this,PC_GEN_ASSIGNED);
115
+ }
116
+ template<class View>
117
+ forceinline
118
+ UnaryWait<View>::UnaryWait(Space& home, bool shared, UnaryWait& p)
119
+ : Propagator(home,shared,p), c(p.c) {
120
+ x.update(home,shared,p.x);
121
+ }
122
+ template<class View>
123
+ Actor*
124
+ UnaryWait<View>::copy(Space& home, bool share) {
125
+ return new (home) UnaryWait<View>(home,share,*this);
126
+ }
127
+ template<class View>
128
+ PropCost
129
+ UnaryWait<View>::cost(const Space&, const ModEventDelta&) const {
130
+ return PropCost::unary(PropCost::LO);
131
+ }
132
+ template<class View>
133
+ ExecStatus
134
+ UnaryWait<View>::propagate(Space& home, const ModEventDelta&) {
135
+ assert(x.assigned());
136
+ c(home);
137
+ return home.failed() ? ES_FAILED : home.ES_SUBSUMED(*this);
138
+ }
139
+ template<class View>
140
+ ExecStatus
141
+ UnaryWait<View>::post(Space& home, View x, void (*c)(Space&)) {
142
+ if (x.assigned()) {
143
+ c(home);
144
+ return home.failed() ? ES_FAILED : ES_OK;
145
+ } else {
146
+ (void) new (home) UnaryWait<View>(home,x,c);
147
+ return ES_OK;
148
+ }
149
+ }
150
+ template<class View>
151
+ size_t
152
+ UnaryWait<View>::dispose(Space& home) {
153
+ x.cancel(home,*this,PC_GEN_ASSIGNED);
154
+ (void) Propagator::dispose(home);
155
+ return sizeof(*this);
156
+ }
157
+
158
+
159
+ /*
160
+ * Wait propagator for several views
161
+ *
162
+ */
163
+ template<class View>
164
+ forceinline
165
+ NaryWait<View>::NaryWait(Space& home, ViewArray<View>& x0,
166
+ void (*c0)(Space&))
167
+ : Propagator(home), x(x0), c(c0) {
168
+ assert(!x[0].assigned());
169
+ x[0].subscribe(home,*this,PC_GEN_ASSIGNED);
170
+ }
171
+ template<class View>
172
+ forceinline
173
+ NaryWait<View>::NaryWait(Space& home, bool shared, NaryWait& p)
174
+ : Propagator(home,shared,p), c(p.c) {
175
+ x.update(home,shared,p.x);
176
+ }
177
+ template<class View>
178
+ Actor*
179
+ NaryWait<View>::copy(Space& home, bool share) {
180
+ assert(!x[0].assigned());
181
+ for (int i=x.size()-1; i>0; i--)
182
+ if (x[i].assigned())
183
+ x.move_lst(i);
184
+ assert(x.size() > 0);
185
+ return new (home) NaryWait<View>(home,share,*this);
186
+ }
187
+ template<class View>
188
+ PropCost
189
+ NaryWait<View>::cost(const Space&, const ModEventDelta&) const {
190
+ return PropCost::unary(PropCost::HI);
191
+ }
192
+ template<class View>
193
+ ExecStatus
194
+ NaryWait<View>::propagate(Space& home, const ModEventDelta& ) {
195
+ assert(x[0].assigned());
196
+ for (int i=x.size()-1; i>0; i--)
197
+ if (x[i].assigned())
198
+ x.move_lst(i);
199
+ assert(x.size() > 0);
200
+ if (x.size() == 1) {
201
+ x.size(0);
202
+ c(home);
203
+ return home.failed() ? ES_FAILED : home.ES_SUBSUMED(*this);
204
+ } else {
205
+ // Create new subscription
206
+ x.move_lst(0);
207
+ assert(!x[0].assigned());
208
+ x[0].subscribe(home,*this,PC_GEN_ASSIGNED,false);
209
+ return ES_OK;
210
+ }
211
+ }
212
+ template<class View>
213
+ ExecStatus
214
+ NaryWait<View>::post(Space& home, ViewArray<View>& x, void (*c)(Space&)) {
215
+ for (int i=x.size(); i--; )
216
+ if (x[i].assigned())
217
+ x.move_lst(i);
218
+ if (x.size() == 0) {
219
+ c(home);
220
+ return home.failed() ? ES_FAILED : ES_OK;
221
+ } else {
222
+ x.unique(home);
223
+ if (x.size() == 1) {
224
+ return UnaryWait<View>::post(home,x[0],c);
225
+ } else {
226
+ (void) new (home) NaryWait<View>(home,x,c);
227
+ return ES_OK;
228
+ }
229
+ }
230
+ }
231
+ template<class View>
232
+ size_t
233
+ NaryWait<View>::dispose(Space& home) {
234
+ if (x.size() > 0)
235
+ x[0].cancel(home,*this,PC_GEN_ASSIGNED);
236
+ (void) Propagator::dispose(home);
237
+ return sizeof(*this);
238
+ }
239
+
240
+ }}
241
+
242
+ #endif
243
+
244
+ // STATISTICS: kernel-prop
@@ -0,0 +1,1870 @@
1
+ /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Main authors:
4
+ * Christian Schulte <schulte@gecode.org>
5
+ * Guido Tack <tack@gecode.org>
6
+ * Mikael Lagerkvist <lagerkvist@gecode.org>
7
+ *
8
+ * Copyright:
9
+ * Christian Schulte, 2004
10
+ * Guido Tack, 2004
11
+ * Mikael Lagerkvist, 2005
12
+ *
13
+ * Last modified:
14
+ * $Date: 2012-02-22 16:04:20 +1100 (Wed, 22 Feb 2012) $ by $Author: tack $
15
+ * $Revision: 12537 $
16
+ *
17
+ * This file is part of Gecode, the generic constraint
18
+ * development environment:
19
+ * http://www.gecode.org
20
+ *
21
+ * Permission is hereby granted, free of charge, to any person obtaining
22
+ * a copy of this software and associated documentation files (the
23
+ * "Software"), to deal in the Software without restriction, including
24
+ * without limitation the rights to use, copy, modify, merge, publish,
25
+ * distribute, sublicense, and/or sell copies of the Software, and to
26
+ * permit persons to whom the Software is furnished to do so, subject to
27
+ * the following conditions:
28
+ *
29
+ * The above copyright notice and this permission notice shall be
30
+ * included in all copies or substantial portions of the Software.
31
+ *
32
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
34
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
36
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
37
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
38
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39
+ *
40
+ */
41
+
42
+ #ifndef __GECODE_MINIMODEL_HH__
43
+ #define __GECODE_MINIMODEL_HH__
44
+
45
+ #include <gecode/kernel.hh>
46
+ #include <gecode/int.hh>
47
+ #ifdef GECODE_HAS_SET_VARS
48
+ #include <gecode/set.hh>
49
+ #endif
50
+ #include <gecode/int/linear.hh>
51
+
52
+ #include <gecode/minimodel/exception.hpp>
53
+
54
+ #include <iostream>
55
+
56
+ /*
57
+ * Support for DLLs under Windows
58
+ *
59
+ */
60
+
61
+ #if !defined(GECODE_STATIC_LIBS) && \
62
+ (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
63
+
64
+ #ifdef GECODE_BUILD_MINIMODEL
65
+ #define GECODE_MINIMODEL_EXPORT __declspec( dllexport )
66
+ #else
67
+ #define GECODE_MINIMODEL_EXPORT __declspec( dllimport )
68
+ #endif
69
+
70
+ #else
71
+
72
+ #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
73
+
74
+ #define GECODE_MINIMODEL_EXPORT __attribute__ ((visibility("default")))
75
+
76
+ #else
77
+
78
+ #define GECODE_MINIMODEL_EXPORT
79
+
80
+ #endif
81
+ #endif
82
+
83
+ // Configure auto-linking
84
+ #ifndef GECODE_BUILD_MINIMODEL
85
+ #define GECODE_LIBRARY_NAME "MiniModel"
86
+ #include <gecode/support/auto-link.hpp>
87
+ #endif
88
+
89
+ namespace Gecode {
90
+
91
+ /// Minimalistic modeling support
92
+ namespace MiniModel {}
93
+
94
+ class LinRel;
95
+ #ifdef GECODE_HAS_SET_VARS
96
+ class SetExpr;
97
+ #endif
98
+
99
+ /// Base class for non-linear expressions
100
+ class NonLinExpr {
101
+ public:
102
+ /// Return variable constrained to be equal to the expression
103
+ virtual IntVar post(Home home, IntVar* ret, IntConLevel icl) const = 0;
104
+ /// Post expression to be in relation \a irt with \a c
105
+ virtual void post(Home home, IntRelType irt, int c,
106
+ IntConLevel icl) const = 0;
107
+ /// Post reified expression to be in relation \a irt with \a c
108
+ virtual void post(Home home, IntRelType irt, int c,
109
+ BoolVar b, IntConLevel icl) const = 0;
110
+ /// Destructor
111
+ virtual ~NonLinExpr(void) {}
112
+ /// Return fresh variable if \a x is NULL, \a x otherwise
113
+ static IntVar result(Home home, IntVar* x) {
114
+ if (x==NULL)
115
+ return IntVar(home,Int::Limits::min,Int::Limits::max);
116
+ return *x;
117
+ }
118
+ /// Constrain \a x to be equal to \a y if \a x is not NULL
119
+ static IntVar result(Home home, IntVar* x, IntVar y) {
120
+ if (x!=NULL)
121
+ rel(home,*x,IRT_EQ,y);
122
+ return y;
123
+ }
124
+ /// Memory management
125
+ void* operator new(size_t size) { return heap.ralloc(size); }
126
+ /// Memory management
127
+ void operator delete(void* p, size_t) { heap.rfree(p); }
128
+ };
129
+
130
+ /// Linear expressions
131
+ class LinExpr {
132
+ friend class LinRel;
133
+ #ifdef GECODE_HAS_SET_VARS
134
+ friend class SetExpr;
135
+ #endif
136
+ public:
137
+ /// Type of linear expression
138
+ enum NodeType {
139
+ NT_CONST, ///< Integer constant
140
+ NT_VAR_INT, ///< Linear term with integer variable
141
+ NT_VAR_BOOL, ///< Linear term with Boolean variable
142
+ NT_NONLIN, ///< Non-linear expression
143
+ NT_SUM_INT, ///< Sum of integer variables
144
+ NT_SUM_BOOL, ///< Sum of Boolean variables
145
+ NT_ADD, ///< Addition of linear terms
146
+ NT_SUB, ///< Subtraction of linear terms
147
+ NT_MUL ///< Multiplication by coefficient
148
+ };
149
+ private:
150
+ /// Nodes for linear expressions
151
+ class Node {
152
+ public:
153
+ /// Nodes are reference counted
154
+ unsigned int use;
155
+ /// Integer variables in tree
156
+ int n_int;
157
+ /// Boolean variables in tree
158
+ int n_bool;
159
+ /// Type of expression
160
+ NodeType t;
161
+ /// Subexpressions
162
+ Node *l, *r;
163
+ /// Sum of integer or Boolean variables, or non-linear expression
164
+ union {
165
+ /// Integer views and coefficients
166
+ Int::Linear::Term<Int::IntView>* ti;
167
+ /// Bool views and coefficients
168
+ Int::Linear::Term<Int::BoolView>* tb;
169
+ /// Non-linear expression
170
+ NonLinExpr* ne;
171
+ } sum;
172
+ /// Coefficient and offset
173
+ int a, c;
174
+ /// Integer variable (potentially)
175
+ IntVar x_int;
176
+ /// Boolean variable (potentially)
177
+ BoolVar x_bool;
178
+ /// Default constructor
179
+ Node(void);
180
+ /// Generate linear terms from expression
181
+ GECODE_MINIMODEL_EXPORT
182
+ void fill(Home home, IntConLevel icl,
183
+ Int::Linear::Term<Int::IntView>*& ti,
184
+ Int::Linear::Term<Int::BoolView>*& tb,
185
+ double m, double& d) const;
186
+ /// Generate linear terms for expressions
187
+ int fill(Home home, IntConLevel icl,
188
+ Int::Linear::Term<Int::IntView>* ti,
189
+ Int::Linear::Term<Int::BoolView>* tb) const;
190
+ /// Decrement reference count and possibly free memory
191
+ bool decrement(void);
192
+ /// Destructor
193
+ ~Node(void);
194
+ /// Memory management
195
+ static void* operator new(size_t size);
196
+ /// Memory management
197
+ static void operator delete(void* p,size_t size);
198
+ };
199
+ Node* n;
200
+ public:
201
+ /// Default constructor
202
+ GECODE_MINIMODEL_EXPORT
203
+ LinExpr(void);
204
+ /// Create expression for constant \a c
205
+ GECODE_MINIMODEL_EXPORT
206
+ LinExpr(int c);
207
+ /// Create expression
208
+ GECODE_MINIMODEL_EXPORT
209
+ LinExpr(const IntVar& x, int a=1);
210
+ /// Create expression
211
+ GECODE_MINIMODEL_EXPORT
212
+ LinExpr(const BoolVar& x, int a=1);
213
+ /// Create sum expression
214
+ GECODE_MINIMODEL_EXPORT
215
+ explicit LinExpr(const IntVarArgs& x);
216
+ /// Create sum expression
217
+ GECODE_MINIMODEL_EXPORT
218
+ LinExpr(const IntArgs& a, const IntVarArgs& x);
219
+ /// Create sum expression
220
+ GECODE_MINIMODEL_EXPORT
221
+ explicit LinExpr(const BoolVarArgs& x);
222
+ /// Create sum expression
223
+ GECODE_MINIMODEL_EXPORT
224
+ LinExpr(const IntArgs& a, const BoolVarArgs& x);
225
+ /// Copy constructor
226
+ LinExpr(const LinExpr& e);
227
+ /// Create expression for type and subexpressions
228
+ GECODE_MINIMODEL_EXPORT
229
+ LinExpr(const LinExpr& e0, NodeType t, const LinExpr& e1);
230
+ /// Create expression for type and subexpression
231
+ GECODE_MINIMODEL_EXPORT
232
+ LinExpr(const LinExpr& e0, NodeType t, int c);
233
+ /// Create expression for multiplication
234
+ GECODE_MINIMODEL_EXPORT
235
+ LinExpr(int a, const LinExpr& e);
236
+ /// Create non-linear expression
237
+ GECODE_MINIMODEL_EXPORT
238
+ explicit LinExpr(NonLinExpr* e);
239
+ /// Assignment operator
240
+ GECODE_MINIMODEL_EXPORT
241
+ const LinExpr& operator =(const LinExpr& e);
242
+ /// Post propagator
243
+ void post(Home home, IntRelType irt, IntConLevel icl) const;
244
+ /// Post reified propagator
245
+ void post(Home home, IntRelType irt, const BoolVar& b,
246
+ IntConLevel icl) const;
247
+ /// Post propagator and return variable for value
248
+ IntVar post(Home home, IntConLevel icl) const;
249
+ /// Return non-linear expression inside, or NULL if not non-linear
250
+ NonLinExpr* nle(void) const;
251
+ /// Destructor
252
+ GECODE_MINIMODEL_EXPORT
253
+ ~LinExpr(void);
254
+ };
255
+
256
+ class BoolExpr;
257
+
258
+ /// Linear relations
259
+ class LinRel {
260
+ friend class BoolExpr;
261
+ private:
262
+ /// Linear expression describing the entire relation
263
+ LinExpr e;
264
+ /// Which relation
265
+ IntRelType irt;
266
+ /// Negate relation type
267
+ static IntRelType neg(IntRelType irt);
268
+ /// Default constructor
269
+ LinRel(void);
270
+ public:
271
+ /// Create linear relation for expressions \a l and \a r
272
+ LinRel(const LinExpr& l, IntRelType irt, const LinExpr& r);
273
+ /// Create linear relation for expression \a l and integer \a r
274
+ LinRel(const LinExpr& l, IntRelType irt, int r);
275
+ /// Create linear relation for integer \a l and expression \a r
276
+ LinRel(int l, IntRelType irt, const LinExpr& r);
277
+ /// Post propagator for relation (if \a t is false for negated relation)
278
+ void post(Home home, bool t, IntConLevel icl) const;
279
+ /// Post reified propagator for relation (if \a t is false for negated relation)
280
+ void post(Home home, const BoolVar& b, bool t, IntConLevel icl) const;
281
+ };
282
+
283
+ /**
284
+ * \defgroup TaskModelMiniModelLin Linear expressions and relations
285
+ *
286
+ * Linear expressions can be freely composed of sums and differences of
287
+ * integer variables (Gecode::IntVar) or Boolean variables
288
+ * (Gecode::BoolVar) possibly with integer coefficients and integer
289
+ * constants.
290
+ *
291
+ * Note that both integer and Boolean variables are automatically
292
+ * available as linear expressions.
293
+ *
294
+ * Linear relations are obtained from linear expressions with the normal
295
+ * relation operators.
296
+ *
297
+ * \ingroup TaskModelMiniModel
298
+ */
299
+
300
+ //@{
301
+ /// Construct linear expression as sum of integer variable and integer
302
+ GECODE_MINIMODEL_EXPORT LinExpr
303
+ operator +(int, const IntVar&);
304
+ /// Construct linear expression as sum of Boolean variable and integer
305
+ GECODE_MINIMODEL_EXPORT LinExpr
306
+ operator +(int, const BoolVar&);
307
+ /// Construct linear expression as sum of linear expression and integer
308
+ GECODE_MINIMODEL_EXPORT LinExpr
309
+ operator +(int, const LinExpr&);
310
+ /// Construct linear expression as sum of integer variable and integer
311
+ GECODE_MINIMODEL_EXPORT LinExpr
312
+ operator +(const IntVar&, int);
313
+ /// Construct linear expression as sum of Boolean variable and integer
314
+ GECODE_MINIMODEL_EXPORT LinExpr
315
+ operator +(const BoolVar&, int);
316
+ /// Construct linear expression as sum of linear expression and integer
317
+ GECODE_MINIMODEL_EXPORT LinExpr
318
+ operator +(const LinExpr&, int);
319
+ /// Construct linear expression as sum of integer variables
320
+ GECODE_MINIMODEL_EXPORT LinExpr
321
+ operator +(const IntVar&, const IntVar&);
322
+ /// Construct linear expression as sum of integer and Boolean variable
323
+ GECODE_MINIMODEL_EXPORT LinExpr
324
+ operator +(const IntVar&, const BoolVar&);
325
+ /// Construct linear expression as sum of Boolean and integer variable
326
+ GECODE_MINIMODEL_EXPORT LinExpr
327
+ operator +(const BoolVar&, const IntVar&);
328
+ /// Construct linear expression as sum of Boolean variables
329
+ GECODE_MINIMODEL_EXPORT LinExpr
330
+ operator +(const BoolVar&, const BoolVar&);
331
+ /// Construct linear expression as sum of integer variable and linear expression
332
+ GECODE_MINIMODEL_EXPORT LinExpr
333
+ operator +(const IntVar&, const LinExpr&);
334
+ /// Construct linear expression as sum of Boolean variable and linear expression
335
+ GECODE_MINIMODEL_EXPORT LinExpr
336
+ operator +(const BoolVar&, const LinExpr&);
337
+ /// Construct linear expression as sum of linear expression and integer variable
338
+ GECODE_MINIMODEL_EXPORT LinExpr
339
+ operator +(const LinExpr&, const IntVar&);
340
+ /// Construct linear expression as sum of linear expression and Boolean variable
341
+ GECODE_MINIMODEL_EXPORT LinExpr
342
+ operator +(const LinExpr&, const BoolVar&);
343
+ /// Construct linear expression as sum of linear expressions
344
+ GECODE_MINIMODEL_EXPORT LinExpr
345
+ operator +(const LinExpr&, const LinExpr&);
346
+
347
+ /// Construct linear expression as sum of integer variable and integer
348
+ GECODE_MINIMODEL_EXPORT LinExpr
349
+ operator -(int, const IntVar&);
350
+ /// Construct linear expression as sum of Boolean variable and integer
351
+ GECODE_MINIMODEL_EXPORT LinExpr
352
+ operator -(int, const BoolVar&);
353
+ /// Construct linear expression as sum of integer and linear expression
354
+ GECODE_MINIMODEL_EXPORT LinExpr
355
+ operator -(int, const LinExpr&);
356
+ /// Construct linear expression as sum of integer variable and integer
357
+ GECODE_MINIMODEL_EXPORT LinExpr
358
+ operator -(const IntVar&, int);
359
+ /// Construct linear expression as sum of Boolean variable and integer
360
+ GECODE_MINIMODEL_EXPORT LinExpr
361
+ operator -(const BoolVar&, int);
362
+ /// Construct linear expression as sum of linear expression and integer
363
+ GECODE_MINIMODEL_EXPORT LinExpr
364
+ operator -(const LinExpr&, int);
365
+ /// Construct linear expression as sum of integer variables
366
+ GECODE_MINIMODEL_EXPORT LinExpr
367
+ operator -(const IntVar&, const IntVar&);
368
+ /// Construct linear expression as sum of integer and Boolean variable
369
+ GECODE_MINIMODEL_EXPORT LinExpr
370
+ operator -(const IntVar&, const BoolVar&);
371
+ /// Construct linear expression as sum of Boolean and integer variable
372
+ GECODE_MINIMODEL_EXPORT LinExpr
373
+ operator -(const BoolVar&, const IntVar&);
374
+ /// Construct linear expression as sum of Boolean variables
375
+ GECODE_MINIMODEL_EXPORT LinExpr
376
+ operator -(const BoolVar&, const BoolVar&);
377
+ /// Construct linear expression as sum of integer variable and linear expression
378
+ GECODE_MINIMODEL_EXPORT LinExpr
379
+ operator -(const IntVar&, const LinExpr&);
380
+ /// Construct linear expression as sum of Boolean variable and linear expression
381
+ GECODE_MINIMODEL_EXPORT LinExpr
382
+ operator -(const BoolVar&, const LinExpr&);
383
+ /// Construct linear expression as sum of linear expression and integer variable
384
+ GECODE_MINIMODEL_EXPORT LinExpr
385
+ operator -(const LinExpr&, const IntVar&);
386
+ /// Construct linear expression as sum of linear expression and Boolean variable
387
+ GECODE_MINIMODEL_EXPORT LinExpr
388
+ operator -(const LinExpr&, const BoolVar&);
389
+ /// Construct linear expression as sum of linear expressions
390
+ GECODE_MINIMODEL_EXPORT LinExpr
391
+ operator -(const LinExpr&, const LinExpr&);
392
+
393
+ /// Construct linear expression as negative of integer variable
394
+ GECODE_MINIMODEL_EXPORT LinExpr
395
+ operator -(const IntVar&);
396
+ /// Construct linear expression as negative of Boolean variable
397
+ GECODE_MINIMODEL_EXPORT LinExpr
398
+ operator -(const BoolVar&);
399
+ /// Construct linear expression as negative of linear expression
400
+ GECODE_MINIMODEL_EXPORT LinExpr
401
+ operator -(const LinExpr&);
402
+
403
+ /// Construct linear expression as product of integer coefficient and integer variable
404
+ GECODE_MINIMODEL_EXPORT LinExpr
405
+ operator *(int, const IntVar&);
406
+ /// Construct linear expression as product of integer coefficient and Boolean variable
407
+ GECODE_MINIMODEL_EXPORT LinExpr
408
+ operator *(int, const BoolVar&);
409
+ /// Construct linear expression as product of integer coefficient and integer variable
410
+ GECODE_MINIMODEL_EXPORT LinExpr
411
+ operator *(const IntVar&, int);
412
+ /// Construct linear expression as product of integer coefficient and Boolean variable
413
+ GECODE_MINIMODEL_EXPORT LinExpr
414
+ operator *(const BoolVar&, int);
415
+ /// Construct linear expression as product of integer coefficient and linear expression
416
+ GECODE_MINIMODEL_EXPORT LinExpr
417
+ operator *(const LinExpr&, int);
418
+ /// Construct linear expression as product of integer coefficient and linear expression
419
+ GECODE_MINIMODEL_EXPORT LinExpr
420
+ operator *(int, const LinExpr&);
421
+
422
+ /// Construct linear expression as sum of integer variables
423
+ GECODE_MINIMODEL_EXPORT LinExpr
424
+ sum(const IntVarArgs& x);
425
+ /// Construct linear expression as sum of integer variables with coefficients
426
+ GECODE_MINIMODEL_EXPORT LinExpr
427
+ sum(const IntArgs& a, const IntVarArgs& x);
428
+ /// Construct linear expression as sum of Boolean variables
429
+ GECODE_MINIMODEL_EXPORT LinExpr
430
+ sum(const BoolVarArgs& x);
431
+ /// Construct linear expression as sum of Boolean variables with coefficients
432
+ GECODE_MINIMODEL_EXPORT LinExpr
433
+ sum(const IntArgs& a, const BoolVarArgs& x);
434
+
435
+ /// Construct linear equality relation
436
+ GECODE_MINIMODEL_EXPORT LinRel
437
+ operator ==(int l, const IntVar& r);
438
+ /// Construct linear equality relation
439
+ GECODE_MINIMODEL_EXPORT LinRel
440
+ operator ==(int l, const BoolVar& r);
441
+ /// Construct linear equality relation
442
+ GECODE_MINIMODEL_EXPORT LinRel
443
+ operator ==(int l, const LinExpr& r);
444
+ /// Construct linear equality relation
445
+ GECODE_MINIMODEL_EXPORT LinRel
446
+ operator ==(const IntVar& l, int r);
447
+ /// Construct linear equality relation
448
+ GECODE_MINIMODEL_EXPORT LinRel
449
+ operator ==(const BoolVar& l, int r);
450
+ /// Construct linear equality relation
451
+ GECODE_MINIMODEL_EXPORT LinRel
452
+ operator ==(const LinExpr& l, int r);
453
+ /// Construct linear equality relation
454
+ GECODE_MINIMODEL_EXPORT LinRel
455
+ operator ==(const IntVar& l, const IntVar& r);
456
+ /// Construct linear equality relation
457
+ GECODE_MINIMODEL_EXPORT LinRel
458
+ operator ==(const IntVar& l, const BoolVar& r);
459
+ /// Construct linear equality relation
460
+ GECODE_MINIMODEL_EXPORT LinRel
461
+ operator ==(const BoolVar& l, const IntVar& r);
462
+ /// Construct linear equality relation
463
+ GECODE_MINIMODEL_EXPORT LinRel
464
+ operator ==(const BoolVar& l, const BoolVar& r);
465
+ /// Construct linear equality relation
466
+ GECODE_MINIMODEL_EXPORT LinRel
467
+ operator ==(const IntVar& l, const LinExpr& r);
468
+ /// Construct linear equality relation
469
+ GECODE_MINIMODEL_EXPORT LinRel
470
+ operator ==(const BoolVar& l, const LinExpr& r);
471
+ /// Construct linear equality relation
472
+ GECODE_MINIMODEL_EXPORT LinRel
473
+ operator ==(const LinExpr& l, const IntVar& r);
474
+ /// Construct linear equality relation
475
+ GECODE_MINIMODEL_EXPORT LinRel
476
+ operator ==(const LinExpr& l, const BoolVar& r);
477
+ /// Construct linear equality relation
478
+ GECODE_MINIMODEL_EXPORT LinRel
479
+ operator ==(const LinExpr& l, const LinExpr& r);
480
+
481
+ /// Construct linear disequality relation
482
+ GECODE_MINIMODEL_EXPORT LinRel
483
+ operator !=(int l, const IntVar& r);
484
+ /// Construct linear disequality relation
485
+ GECODE_MINIMODEL_EXPORT LinRel
486
+ operator !=(int l, const BoolVar& r);
487
+ /// Construct linear disequality relation
488
+ GECODE_MINIMODEL_EXPORT LinRel
489
+ operator !=(int l, const LinExpr& r);
490
+ /// Construct linear disequality relation
491
+ GECODE_MINIMODEL_EXPORT LinRel
492
+ operator !=(const IntVar& l, int r);
493
+ /// Construct linear disequality relation
494
+ GECODE_MINIMODEL_EXPORT LinRel
495
+ operator !=(const BoolVar& l, int r);
496
+ /// Construct linear disequality relation
497
+ GECODE_MINIMODEL_EXPORT LinRel
498
+ operator !=(const LinExpr& l, int r);
499
+ /// Construct linear disequality relation
500
+ GECODE_MINIMODEL_EXPORT LinRel
501
+ operator !=(const IntVar& l, const IntVar& r);
502
+ /// Construct linear disequality relation
503
+ GECODE_MINIMODEL_EXPORT LinRel
504
+ operator !=(const IntVar& l, const BoolVar& r);
505
+ /// Construct linear disequality relation
506
+ GECODE_MINIMODEL_EXPORT LinRel
507
+ operator !=(const BoolVar& l, const IntVar& r);
508
+ /// Construct linear disequality relation
509
+ GECODE_MINIMODEL_EXPORT LinRel
510
+ operator !=(const BoolVar& l, const BoolVar& r);
511
+ /// Construct linear disequality relation
512
+ GECODE_MINIMODEL_EXPORT LinRel
513
+ operator !=(const IntVar& l, const LinExpr& r);
514
+ /// Construct linear disequality relation
515
+ GECODE_MINIMODEL_EXPORT LinRel
516
+ operator !=(const BoolVar& l, const LinExpr& r);
517
+ /// Construct linear disequality relation
518
+ GECODE_MINIMODEL_EXPORT LinRel
519
+ operator !=(const LinExpr& l, const IntVar& r);
520
+ /// Construct linear disequality relation
521
+ GECODE_MINIMODEL_EXPORT LinRel
522
+ operator !=(const LinExpr& l, const BoolVar& r);
523
+ /// Construct linear disequality relation
524
+ GECODE_MINIMODEL_EXPORT LinRel
525
+ operator !=(const LinExpr& l, const LinExpr& r);
526
+
527
+ /// Construct linear inequality relation
528
+ GECODE_MINIMODEL_EXPORT LinRel
529
+ operator <(int l, const IntVar& r);
530
+ /// Construct linear inequality relation
531
+ GECODE_MINIMODEL_EXPORT LinRel
532
+ operator <(int l, const BoolVar& r);
533
+ /// Construct linear inequality relation
534
+ GECODE_MINIMODEL_EXPORT LinRel
535
+ operator <(int l, const LinExpr& r);
536
+ /// Construct linear inequality relation
537
+ GECODE_MINIMODEL_EXPORT LinRel
538
+ operator <(const IntVar& l, int r);
539
+ /// Construct linear inequality relation
540
+ GECODE_MINIMODEL_EXPORT LinRel
541
+ operator <(const BoolVar& l, int r);
542
+ /// Construct linear inequality relation
543
+ GECODE_MINIMODEL_EXPORT LinRel
544
+ operator <(const LinExpr& l, int r);
545
+ /// Construct linear inequality relation
546
+ GECODE_MINIMODEL_EXPORT LinRel
547
+ operator <(const IntVar& l, const IntVar& r);
548
+ /// Construct linear inequality relation
549
+ GECODE_MINIMODEL_EXPORT LinRel
550
+ operator <(const IntVar& l, const BoolVar& r);
551
+ /// Construct linear inequality relation
552
+ GECODE_MINIMODEL_EXPORT LinRel
553
+ operator <(const BoolVar& l, const IntVar& r);
554
+ /// Construct linear inequality relation
555
+ GECODE_MINIMODEL_EXPORT LinRel
556
+ operator <(const BoolVar& l, const BoolVar& r);
557
+ /// Construct linear inequality relation
558
+ GECODE_MINIMODEL_EXPORT LinRel
559
+ operator <(const IntVar& l, const LinExpr& r);
560
+ /// Construct linear inequality relation
561
+ GECODE_MINIMODEL_EXPORT LinRel
562
+ operator <(const BoolVar& l, const LinExpr& r);
563
+ /// Construct linear inequality relation
564
+ GECODE_MINIMODEL_EXPORT LinRel
565
+ operator <(const LinExpr& l, const IntVar& r);
566
+ /// Construct linear inequality relation
567
+ GECODE_MINIMODEL_EXPORT LinRel
568
+ operator <(const LinExpr& l, const BoolVar& r);
569
+ /// Construct linear inequality relation
570
+ GECODE_MINIMODEL_EXPORT LinRel
571
+ operator <(const LinExpr& l, const LinExpr& r);
572
+
573
+ /// Construct linear inequality relation
574
+ GECODE_MINIMODEL_EXPORT LinRel
575
+ operator <=(int l, const IntVar& r);
576
+ /// Construct linear inequality relation
577
+ GECODE_MINIMODEL_EXPORT LinRel
578
+ operator <=(int l, const BoolVar& r);
579
+ /// Construct linear inequality relation
580
+ GECODE_MINIMODEL_EXPORT LinRel
581
+ operator <=(int l, const LinExpr& r);
582
+ /// Construct linear inequality relation
583
+ GECODE_MINIMODEL_EXPORT LinRel
584
+ operator <=(const IntVar& l, int r);
585
+ /// Construct linear inequality relation
586
+ GECODE_MINIMODEL_EXPORT LinRel
587
+ operator <=(const BoolVar& l, int r);
588
+ /// Construct linear inequality relation
589
+ GECODE_MINIMODEL_EXPORT LinRel
590
+ operator <=(const LinExpr& l, int r);
591
+ /// Construct linear inequality relation
592
+ GECODE_MINIMODEL_EXPORT LinRel
593
+ operator <=(const IntVar& l, const IntVar& r);
594
+ /// Construct linear inequality relation
595
+ GECODE_MINIMODEL_EXPORT LinRel
596
+ operator <=(const IntVar& l, const BoolVar& r);
597
+ /// Construct linear inequality relation
598
+ GECODE_MINIMODEL_EXPORT LinRel
599
+ operator <=(const BoolVar& l, const IntVar& r);
600
+ /// Construct linear inequality relation
601
+ GECODE_MINIMODEL_EXPORT LinRel
602
+ operator <=(const BoolVar& l, const BoolVar& r);
603
+ /// Construct linear inequality relation
604
+ GECODE_MINIMODEL_EXPORT LinRel
605
+ operator <=(const IntVar& l, const LinExpr& r);
606
+ /// Construct linear inequality relation
607
+ GECODE_MINIMODEL_EXPORT LinRel
608
+ operator <=(const BoolVar& l, const LinExpr& r);
609
+ /// Construct linear inequality relation
610
+ GECODE_MINIMODEL_EXPORT LinRel
611
+ operator <=(const LinExpr& l, const IntVar& r);
612
+ /// Construct linear inequality relation
613
+ GECODE_MINIMODEL_EXPORT LinRel
614
+ operator <=(const LinExpr& l, const BoolVar& r);
615
+ /// Construct linear inequality relation
616
+ GECODE_MINIMODEL_EXPORT LinRel
617
+ operator <=(const LinExpr& l, const LinExpr& r);
618
+
619
+ /// Construct linear inequality relation
620
+ GECODE_MINIMODEL_EXPORT LinRel
621
+ operator >(int l, const IntVar& r);
622
+ /// Construct linear inequality relation
623
+ GECODE_MINIMODEL_EXPORT LinRel
624
+ operator >(int l, const BoolVar& r);
625
+ /// Construct linear inequality relation
626
+ GECODE_MINIMODEL_EXPORT LinRel
627
+ operator >(int l, const LinExpr& r);
628
+ /// Construct linear inequality relation
629
+ GECODE_MINIMODEL_EXPORT LinRel
630
+ operator >(const IntVar& l, int r);
631
+ /// Construct linear inequality relation
632
+ GECODE_MINIMODEL_EXPORT LinRel
633
+ operator >(const BoolVar& l, int r);
634
+ /// Construct linear inequality relation
635
+ GECODE_MINIMODEL_EXPORT LinRel
636
+ operator >(const LinExpr& l, int r);
637
+ /// Construct linear inequality relation
638
+ GECODE_MINIMODEL_EXPORT LinRel
639
+ operator >(const IntVar& l, const IntVar& r);
640
+ /// Construct linear inequality relation
641
+ GECODE_MINIMODEL_EXPORT LinRel
642
+ operator >(const IntVar& l, const BoolVar& r);
643
+ /// Construct linear inequality relation
644
+ GECODE_MINIMODEL_EXPORT LinRel
645
+ operator >(const BoolVar& l, const IntVar& r);
646
+ /// Construct linear inequality relation
647
+ GECODE_MINIMODEL_EXPORT LinRel
648
+ operator >(const BoolVar& l, const BoolVar& r);
649
+ /// Construct linear inequality relation
650
+ GECODE_MINIMODEL_EXPORT LinRel
651
+ operator >(const IntVar& l, const LinExpr& r);
652
+ /// Construct linear inequality relation
653
+ GECODE_MINIMODEL_EXPORT LinRel
654
+ operator >(const BoolVar& l, const LinExpr& r);
655
+ /// Construct linear inequality relation
656
+ GECODE_MINIMODEL_EXPORT LinRel
657
+ operator >(const LinExpr& l, const IntVar& r);
658
+ /// Construct linear inequality relation
659
+ GECODE_MINIMODEL_EXPORT LinRel
660
+ operator >(const LinExpr& l, const BoolVar& r);
661
+ /// Construct linear inequality relation
662
+ GECODE_MINIMODEL_EXPORT LinRel
663
+ operator >(const LinExpr& l, const LinExpr& r);
664
+
665
+ /// Construct linear inequality relation
666
+ GECODE_MINIMODEL_EXPORT LinRel
667
+ operator >=(int l, const IntVar& r);
668
+ /// Construct linear inequality relation
669
+ GECODE_MINIMODEL_EXPORT LinRel
670
+ operator >=(int l, const BoolVar& r);
671
+ /// Construct linear inequality relation
672
+ GECODE_MINIMODEL_EXPORT LinRel
673
+ operator >=(int l, const LinExpr& r);
674
+ /// Construct linear inequality relation
675
+ GECODE_MINIMODEL_EXPORT LinRel
676
+ operator >=(const IntVar& l, int r);
677
+ /// Construct linear inequality relation
678
+ GECODE_MINIMODEL_EXPORT LinRel
679
+ operator >=(const BoolVar& l, int r);
680
+ /// Construct linear inequality relation
681
+ GECODE_MINIMODEL_EXPORT LinRel
682
+ operator >=(const LinExpr& l, int r);
683
+ /// Construct linear inequality relation
684
+ GECODE_MINIMODEL_EXPORT LinRel
685
+ operator >=(const IntVar& l, const IntVar& r);
686
+ /// Construct linear inequality relation
687
+ GECODE_MINIMODEL_EXPORT LinRel
688
+ operator >=(const IntVar& l, const BoolVar& r);
689
+ /// Construct linear inequality relation
690
+ GECODE_MINIMODEL_EXPORT LinRel
691
+ operator >=(const BoolVar& l, const IntVar& r);
692
+ /// Construct linear inequality relation
693
+ GECODE_MINIMODEL_EXPORT LinRel
694
+ operator >=(const BoolVar& l, const BoolVar& r);
695
+ /// Construct linear inequality relation
696
+ GECODE_MINIMODEL_EXPORT LinRel
697
+ operator >=(const IntVar& l, const LinExpr& r);
698
+ /// Construct linear inequality relation
699
+ GECODE_MINIMODEL_EXPORT LinRel
700
+ operator >=(const BoolVar& l, const LinExpr& r);
701
+ /// Construct linear inequality relation
702
+ GECODE_MINIMODEL_EXPORT LinRel
703
+ operator >=(const LinExpr& l, const IntVar& r);
704
+ /// Construct linear inequality relation
705
+ GECODE_MINIMODEL_EXPORT LinRel
706
+ operator >=(const LinExpr& l, const BoolVar& r);
707
+ /// Construct linear inequality relation
708
+ GECODE_MINIMODEL_EXPORT LinRel
709
+ operator >=(const LinExpr& l, const LinExpr& r);
710
+ //@}
711
+
712
+ #ifdef GECODE_HAS_SET_VARS
713
+ /// %Set expressions
714
+ class SetExpr {
715
+ public:
716
+ /// Type of set expression
717
+ enum NodeType {
718
+ NT_VAR, ///< Variable
719
+ NT_CONST, ///< Constant
720
+ NT_LEXP, ///< Linear expression
721
+ NT_CMPL, ///< Complement
722
+ NT_INTER, ///< Intersection
723
+ NT_UNION, ///< Union
724
+ NT_DUNION ///< Disjoint union
725
+ };
726
+ /// Check if types agree
727
+ static bool same(NodeType t0, NodeType t1);
728
+ /// %Node for set expression
729
+ class Node {
730
+ public:
731
+ /// Nodes are reference counted
732
+ unsigned int use;
733
+ /// Number of variables in subtree with same type (for INTER and UNION)
734
+ int same;
735
+ /// Type of expression
736
+ NodeType t;
737
+ /// Subexpressions
738
+ Node *l, *r;
739
+ /// Possibly a variable
740
+ SetVar x;
741
+ /// Possibly a constant
742
+ IntSet s;
743
+ /// Possibly a linear expression
744
+ LinExpr e;
745
+
746
+ /// Default constructor
747
+ Node(void);
748
+ /// Decrement reference count and possibly free memory
749
+ GECODE_MINIMODEL_EXPORT
750
+ bool decrement(void);
751
+ /// Memory management
752
+ static void* operator new(size_t size);
753
+ /// Memory management
754
+ static void operator delete(void* p, size_t size);
755
+ };
756
+ /// %Node for negation normalform (%NNF)
757
+ class NNF {
758
+ public:
759
+ /// Type of node
760
+ NodeType t;
761
+ /// Number of positive literals for node type
762
+ int p;
763
+ /// Number of negative literals for node type
764
+ int n;
765
+ /// Union depending on nodetype \a t
766
+ union {
767
+ /// For binary nodes (and, or, eqv)
768
+ struct {
769
+ /// Left subtree
770
+ NNF* l;
771
+ /// Right subtree
772
+ NNF* r;
773
+ } b;
774
+ /// For atomic nodes
775
+ struct {
776
+ /// Pointer to corresponding Boolean expression node
777
+ Node* x;
778
+ } a;
779
+ } u;
780
+ /// Is formula negative
781
+ bool neg;
782
+ /// Create negation normalform
783
+ GECODE_MINIMODEL_EXPORT
784
+ static NNF* nnf(Region& r, Node* n, bool neg);
785
+ /// Post propagators for nested conjunctive and disjunctive expression
786
+ GECODE_MINIMODEL_EXPORT
787
+ void post(Home home, NodeType t, SetVarArgs& b, int& i) const;
788
+ /// Post propagators for expression
789
+ GECODE_MINIMODEL_EXPORT
790
+ void post(Home home, SetRelType srt, SetVar s) const;
791
+ /// Post propagators for reified expression
792
+ GECODE_MINIMODEL_EXPORT
793
+ void post(Home home, SetRelType srt, SetVar s, BoolVar b) const;
794
+ /// Post propagators for relation
795
+ GECODE_MINIMODEL_EXPORT
796
+ void post(Home home, SetRelType srt, const NNF* n) const;
797
+ /// Post reified propagators for relation (or negated relation if \a t is false)
798
+ GECODE_MINIMODEL_EXPORT
799
+ void post(Home home, BoolVar b, bool t, SetRelType srt,
800
+ const NNF* n) const;
801
+ /// Allocate memory from region
802
+ static void* operator new(size_t s, Region& r);
803
+ /// No-op (for exceptions)
804
+ static void operator delete(void*);
805
+ /// No-op
806
+ static void operator delete(void*, Region&);
807
+ };
808
+ private:
809
+ /// Pointer to node for expression
810
+ Node* n;
811
+ public:
812
+ /// Default constructor
813
+ GECODE_MINIMODEL_EXPORT
814
+ SetExpr(void);
815
+ /// Copy constructor
816
+ SetExpr(const SetExpr& e);
817
+ /// Construct expression for type and subexpresssions
818
+ GECODE_MINIMODEL_EXPORT
819
+ SetExpr(const SetExpr& l, NodeType t, const SetExpr& r);
820
+ /// Construct expression for variable
821
+ GECODE_MINIMODEL_EXPORT
822
+ SetExpr(const SetVar& x);
823
+ /// Construct expression for integer variable
824
+ GECODE_MINIMODEL_EXPORT
825
+ explicit SetExpr(const LinExpr& x);
826
+ /// Construct expression for constant
827
+ GECODE_MINIMODEL_EXPORT
828
+ SetExpr(const IntSet& s);
829
+ /// Construct expression for negation
830
+ GECODE_MINIMODEL_EXPORT
831
+ SetExpr(const SetExpr& e, NodeType t);
832
+ /// Post propagators for expression
833
+ SetVar post(Home home) const;
834
+ /// Post propagators for relation
835
+ void post(Home home, SetRelType srt, const SetExpr& e) const;
836
+ /// Post propagators for reified relation
837
+ void post(Home home, BoolVar b, bool t,
838
+ SetRelType srt, const SetExpr& e) const;
839
+ /// Assignment operator
840
+ GECODE_MINIMODEL_EXPORT
841
+ const SetExpr& operator =(const SetExpr& e);
842
+ /// Destructor
843
+ GECODE_MINIMODEL_EXPORT
844
+ ~SetExpr(void);
845
+ };
846
+
847
+ /// Comparison relation (for two-sided comparisons)
848
+ class SetCmpRel {
849
+ public:
850
+ /// Left side of relation
851
+ SetExpr l;
852
+ /// Right side of relation
853
+ SetExpr r;
854
+ /// Which relation
855
+ SetRelType srt;
856
+ /// Constructor
857
+ SetCmpRel(const SetExpr& l, SetRelType srt, const SetExpr& r);
858
+ };
859
+
860
+ /// %Set relations
861
+ class SetRel {
862
+ private:
863
+ /// Expression
864
+ SetExpr _e0;
865
+ /// Relation
866
+ SetRelType _srt;
867
+ /// Expression
868
+ SetExpr _e1;
869
+ public:
870
+ /// Default constructor
871
+ SetRel(void);
872
+ /// Constructor
873
+ SetRel(const SetExpr& e0, SetRelType srt, const SetExpr& e1);
874
+ /// Constructor
875
+ SetRel(const SetCmpRel& r);
876
+ /// Post propagators for relation (or negated relation if \a t is false)
877
+ void post(Home home, bool t) const;
878
+ /// Post propagators for reified relation (or negated relation if \a t is false)
879
+ void post(Home home, BoolVar b, bool t) const;
880
+ };
881
+
882
+ /**
883
+ * \defgroup TaskModelMiniModelSet Set expressions and relations
884
+ *
885
+ * Set expressions and relations can be freely composed of variables
886
+ * with the usual connectives.
887
+ *
888
+ * \ingroup TaskModelMiniModel
889
+ */
890
+
891
+ //@{
892
+ /// Singleton expression
893
+ GECODE_MINIMODEL_EXPORT SetExpr
894
+ singleton(const LinExpr&);
895
+ /// Complement expression
896
+ GECODE_MINIMODEL_EXPORT SetExpr
897
+ operator -(const SetExpr&);
898
+ /// Intersection of set expressions
899
+ GECODE_MINIMODEL_EXPORT SetExpr
900
+ operator &(const SetExpr&, const SetExpr&);
901
+ /// Union of set expressions
902
+ GECODE_MINIMODEL_EXPORT SetExpr
903
+ operator |(const SetExpr&, const SetExpr&);
904
+ /// Disjoint union of set expressions
905
+ GECODE_MINIMODEL_EXPORT SetExpr
906
+ operator +(const SetExpr&, const SetExpr&);
907
+ /// Difference of set expressions
908
+ GECODE_MINIMODEL_EXPORT SetExpr
909
+ operator -(const SetExpr&, const SetExpr&);
910
+
911
+ /// Intersection of set variables
912
+ GECODE_MINIMODEL_EXPORT SetExpr
913
+ inter(const SetVarArgs&);
914
+ /// Union of set variables
915
+ GECODE_MINIMODEL_EXPORT SetExpr
916
+ setunion(const SetVarArgs&);
917
+ /// Disjoint union of set variables
918
+ GECODE_MINIMODEL_EXPORT SetExpr
919
+ setdunion(const SetVarArgs&);
920
+
921
+ /// Cardinality of set expression
922
+ GECODE_MINIMODEL_EXPORT LinExpr
923
+ cardinality(const SetExpr&);
924
+ /// Minimum element of set expression
925
+ GECODE_MINIMODEL_EXPORT LinExpr
926
+ min(const SetExpr&);
927
+ /// Minimum element of set expression
928
+ GECODE_MINIMODEL_EXPORT LinExpr
929
+ max(const SetExpr&);
930
+
931
+ /// Equality of set expressions
932
+ GECODE_MINIMODEL_EXPORT SetRel
933
+ operator ==(const SetExpr&, const SetExpr&);
934
+ /// Disequality of set expressions
935
+ GECODE_MINIMODEL_EXPORT SetRel
936
+ operator !=(const SetExpr&, const SetExpr&);
937
+ /// Subset of set expressions
938
+ GECODE_MINIMODEL_EXPORT SetCmpRel
939
+ operator <=(const SetExpr&, const SetExpr&);
940
+ /// Subset of set expressions
941
+ GECODE_MINIMODEL_EXPORT BoolExpr
942
+ operator <=(const SetCmpRel&, const SetExpr&);
943
+ /// Superset of set expressions
944
+ GECODE_MINIMODEL_EXPORT SetCmpRel
945
+ operator >=(const SetExpr&, const SetExpr&);
946
+ /// Superset of set expressions
947
+ GECODE_MINIMODEL_EXPORT BoolExpr
948
+ operator >=(const SetCmpRel&, const SetExpr&);
949
+ /// Disjointness of set expressions
950
+ GECODE_MINIMODEL_EXPORT SetRel
951
+ operator ||(const SetExpr&, const SetExpr&);
952
+ //@}
953
+ #endif
954
+
955
+ /// Boolean expressions
956
+ class BoolExpr {
957
+ public:
958
+ /// Type of Boolean expression
959
+ enum NodeType {
960
+ NT_VAR, ///< Variable
961
+ NT_NOT, ///< Negation
962
+ NT_AND, ///< Conjunction
963
+ NT_OR, ///< Disjunction
964
+ NT_EQV, ///< Equivalence
965
+ NT_RLIN, ///< Reified linear relation
966
+ NT_RSET, ///< Reified set relation
967
+ NT_MISC ///< Other Boolean expression
968
+ };
969
+ /// Miscealloneous Boolean expressions
970
+ class MiscExpr {
971
+ public:
972
+ /** Constrain \a b to be equivalent to the expression
973
+ * (negated if \a neg)
974
+ */
975
+ virtual void post(Space& home, BoolVar b, bool neg,
976
+ IntConLevel icl) = 0;
977
+ /// Destructor
978
+ virtual GECODE_MINIMODEL_EXPORT ~MiscExpr(void);
979
+ /// Memory management
980
+ static void* operator new(size_t size);
981
+ /// Memory management
982
+ static void operator delete(void* p, size_t size);
983
+ };
984
+ /// %Node for Boolean expression
985
+ class Node {
986
+ public:
987
+ /// Nodes are reference counted
988
+ unsigned int use;
989
+ /// Number of variables in subtree with same type (for AND and OR)
990
+ int same;
991
+ /// Type of expression
992
+ NodeType t;
993
+ /// Subexpressions
994
+ Node *l, *r;
995
+ /// Possibly a variable
996
+ BoolVar x;
997
+ /// Possibly a reified linear relation
998
+ LinRel rl;
999
+ #ifdef GECODE_HAS_SET_VARS
1000
+ /// Possibly a reified set relation
1001
+ SetRel rs;
1002
+ #endif
1003
+ /// Possibly a misc Boolean expression
1004
+ MiscExpr* m;
1005
+
1006
+ /// Default constructor
1007
+ Node(void);
1008
+ /// Destructor
1009
+ ~Node(void);
1010
+ /// Decrement reference count and possibly free memory
1011
+ GECODE_MINIMODEL_EXPORT
1012
+ bool decrement(void);
1013
+ /// Memory management
1014
+ static void* operator new(size_t size);
1015
+ /// Memory management
1016
+ static void operator delete(void* p, size_t size);
1017
+ };
1018
+ /// %Node for negation normalform (%NNF)
1019
+ class NNF {
1020
+ public:
1021
+ /// Type of node
1022
+ NodeType t;
1023
+ /// Number of positive literals for node type
1024
+ int p;
1025
+ /// Number of negative literals for node type
1026
+ int n;
1027
+ /// Union depending on nodetype \a t
1028
+ union {
1029
+ /// For binary nodes (and, or, eqv)
1030
+ struct {
1031
+ /// Left subtree
1032
+ NNF* l;
1033
+ /// Right subtree
1034
+ NNF* r;
1035
+ } b;
1036
+ /// For atomic nodes
1037
+ struct {
1038
+ /// Is atomic formula negative
1039
+ bool neg;
1040
+ /// Pointer to corresponding Boolean expression node
1041
+ Node* x;
1042
+ } a;
1043
+ } u;
1044
+ /// Create negation normalform
1045
+ GECODE_MINIMODEL_EXPORT
1046
+ static NNF* nnf(Region& r, Node* n, bool neg);
1047
+ /// Post propagators for nested conjunctive and disjunctive expression
1048
+ GECODE_MINIMODEL_EXPORT
1049
+ void post(Home home, NodeType t,
1050
+ BoolVarArgs& bp, BoolVarArgs& bn,
1051
+ int& ip, int& in,
1052
+ IntConLevel icl) const;
1053
+ /// Post propagators for expression
1054
+ GECODE_MINIMODEL_EXPORT
1055
+ BoolVar expr(Home home, IntConLevel icl) const;
1056
+ /// Post propagators for relation
1057
+ GECODE_MINIMODEL_EXPORT
1058
+ void rel(Home home, IntConLevel icl) const;
1059
+ /// Allocate memory from region
1060
+ static void* operator new(size_t s, Region& r);
1061
+ /// No-op (for exceptions)
1062
+ static void operator delete(void*);
1063
+ /// No-op
1064
+ static void operator delete(void*, Region&);
1065
+ };
1066
+ private:
1067
+ /// Pointer to node for expression
1068
+ Node* n;
1069
+ public:
1070
+ /// Default constructor
1071
+ GECODE_MINIMODEL_EXPORT
1072
+ BoolExpr(void);
1073
+ /// Copy constructor
1074
+ BoolExpr(const BoolExpr& e);
1075
+ /// Construct expression for type and subexpresssions
1076
+ GECODE_MINIMODEL_EXPORT
1077
+ BoolExpr(const BoolExpr& l, NodeType t, const BoolExpr& r);
1078
+ /// Construct expression for variable
1079
+ GECODE_MINIMODEL_EXPORT
1080
+ BoolExpr(const BoolVar& x);
1081
+ /// Construct expression for negation
1082
+ GECODE_MINIMODEL_EXPORT
1083
+ BoolExpr(const BoolExpr& e, NodeType t);
1084
+ /// Construct expression for reified linear relation
1085
+ GECODE_MINIMODEL_EXPORT
1086
+ BoolExpr(const LinRel& rl);
1087
+ #ifdef GECODE_HAS_SET_VARS
1088
+ /// Construct expression for reified set relation
1089
+ GECODE_MINIMODEL_EXPORT
1090
+ BoolExpr(const SetRel& rs);
1091
+ /// Construct expression for reified set relation
1092
+ GECODE_MINIMODEL_EXPORT
1093
+ BoolExpr(const SetCmpRel& rs);
1094
+ #endif
1095
+ /// Construct expression for miscellaneous Boolean expression
1096
+ GECODE_MINIMODEL_EXPORT
1097
+ explicit BoolExpr(MiscExpr* m);
1098
+ /// Post propagators for expression
1099
+ BoolVar expr(Home home, IntConLevel icl) const;
1100
+ /// Post propagators for relation
1101
+ void rel(Home home, IntConLevel icl) const;
1102
+ /// Assignment operator
1103
+ GECODE_MINIMODEL_EXPORT
1104
+ const BoolExpr& operator =(const BoolExpr& e);
1105
+ /// Destructor
1106
+ GECODE_MINIMODEL_EXPORT
1107
+ ~BoolExpr(void);
1108
+ };
1109
+
1110
+ /**
1111
+ * \defgroup TaskModelMiniModelBool Boolean expressions
1112
+ *
1113
+ * Boolean expressions can be freely composed of variables with
1114
+ * the usual connectives and reified linear expressions.
1115
+ *
1116
+ * \ingroup TaskModelMiniModel
1117
+ */
1118
+
1119
+ //@{
1120
+ /// Negated Boolean expression
1121
+ GECODE_MINIMODEL_EXPORT BoolExpr
1122
+ operator !(const BoolExpr&);
1123
+ /// Conjunction of Boolean expressions
1124
+ GECODE_MINIMODEL_EXPORT BoolExpr
1125
+ operator &&(const BoolExpr&, const BoolExpr&);
1126
+ /// Disjunction of Boolean expressions
1127
+ GECODE_MINIMODEL_EXPORT BoolExpr
1128
+ operator ||(const BoolExpr&, const BoolExpr&);
1129
+ /// Exclusive-or of Boolean expressions
1130
+ GECODE_MINIMODEL_EXPORT BoolExpr
1131
+ operator ^(const BoolExpr&, const BoolExpr&);
1132
+
1133
+ /// Non-equivalence of Boolean expressions
1134
+ GECODE_MINIMODEL_EXPORT BoolExpr
1135
+ operator !=(const BoolExpr&, const BoolExpr&);
1136
+ /// Equivalence of Boolean expressions
1137
+ GECODE_MINIMODEL_EXPORT BoolExpr
1138
+ operator ==(const BoolExpr&, const BoolExpr&);
1139
+ /// Implication of Boolean expressions
1140
+ GECODE_MINIMODEL_EXPORT BoolExpr
1141
+ operator >>(const BoolExpr&, const BoolExpr&);
1142
+ /// Reverse implication of Boolean expressions
1143
+ GECODE_MINIMODEL_EXPORT BoolExpr
1144
+ operator <<(const BoolExpr&, const BoolExpr&);
1145
+
1146
+ //@}
1147
+
1148
+ /**
1149
+ * \defgroup TaskModelMiniModelPost Posting of expressions and relations
1150
+ *
1151
+ * \ingroup TaskModelMiniModel
1152
+ */
1153
+ //@{
1154
+ /// Post linear expression and return its value
1155
+ GECODE_MINIMODEL_EXPORT IntVar
1156
+ expr(Home home, const LinExpr& e, IntConLevel icl=ICL_DEF);
1157
+ #ifdef GECODE_HAS_SET_VARS
1158
+ /// Post set expression and return its value
1159
+ GECODE_MINIMODEL_EXPORT SetVar
1160
+ expr(Home home, const SetExpr& e);
1161
+ #endif
1162
+ /// Post Boolean expression and return its value
1163
+ GECODE_MINIMODEL_EXPORT BoolVar
1164
+ expr(Home home, const BoolExpr& e, IntConLevel icl=ICL_DEF);
1165
+ /// Post Boolean relation
1166
+ GECODE_MINIMODEL_EXPORT void
1167
+ rel(Home home, const BoolExpr& e, IntConLevel icl=ICL_DEF);
1168
+ //@}
1169
+
1170
+ }
1171
+
1172
+ #include <gecode/minimodel/lin-expr.hpp>
1173
+ #include <gecode/minimodel/lin-rel.hpp>
1174
+ #include <gecode/minimodel/bool-expr.hpp>
1175
+ #include <gecode/minimodel/set-expr.hpp>
1176
+ #include <gecode/minimodel/set-rel.hpp>
1177
+
1178
+ namespace Gecode {
1179
+
1180
+ namespace MiniModel {
1181
+ class ExpInfo;
1182
+ }
1183
+
1184
+ /**
1185
+ * \brief Regular expressions over integer values
1186
+ *
1187
+ * \ingroup TaskModelMiniModel
1188
+ */
1189
+ class GECODE_MINIMODEL_EXPORT REG {
1190
+ friend class MiniModel::ExpInfo;
1191
+ private:
1192
+ /// Implementation of the actual expression tree
1193
+ class Exp;
1194
+ /// The expression tree
1195
+ Exp* e;
1196
+ /// Initialize with given expression tree \a
1197
+ REG(Exp* e);
1198
+ public:
1199
+ /// Initialize as empty sequence (epsilon)
1200
+ REG(void);
1201
+ /// Initialize as single integer \a s
1202
+ REG(int s);
1203
+ /**
1204
+ * \brief Initialize as alternative of integers
1205
+ *
1206
+ * Throws an exception of type MiniModel::TooFewArguments if \a x
1207
+ * is empty.
1208
+ */
1209
+ REG(const IntArgs& x);
1210
+
1211
+ /// Initialize from regular expression \a r
1212
+ REG(const REG& r);
1213
+ /// Assign to regular expression \a r
1214
+ const REG& operator =(const REG& r);
1215
+
1216
+ /// Return expression for: this expression followed by \a r
1217
+ REG operator +(const REG& r);
1218
+ /// This expression is followed by \a r
1219
+ REG& operator +=(const REG& r);
1220
+ /// Return expression for: this expression or \a r
1221
+ REG operator |(const REG& r);
1222
+ /// This expression or \a r
1223
+ REG& operator |=(const REG& r);
1224
+ /// Return expression for: this expression arbitrarily often (Kleene star)
1225
+ REG operator *(void);
1226
+ /// Return expression for: this expression at least once
1227
+ REG operator +(void);
1228
+ /// Return expression for: this expression at least \a n and at most \a m times
1229
+ REG operator ()(unsigned int n, unsigned int m);
1230
+ /// Return expression for: this expression at least \a n times
1231
+ REG operator ()(unsigned int n);
1232
+ /// Print expression
1233
+ template<class Char, class Traits>
1234
+ std::basic_ostream<Char,Traits>&
1235
+ print(std::basic_ostream<Char,Traits>& os) const;
1236
+ /// Return DFA for regular expression
1237
+ operator DFA(void);
1238
+ /// Destructor
1239
+ ~REG(void);
1240
+ };
1241
+
1242
+ /** \relates Gecode::REG
1243
+ * Print regular expression \a r
1244
+ */
1245
+ template<class Char, class Traits>
1246
+ std::basic_ostream<Char,Traits>&
1247
+ operator <<(std::basic_ostream<Char,Traits>& os, const REG& r);
1248
+
1249
+
1250
+ /**
1251
+ * \defgroup TaskModelMiniModelArith Arithmetic functions
1252
+ *
1253
+ * \ingroup TaskModelMiniModel
1254
+ */
1255
+ //@{
1256
+ /// \brief Return expression for \f$|e|\f$
1257
+ GECODE_MINIMODEL_EXPORT LinExpr
1258
+ abs(const LinExpr& e);
1259
+ /// \brief Return expression for \f$\min(x,y)\f$
1260
+ GECODE_MINIMODEL_EXPORT LinExpr
1261
+ min(const LinExpr& x, const LinExpr& y);
1262
+ /// \brief Return expression for \f$\min(x)\f$
1263
+ GECODE_MINIMODEL_EXPORT LinExpr
1264
+ min(const IntVarArgs& x);
1265
+ /// \brief Return expression for \f$\max(x,y)\f$
1266
+ GECODE_MINIMODEL_EXPORT LinExpr
1267
+ max(const LinExpr& x, const LinExpr& y);
1268
+ /// \brief Return expression for \f$\max(x)\f$
1269
+ GECODE_MINIMODEL_EXPORT LinExpr
1270
+ max(const IntVarArgs& x);
1271
+ /// \brief Return expression for \f$x\cdot y\f$
1272
+ GECODE_MINIMODEL_EXPORT LinExpr
1273
+ operator *(const LinExpr& x, const LinExpr& y);
1274
+ /// \brief Return expression for \f$x\ \mathrm{div}\ y\f$
1275
+ GECODE_MINIMODEL_EXPORT LinExpr
1276
+ operator /(const LinExpr& x, const LinExpr& y);
1277
+ /// \brief Return expression for \f$x\ \mathrm{mod}\ y\f$
1278
+ GECODE_MINIMODEL_EXPORT LinExpr
1279
+ operator %(const LinExpr& x, const LinExpr& y);
1280
+ /// \brief Return expression for \f$x^2\f$
1281
+ GECODE_MINIMODEL_EXPORT LinExpr
1282
+ sqr(const LinExpr& x);
1283
+ /// \brief Return expression for \f$\lfloor\sqrt{x}\rfloor\f$
1284
+ GECODE_MINIMODEL_EXPORT LinExpr
1285
+ sqrt(const LinExpr& x);
1286
+ /// \brief Return expression for \f$x[y]\f$
1287
+ GECODE_MINIMODEL_EXPORT LinExpr
1288
+ element(const IntVarArgs& x, const LinExpr& y);
1289
+ /// \brief Return expression for \f$x[y]\f$
1290
+ GECODE_MINIMODEL_EXPORT BoolExpr
1291
+ element(const BoolVarArgs& x, const LinExpr& y);
1292
+ /// \brief Return expression for \f$x[y]\f$
1293
+ GECODE_MINIMODEL_EXPORT LinExpr
1294
+ element(const IntArgs& x, const LinExpr& y);
1295
+ //@}
1296
+
1297
+ /**
1298
+ * \defgroup TaskModelMiniModelChannel Channel functions
1299
+ *
1300
+ * \ingroup TaskModelMiniModel
1301
+ */
1302
+ //@{
1303
+ /// Return Boolean variable equal to \f$x\f$
1304
+ inline BoolVar
1305
+ channel(Home home, IntVar x,
1306
+ IntConLevel icl=ICL_DEF) {
1307
+ (void) icl;
1308
+ BoolVar b(home,0,1); channel(home,b,x);
1309
+ return b;
1310
+ }
1311
+ /// Return integer variable equal to \f$b\f$
1312
+ inline IntVar
1313
+ channel(Home home, BoolVar b,
1314
+ IntConLevel icl=ICL_DEF) {
1315
+ (void) icl;
1316
+ IntVar x(home,0,1); channel(home,b,x);
1317
+ return x;
1318
+ }
1319
+ #ifdef GECODE_HAS_SET_VARS
1320
+ /// Return set variable equal to \f$\{x_0,\dots,x_{n-1}\}\f$
1321
+ inline SetVar
1322
+ channel(Home home, const IntVarArgs& x, IntConLevel icl=ICL_DEF) {
1323
+ (void) icl;
1324
+ SetVar s(home,IntSet::empty,Set::Limits::min,Set::Limits::max);
1325
+ rel(home,SOT_UNION,x,s);
1326
+ nvalues(home,x,IRT_EQ,expr(home,cardinality(s)));
1327
+ return s;
1328
+ }
1329
+ #endif
1330
+ //@}
1331
+
1332
+ }
1333
+
1334
+ namespace Gecode {
1335
+
1336
+ /**
1337
+ * \defgroup TaskModelMiniModelIntAlias Aliases for integer constraints
1338
+ *
1339
+ * Contains definitions of common constraints which have different
1340
+ * names in Gecode.
1341
+ *
1342
+ * \ingroup TaskModelMiniModel
1343
+ */
1344
+
1345
+ //@{
1346
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\leq m\f$
1347
+ *
1348
+ * Supports domain consistent propagation only.
1349
+ */
1350
+ inline void
1351
+ atmost(Home home, const IntVarArgs& x, int n, int m,
1352
+ IntConLevel icl=ICL_DEF) {
1353
+ count(home,x,n,IRT_LQ,m,icl);
1354
+ }
1355
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\leq m\f$
1356
+ *
1357
+ * Supports domain consistent propagation only.
1358
+ */
1359
+ inline void
1360
+ atmost(Home home, const IntVarArgs& x, IntVar y, int m,
1361
+ IntConLevel icl=ICL_DEF) {
1362
+ count(home,x,y,IRT_LQ,m,icl);
1363
+ }
1364
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\leq m\f$
1365
+ *
1366
+ * Supports domain consistent propagation only.
1367
+ *
1368
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1369
+ * \a x and \a y are of different size.
1370
+ */
1371
+ inline void
1372
+ atmost(Home home, const IntVarArgs& x, const IntArgs& y, int m,
1373
+ IntConLevel icl=ICL_DEF) {
1374
+ count(home,x,y,IRT_LQ,m,icl);
1375
+ }
1376
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\leq z\f$
1377
+ *
1378
+ * Supports domain consistent propagation only.
1379
+ */
1380
+ inline void
1381
+ atmost(Home home, const IntVarArgs& x, int n, IntVar z,
1382
+ IntConLevel icl=ICL_DEF) {
1383
+ count(home,x,n,IRT_LQ,z,icl);
1384
+ }
1385
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\leq z\f$
1386
+ *
1387
+ * Supports domain consistent propagation only.
1388
+ */
1389
+ inline void
1390
+ atmost(Home home, const IntVarArgs& x, IntVar y, IntVar z,
1391
+ IntConLevel icl=ICL_DEF) {
1392
+ count(home,x,y,IRT_LQ,z,icl);
1393
+ }
1394
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\leq z\f$
1395
+ *
1396
+ * Supports domain consistent propagation only.
1397
+ *
1398
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1399
+ * \a x and \a y are of different size.
1400
+ */
1401
+ inline void
1402
+ atmost(Home home, const IntVarArgs& x, const IntArgs& y, IntVar z,
1403
+ IntConLevel icl=ICL_DEF) {
1404
+ count(home,x,y,IRT_LQ,z,icl);
1405
+ }
1406
+
1407
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\geq m\f$
1408
+ *
1409
+ * Supports domain consistent propagation only.
1410
+ */
1411
+ inline void
1412
+ atleast(Home home, const IntVarArgs& x, int n, int m,
1413
+ IntConLevel icl=ICL_DEF) {
1414
+ count(home,x,n,IRT_GQ,m,icl);
1415
+ }
1416
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\geq m\f$
1417
+ *
1418
+ * Supports domain consistent propagation only.
1419
+ */
1420
+ inline void
1421
+ atleast(Home home, const IntVarArgs& x, IntVar y, int m,
1422
+ IntConLevel icl=ICL_DEF) {
1423
+ count(home,x,y,IRT_GQ,m,icl);
1424
+ }
1425
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\geq m\f$
1426
+ *
1427
+ * Supports domain consistent propagation only.
1428
+ *
1429
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1430
+ * \a x and \a y are of different size.
1431
+ */
1432
+ inline void
1433
+ atleast(Home home, const IntVarArgs& x, const IntArgs& y, int m,
1434
+ IntConLevel icl=ICL_DEF) {
1435
+ count(home,x,y,IRT_GQ,m,icl);
1436
+ }
1437
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\geq z\f$
1438
+ *
1439
+ * Supports domain consistent propagation only.
1440
+ */
1441
+ inline void
1442
+ atleast(Home home, const IntVarArgs& x, int n, IntVar z,
1443
+ IntConLevel icl=ICL_DEF) {
1444
+ count(home,x,n,IRT_GQ,z,icl);
1445
+ }
1446
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\geq z\f$
1447
+ *
1448
+ * Supports domain consistent propagation only.
1449
+ */
1450
+ inline void
1451
+ atleast(Home home, const IntVarArgs& x, IntVar y, IntVar z,
1452
+ IntConLevel icl=ICL_DEF) {
1453
+ count(home,x,y,IRT_GQ,z,icl);
1454
+ }
1455
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\geq z\f$
1456
+ *
1457
+ * Supports domain consistent propagation only.
1458
+ *
1459
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1460
+ * \a x and \a y are of different size.
1461
+ */
1462
+ inline void
1463
+ atleast(Home home, const IntVarArgs& x, const IntArgs& y, IntVar z,
1464
+ IntConLevel icl=ICL_DEF) {
1465
+ count(home,x,y,IRT_GQ,z,icl);
1466
+ }
1467
+
1468
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}=m\f$
1469
+ *
1470
+ * Supports domain consistent propagation only.
1471
+ */
1472
+ inline void
1473
+ exactly(Home home, const IntVarArgs& x, int n, int m,
1474
+ IntConLevel icl=ICL_DEF) {
1475
+ count(home,x,n,IRT_EQ,m,icl);
1476
+ }
1477
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}=m\f$
1478
+ *
1479
+ * Supports domain consistent propagation only.
1480
+ */
1481
+ inline void
1482
+ exactly(Home home, const IntVarArgs& x, IntVar y, int m,
1483
+ IntConLevel icl=ICL_DEF) {
1484
+ count(home,x,y,IRT_EQ,m,icl);
1485
+ }
1486
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}=m\f$
1487
+ *
1488
+ * Supports domain consistent propagation only.
1489
+ *
1490
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1491
+ * \a x and \a y are of different size.
1492
+ */
1493
+ inline void
1494
+ exactly(Home home, const IntVarArgs& x, const IntArgs& y, int m,
1495
+ IntConLevel icl=ICL_DEF) {
1496
+ count(home,x,y,IRT_EQ,m,icl);
1497
+ }
1498
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}=z\f$
1499
+ *
1500
+ * Supports domain consistent propagation only.
1501
+ */
1502
+ inline void
1503
+ exactly(Home home, const IntVarArgs& x, int n, IntVar z,
1504
+ IntConLevel icl=ICL_DEF) {
1505
+ count(home,x,n,IRT_EQ,z,icl);
1506
+ }
1507
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}=z\f$
1508
+ *
1509
+ * Supports domain consistent propagation only.
1510
+ */
1511
+ inline void
1512
+ exactly(Home home, const IntVarArgs& x, IntVar y, IntVar z,
1513
+ IntConLevel icl=ICL_DEF) {
1514
+ count(home,x,y,IRT_EQ,z,icl);
1515
+ }
1516
+ /** \brief Post constraint \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}=z\f$
1517
+ *
1518
+ * Supports domain consistent propagation only.
1519
+ *
1520
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1521
+ * \a x and \a y are of different size.
1522
+ */
1523
+ inline void
1524
+ exactly(Home home, const IntVarArgs& x, const IntArgs& y, IntVar z,
1525
+ IntConLevel icl=ICL_DEF) {
1526
+ count(home,x,y,IRT_EQ,z,icl);
1527
+ }
1528
+ /** \brief Post lexical order between \a x and \a y.
1529
+ */
1530
+ inline void
1531
+ lex(Home home, const IntVarArgs& x, IntRelType r, const IntVarArgs& y,
1532
+ IntConLevel icl=ICL_DEF) {
1533
+ rel(home,x,r,y,icl);
1534
+ }
1535
+ /** \brief Post lexical order between \a x and \a y.
1536
+ */
1537
+ inline void
1538
+ lex(Home home, const BoolVarArgs& x, IntRelType r, const BoolVarArgs& y,
1539
+ IntConLevel icl=ICL_DEF) {
1540
+ rel(home,x,r,y,icl);
1541
+ }
1542
+ /** \brief Post constraint \f$\{x_0,\dots,x_{n-1}\}=y\f$
1543
+ */
1544
+ inline void
1545
+ values(Home home, const IntVarArgs& x, IntSet y,
1546
+ IntConLevel icl=ICL_DEF) {
1547
+ dom(home,x,y,icl);
1548
+ nvalues(home,x,IRT_EQ,y.size(),icl);
1549
+ }
1550
+
1551
+ //@}
1552
+
1553
+ #ifdef GECODE_HAS_SET_VARS
1554
+ /**
1555
+ * \defgroup TaskModelMiniModelSetAlias Aliases for set constraints
1556
+ *
1557
+ * Contains definitions of common constraints which have different
1558
+ * names in Gecode.
1559
+ *
1560
+ * \ingroup TaskModelMiniModel
1561
+ */
1562
+
1563
+ //@{
1564
+ /** \brief Post constraint \f$\{x_0,\dots,x_{n-1}\}=y\f$
1565
+ *
1566
+ * In addition to constraining \a y to the union of the \a x, this
1567
+ * also posts an nvalue constraint for additional cardinality propagation.
1568
+ */
1569
+ inline void
1570
+ channel(Home home, const IntVarArgs& x, SetVar y) {
1571
+ rel(home,SOT_UNION,x,y);
1572
+ nvalues(home,x,IRT_EQ,expr(home,cardinality(y)));
1573
+ }
1574
+
1575
+ /** \brief Post constraint \f$\bigcup_{i\in y}\{x_i\}=z\f$
1576
+ */
1577
+ inline void
1578
+ range(Home home, const IntVarArgs& x, SetVar y, SetVar z) {
1579
+ element(home,SOT_UNION,x,y,z);
1580
+ }
1581
+
1582
+ /** \brief Post constraint \f$\bigcup_{i\in z}\{j\ |\ x_j=i\}=z\f$
1583
+ *
1584
+ * Note that this creates one temporary set variable for each element
1585
+ * in the upper bound of \a z, so make sure that the bound is tight.
1586
+ */
1587
+ inline void
1588
+ roots(Home home, const IntVarArgs& x, SetVar y, SetVar z) {
1589
+ SetVarArgs xiv(home,z.lubMax()+1,IntSet::empty,0,x.size()-1);
1590
+ channel(home,x,xiv);
1591
+ element(home,SOT_UNION,xiv,z,y);
1592
+ }
1593
+
1594
+ //@}
1595
+ #endif
1596
+
1597
+ }
1598
+
1599
+ namespace Gecode {
1600
+
1601
+ template<class> class Matrix;
1602
+
1603
+ /** \brief A slice of a matrix.
1604
+ *
1605
+ * This class represents a slice of the matrix. It is used to get
1606
+ * context-dependent behaviour. The slice will be automatically
1607
+ * converted to an ArgsType Args-array or to a Matrix<ArgsType>
1608
+ * depending on the context where it is used.
1609
+ */
1610
+ template<class A>
1611
+ class Slice {
1612
+ public:
1613
+ /// The type of the Args-array type for ValueType values
1614
+ typedef typename ArrayTraits<A>::ArgsType ArgsType;
1615
+ private:
1616
+ ArgsType _r; ///< The elements of the slice
1617
+ unsigned int _fc, ///< From column
1618
+ _tc, ///< To column
1619
+ _fr, ///< From row
1620
+ _tr; ///< To row
1621
+ public:
1622
+ /// Construct slice
1623
+ Slice(const Matrix<A>& a, int fc, int tc, int fr, int tr);
1624
+ /** \brief Reverses the contents of the slice, and returns a
1625
+ * reference to it.
1626
+ */
1627
+ Slice& reverse(void);
1628
+ /// Cast to array type
1629
+ operator ArgsType(void);
1630
+ /// Cast to matrix type
1631
+ operator Matrix<ArgsType>(void);
1632
+
1633
+ /// Cast to array type
1634
+ operator const ArgsType(void) const;
1635
+ /// Cast to matrix type
1636
+ operator const Matrix<ArgsType>(void) const;
1637
+ };
1638
+
1639
+ /// Concatenate \a x and \a y
1640
+ template<class A>
1641
+ typename Slice<A>::ArgsType
1642
+ operator+(const Slice<A>& x, const Slice<A>& y);
1643
+
1644
+ /// Concatenate \a x and \a y
1645
+ template<class A>
1646
+ typename Slice<A>::ArgsType
1647
+ operator+(const Slice<A>& x, const typename ArrayTraits<A>::ArgsType& y);
1648
+
1649
+ /// Concatenate \a x and \a y
1650
+ template<class A>
1651
+ typename Slice<A>::ArgsType
1652
+ operator+(const typename ArrayTraits<A>::ArgsType& x, const Slice<A>& y);
1653
+
1654
+ /// Concatenate \a x and \a y
1655
+ template<class A>
1656
+ typename Slice<A>::ArgsType
1657
+ operator+(const Slice<A>& x, const typename ArrayTraits<A>::ValueType& y);
1658
+
1659
+ /// Concatenate \a x and \a y
1660
+ template<class A>
1661
+ typename Slice<A>::ArgsType
1662
+ operator+(const typename ArrayTraits<A>::ValueType& x, const Slice<A>& y);
1663
+
1664
+ /** \brief Matrix-interface for arrays
1665
+ *
1666
+ * This class allows for wrapping some array and accessing it as a
1667
+ * matrix.
1668
+ *
1669
+ * \note This is a light-weight wrapper, and is not intended for
1670
+ * storing variables directly instead of in an array.
1671
+ *
1672
+ * \ingroup TaskModelMiniModel
1673
+ */
1674
+ template<class A>
1675
+ class Matrix {
1676
+ public:
1677
+ /// The type of elements of this array
1678
+ typedef typename ArrayTraits<A>::ValueType ValueType;
1679
+ /// The type of the Args-array type for ValueType values
1680
+ typedef typename ArrayTraits<A>::ArgsType ArgsType;
1681
+
1682
+ private:
1683
+ /// The type of storage for this array
1684
+ typedef typename ArrayTraits<A>::StorageType StorageType;
1685
+ StorageType _a; ///< The array wrapped
1686
+ int _w; ///< The width of the matrix
1687
+ int _h; ///< The height of the matrix
1688
+
1689
+ public:
1690
+ /** \brief Basic constructor
1691
+ *
1692
+ * Constructs a Matrix from the array \a a, using \a w and \a h as
1693
+ * the width and height of the matrix.
1694
+ *
1695
+ * The elements in the wrapped array \a a are accessed in
1696
+ * row-major order.
1697
+ *
1698
+ * \exception MiniModel::ArgumentSizeMismatch Raised if the
1699
+ * parameters \a w and \a h doesn't match the size
1700
+ * of the array \a a.
1701
+ */
1702
+ Matrix(A a, int w, int h);
1703
+
1704
+ /** \brief Basic constructor
1705
+ *
1706
+ * Constructs a square Matrix from the array \a a, using \a n as
1707
+ * the length of the sides.
1708
+ *
1709
+ * The elements in the wrapped array \a a are accessed in
1710
+ * row-major order.
1711
+ *
1712
+ * \exception MiniModel::ArgumentSizeMismatch Raised if the
1713
+ * parameter \a n doesn't match the size
1714
+ * of the array \a a.
1715
+ */
1716
+ Matrix(A a, int n);
1717
+
1718
+ /// Return the width of the matrix
1719
+ int width(void) const;
1720
+ /// Return the height of the matrix
1721
+ int height(void) const;
1722
+ /// Return an Args-array of the contents of the matrix
1723
+ ArgsType const get_array(void) const;
1724
+
1725
+ /** \brief Access element (\a c, \a r) of the matrix
1726
+ *
1727
+ * \exception MiniModel::ArgumentOutOfRange Raised if \a c or \a r
1728
+ * are out of range.
1729
+ */
1730
+ ValueType& operator ()(int c, int r);
1731
+
1732
+ /** \brief Access element (\a c, \a r) of the matrix
1733
+ *
1734
+ * \exception MiniModel::ArgumentOutOfRange Raised if \a c or \a r
1735
+ * are out of range.
1736
+ */
1737
+ const ValueType& operator ()(int c, int r) const;
1738
+
1739
+ /** \brief Access slice of the matrix
1740
+ *
1741
+ * This function allows accessing a slice of the matrix, located at
1742
+ * columns \f$[fc,tc)\f$ and rows \f$[fr,tr)\f$. The result of this
1743
+ * function is an object that can be converted into either a
1744
+ * Matrix<ArgsType> or into ArgsType.
1745
+ *
1746
+ * For further information, see Slice.
1747
+ */
1748
+ Slice<A> slice(int fc, int tc, int fr, int tr) const;
1749
+
1750
+ /// Access row \a r.
1751
+ Slice<A> row(int r) const;
1752
+
1753
+ /// Access column \a c.
1754
+ Slice<A> col(int c) const;
1755
+ };
1756
+
1757
+ /** \relates Gecode::Matrix
1758
+ * Print matrix \a m
1759
+ */
1760
+ template<class Char, class Traits, class A>
1761
+ std::basic_ostream<Char,Traits>&
1762
+ operator <<(std::basic_ostream<Char,Traits>& os, const Matrix<A>& m);
1763
+
1764
+ /** \relates Gecode::Matrix
1765
+ * Print slice \a s
1766
+ */
1767
+ template<class Char, class Traits, class A>
1768
+ std::basic_ostream<Char,Traits>&
1769
+ operator <<(std::basic_ostream<Char,Traits>& os, const Slice<A>& s);
1770
+
1771
+ /** \brief Element constraint for matrix
1772
+ *
1773
+ * Here, \a x and \a y are the coordinates and \a z is the value
1774
+ * at position \a m(x,y).
1775
+ * \relates Gecode::Matrix
1776
+ */
1777
+ void element(Home home, const Matrix<IntArgs>& m, IntVar x, IntVar y,
1778
+ IntVar z, IntConLevel icl=ICL_DEF);
1779
+ /** \brief Element constraint for matrix
1780
+ *
1781
+ * Here, \a x and \a y are the coordinates and \a z is the value
1782
+ * at position \a m(x,y).
1783
+ * \relates Gecode::Matrix
1784
+ */
1785
+ void element(Home home, const Matrix<IntArgs>& m, IntVar x, IntVar y,
1786
+ BoolVar z, IntConLevel icl=ICL_DEF);
1787
+ /** \brief Element constraint for matrix
1788
+ *
1789
+ * Here, \a x and \a y are the coordinates and \a z is the value
1790
+ * at position \a m(x,y).
1791
+ * \relates Gecode::Matrix
1792
+ */
1793
+ void element(Home home, const Matrix<IntVarArgs>& m, IntVar x, IntVar y,
1794
+ IntVar z, IntConLevel icl=ICL_DEF);
1795
+ /** \brief Element constraint for matrix
1796
+ *
1797
+ * Here, \a x and \a y are the coordinates and \a z is the value
1798
+ * at position \a m(x,y).
1799
+ * \relates Gecode::Matrix
1800
+ */
1801
+ void element(Home home, const Matrix<BoolVarArgs>& m, IntVar x, IntVar y,
1802
+ BoolVar z, IntConLevel icl=ICL_DEF);
1803
+ #ifdef GECODE_HAS_SET_VARS
1804
+ /** \brief Element constraint for matrix
1805
+ *
1806
+ * Here, \a x and \a y are the coordinates and \a z is the value
1807
+ * at position \a m(x,y).
1808
+ * \relates Gecode::Matrix
1809
+ */
1810
+ void element(Home home, const Matrix<IntSetArgs>& m, IntVar x, IntVar y,
1811
+ SetVar z);
1812
+ /** \brief Element constraint for matrix
1813
+ *
1814
+ * Here, \a x and \a y are the coordinates and \a z is the value
1815
+ * at position \a m(x,y).
1816
+ * \relates Gecode::Matrix
1817
+ */
1818
+ void element(Home home, const Matrix<SetVarArgs>& m, IntVar x, IntVar y,
1819
+ SetVar z);
1820
+ #endif
1821
+
1822
+ }
1823
+
1824
+ #include <gecode/minimodel/matrix.hpp>
1825
+
1826
+ namespace Gecode {
1827
+
1828
+ /**
1829
+ * \defgroup TaskModelMiniModelOptimize Support for cost-based optimization
1830
+ *
1831
+ * Provides for minimizing or maximizing the cost value as defined by
1832
+ * a cost-member function of a space.
1833
+ *
1834
+ * \ingroup TaskModelMiniModel
1835
+ */
1836
+ //@{
1837
+ namespace MiniModel {
1838
+
1839
+ /// Baseclass for cost-based optimization
1840
+ template<IntRelType irt>
1841
+ class OptimizeSpace : public Space {
1842
+ public:
1843
+ /// Default constructor
1844
+ OptimizeSpace(void);
1845
+ /// Constructor for cloning
1846
+ OptimizeSpace(bool share, OptimizeSpace& s);
1847
+ /// Member function constraining according to cost
1848
+ virtual void constrain(const Space& best);
1849
+ /// Return variable with current cost
1850
+ virtual IntVar cost(void) const = 0;
1851
+ };
1852
+
1853
+ }
1854
+
1855
+ /// Class for minimizing cost
1856
+ typedef MiniModel::OptimizeSpace<IRT_LE> MinimizeSpace;
1857
+
1858
+ /// Class for maximizing cost
1859
+ typedef MiniModel::OptimizeSpace<IRT_GR> MaximizeSpace;
1860
+ //@}
1861
+
1862
+ }
1863
+
1864
+ #include <gecode/minimodel/optimize.hpp>
1865
+
1866
+ #endif
1867
+
1868
+ // IFDEF: GECODE_HAS_INT_VARS
1869
+ // STATISTICS: minimodel-any
1870
+