dep-selector-libgecode 1.0.0.alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,114 @@
1
+ /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Main authors:
4
+ * Guido Tack <tack@gecode.org>
5
+ *
6
+ * Copyright:
7
+ * Guido Tack, 2006
8
+ *
9
+ * Last modified:
10
+ * $Date: 2009-01-21 21:36:29 +1100 (Wed, 21 Jan 2009) $ by $Author: schulte $
11
+ * $Revision: 8083 $
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
+ namespace Gecode { namespace Gist {
39
+
40
+ const unsigned char zoomToFitIcon[] = {
41
+ 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
42
+ 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, 0x06, 0x00, 0x00, 0x00, 0xAD, 0xE2, 0x75,
43
+ 0xAB, 0x00, 0x00, 0x01, 0xCB, 0x69, 0x43, 0x43, 0x50, 0x49, 0x43, 0x43, 0x20, 0x50, 0x72, 0x6F,
44
+ 0x66, 0x69, 0x6C, 0x65, 0x00, 0x00, 0x78, 0x9C, 0x8D, 0x91, 0x4D, 0x6B, 0x13, 0x51, 0x18, 0x85,
45
+ 0x9F, 0x3B, 0x41, 0x5A, 0x50, 0x82, 0xE0, 0x54, 0x24, 0xAB, 0x59, 0x48, 0xAC, 0x10, 0x65, 0x9A,
46
+ 0x04, 0x9A, 0x8D, 0x30, 0x6D, 0x92, 0x5A, 0x61, 0x84, 0x21, 0x8D, 0xE6, 0x63, 0x97, 0xCE, 0x8C,
47
+ 0x49, 0x21, 0x33, 0xBD, 0x4E, 0xA6, 0x1F, 0x82, 0x8B, 0xFA, 0x27, 0x74, 0x21, 0x82, 0x2B, 0x49,
48
+ 0x41, 0x14, 0x57, 0x15, 0x74, 0x51, 0x70, 0xE3, 0xC6, 0x85, 0x08, 0x1A, 0xFC, 0x0B, 0xBA, 0x2B,
49
+ 0x74, 0x23, 0x65, 0x5C, 0x5C, 0x43, 0x16, 0x1A, 0xEC, 0x81, 0x0B, 0xCF, 0x7B, 0xB8, 0xF0, 0xDE,
50
+ 0x7B, 0x0E, 0xA4, 0x4A, 0x1D, 0x29, 0xFB, 0x1A, 0x10, 0x84, 0x71, 0x54, 0xBB, 0xB9, 0x6C, 0x34,
51
+ 0x5B, 0x6D, 0x63, 0x66, 0x84, 0x46, 0x86, 0x34, 0x59, 0x2E, 0x75, 0xDC, 0x81, 0x5C, 0x72, 0x1C,
52
+ 0x9B, 0xA9, 0x3A, 0xFE, 0x8A, 0x00, 0xF8, 0x72, 0xAD, 0x23, 0x65, 0x7F, 0xFA, 0xBD, 0x7F, 0x2A,
53
+ 0x1D, 0x35, 0x5B, 0x6D, 0x10, 0x39, 0x40, 0xEF, 0x2A, 0xB6, 0x00, 0x7D, 0x5D, 0x71, 0x1D, 0xD0,
54
+ 0x77, 0x62, 0x19, 0x83, 0xE8, 0x01, 0xBA, 0xDB, 0xEB, 0x78, 0x20, 0x1E, 0x02, 0xB9, 0xA8, 0x5E,
55
+ 0x2B, 0x83, 0x18, 0x02, 0xE9, 0xAE, 0xE2, 0xB7, 0x40, 0x7A, 0x5D, 0xF1, 0x47, 0x20, 0xBD, 0xED,
56
+ 0x76, 0x63, 0x10, 0x23, 0xC0, 0x0C, 0xBD, 0x8D, 0x10, 0xB4, 0x59, 0xA0, 0xE4, 0xF9, 0x03, 0x17,
57
+ 0x34, 0x0B, 0xE8, 0x79, 0x03, 0x37, 0x00, 0x6D, 0x08, 0x2C, 0x07, 0xC1, 0xA6, 0x07, 0xDA, 0x4F,
58
+ 0x60, 0xDE, 0x95, 0x51, 0x0C, 0x29, 0x1D, 0xB8, 0xDC, 0x6C, 0xB5, 0x0D, 0xF5, 0xE4, 0xA7, 0x3F,
59
+ 0xE0, 0x76, 0x06, 0x44, 0x71, 0xE2, 0x15, 0x5E, 0xC3, 0xB3, 0x1A, 0xCC, 0xDD, 0x9F, 0x78, 0x57,
60
+ 0x6E, 0xC0, 0xDC, 0x3E, 0xBC, 0x7F, 0x34, 0xF1, 0x8E, 0x46, 0x08, 0x40, 0x5C, 0x9C, 0x1D, 0xDC,
61
+ 0x2B, 0xE4, 0x01, 0x10, 0x67, 0x0F, 0xE0, 0xCC, 0xE3, 0x24, 0x39, 0x6A, 0xC0, 0xCC, 0x55, 0x38,
62
+ 0xF9, 0x96, 0x24, 0xBF, 0x0E, 0x92, 0xE4, 0xE4, 0x05, 0xA4, 0xBE, 0xC3, 0xE1, 0xB1, 0xBB, 0x15,
63
+ 0x6D, 0xFF, 0xC9, 0x4B, 0x88, 0x4F, 0xF0, 0xBF, 0x59, 0xFD, 0x59, 0xCD, 0xF0, 0x39, 0x1E, 0xD3,
64
+ 0x34, 0x56, 0xB9, 0x00, 0x60, 0xC2, 0xFE, 0x1E, 0xD4, 0x2D, 0x28, 0xEE, 0xC1, 0xAB, 0x43, 0xC8,
65
+ 0x3E, 0x81, 0x0B, 0xEF, 0xC0, 0xB1, 0xA0, 0x6E, 0xA1, 0x15, 0x0A, 0xE3, 0xA3, 0x32, 0x54, 0x3D,
66
+ 0x56, 0xAA, 0xB6, 0x9D, 0x2F, 0x9A, 0x8B, 0x8D, 0x15, 0x67, 0xB5, 0x7C, 0xDA, 0xF6, 0x4F, 0xA9,
67
+ 0xA0, 0xBF, 0x35, 0xDE, 0xA3, 0x01, 0xE7, 0xFC, 0xF0, 0xCE, 0x1A, 0x90, 0x01, 0xE6, 0x3D, 0xBF,
68
+ 0x52, 0x1D, 0x33, 0x15, 0xAA, 0xD8, 0xD8, 0xE4, 0x29, 0x62, 0xB2, 0x48, 0x83, 0x15, 0x1C, 0x56,
69
+ 0x29, 0x83, 0xEA, 0x15, 0xE0, 0xFC, 0x4B, 0x78, 0x9E, 0x5D, 0xB8, 0xBB, 0xB0, 0xF6, 0xE1, 0xCD,
70
+ 0xF0, 0xAF, 0x5D, 0xB1, 0xBF, 0x1B, 0x03, 0x94, 0x37, 0xE5, 0x83, 0x68, 0xA3, 0xDB, 0x8B, 0x8D,
71
+ 0x25, 0x29, 0xFB, 0x7E, 0xCE, 0xB8, 0x15, 0xBA, 0xD7, 0x73, 0x46, 0xDE, 0x34, 0x4B, 0xFC, 0x06,
72
+ 0xAB, 0xAD, 0x81, 0x02, 0xA4, 0x57, 0xD6, 0x2F, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73,
73
+ 0x00, 0x00, 0x0B, 0x13, 0x00, 0x00, 0x0B, 0x13, 0x01, 0x00, 0x9A, 0x9C, 0x18, 0x00, 0x00, 0x02,
74
+ 0x34, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8D, 0xAD, 0x95, 0xBF, 0x6B, 0x13, 0x61, 0x18, 0xC7, 0x3F,
75
+ 0x97, 0x1F, 0xD7, 0x6B, 0xD3, 0x4B, 0xC8, 0x2D, 0x0D, 0x11, 0xDC, 0x82, 0x52, 0x11, 0x4C, 0x20,
76
+ 0x50, 0xC4, 0x21, 0x93, 0x88, 0x45, 0x02, 0xD2, 0xA5, 0x9B, 0xFD, 0x03, 0xEA, 0x92, 0x4D, 0x91,
77
+ 0x84, 0x4E, 0x11, 0x1C, 0xDC, 0x45, 0x24, 0x08, 0x07, 0x86, 0x2E, 0x1D, 0x0A, 0x05, 0x21, 0xB9,
78
+ 0xCB, 0x16, 0x43, 0xC0, 0x12, 0xA4, 0x01, 0xC5, 0xA1, 0x83, 0x15, 0xEC, 0x50, 0xDA, 0x98, 0x5E,
79
+ 0x93, 0xAB, 0xAF, 0x43, 0x72, 0x18, 0x9A, 0xB4, 0xBD, 0xD4, 0x7C, 0xE1, 0xE0, 0xDE, 0x87, 0x87,
80
+ 0xEF, 0xE7, 0x79, 0xDE, 0xE7, 0x78, 0xCE, 0xCB, 0xB0, 0xA6, 0x80, 0x9B, 0xC0, 0x03, 0xE0, 0x51,
81
+ 0xFF, 0xFC, 0x07, 0x38, 0x18, 0x91, 0x7B, 0xA1, 0xA4, 0x33, 0xE7, 0x85, 0x40, 0x20, 0xB0, 0x1E,
82
+ 0x0A, 0x85, 0x82, 0xC9, 0x64, 0x92, 0x58, 0x2C, 0xE6, 0x2F, 0x95, 0x4A, 0x56, 0xB3, 0xD9, 0x94,
83
+ 0x81, 0xB7, 0xED, 0x76, 0x3B, 0x03, 0x74, 0xC7, 0x85, 0x30, 0x3B, 0x3B, 0xFB, 0x7C, 0x7A, 0x7A,
84
+ 0xDA, 0xDA, 0xDC, 0xDC, 0x14, 0x67, 0x65, 0x59, 0x96, 0x48, 0xA7, 0xD3, 0xBF, 0x23, 0x91, 0x48,
85
+ 0x0D, 0xF0, 0x8D, 0xEB, 0xBD, 0x00, 0x88, 0xBD, 0xBD, 0xBD, 0x21, 0xE3, 0x41, 0x2D, 0x2E, 0x2E,
86
+ 0xDA, 0xAA, 0xAA, 0x9A, 0x6E, 0x4D, 0x7D, 0xC0, 0x54, 0x20, 0x10, 0x58, 0x2F, 0x16, 0x8B, 0x44,
87
+ 0x22, 0x11, 0xD6, 0xD6, 0xD6, 0x10, 0x42, 0x00, 0x90, 0xCD, 0x66, 0x31, 0x4D, 0x13, 0xC3, 0x30,
88
+ 0x90, 0x24, 0x89, 0x8D, 0x8D, 0x0D, 0x6F, 0x3C, 0x1E, 0x8F, 0x37, 0x1A, 0x8D, 0x15, 0xE0, 0x9D,
89
+ 0x1B, 0xC0, 0xAD, 0x68, 0x34, 0x7A, 0xE8, 0x54, 0x97, 0xCB, 0xE5, 0x46, 0x56, 0xED, 0xC4, 0x75,
90
+ 0x5D, 0x17, 0x9A, 0xA6, 0x6D, 0xB9, 0x31, 0xF6, 0x00, 0x89, 0x64, 0x32, 0xE9, 0xB6, 0x53, 0x12,
91
+ 0x89, 0x04, 0xDD, 0x6E, 0x37, 0xEE, 0x36, 0xFF, 0x59, 0x26, 0x93, 0xB1, 0x2E, 0xBC, 0xEC, 0x01,
92
+ 0xB5, 0x5A, 0x2D, 0xE1, 0xF3, 0xF9, 0x2C, 0xC0, 0xEB, 0xA6, 0xF2, 0x4F, 0xE5, 0x72, 0xF9, 0xD8,
93
+ 0x09, 0x98, 0xE6, 0xE8, 0x79, 0x39, 0xF1, 0x5A, 0xAD, 0x46, 0x30, 0x18, 0xFC, 0x0A, 0x9C, 0xBA,
94
+ 0x31, 0xFF, 0xD6, 0x6C, 0x36, 0xE5, 0x93, 0x93, 0x13, 0x00, 0x0C, 0xC3, 0x18, 0x99, 0xE8, 0xC4,
95
+ 0xAB, 0xD5, 0x6A, 0xB7, 0xDD, 0x6E, 0x7F, 0xBE, 0xCC, 0x18, 0x7A, 0xAD, 0x1D, 0xC8, 0xB2, 0x3C,
96
+ 0x57, 0xAF, 0xD7, 0x6F, 0x2F, 0x2F, 0x2F, 0xFB, 0x2B, 0x95, 0x0A, 0x86, 0x61, 0x60, 0x9A, 0x26,
97
+ 0xA9, 0x54, 0x0A, 0xD3, 0x34, 0x29, 0x14, 0x0A, 0x48, 0x92, 0x44, 0x38, 0x1C, 0x66, 0x69, 0x69,
98
+ 0xC9, 0x6B, 0xDB, 0xF6, 0x43, 0xE0, 0xC8, 0x0D, 0x00, 0x40, 0x51, 0x14, 0xE5, 0xD7, 0xEA, 0xEA,
99
+ 0x6A, 0xD7, 0xB6, 0xED, 0x91, 0x77, 0xBD, 0xBD, 0xBD, 0x2D, 0x66, 0x66, 0x66, 0x3A, 0x92, 0x24,
100
+ 0xED, 0x03, 0x1F, 0x81, 0x39, 0xB7, 0xE6, 0x00, 0xAA, 0x2C, 0xCB, 0xBB, 0xF3, 0xF3, 0xF3, 0x87,
101
+ 0xBA, 0xAE, 0x8B, 0x9D, 0x9D, 0x1D, 0xD1, 0x6A, 0xB5, 0x44, 0xB9, 0x5C, 0x16, 0xF9, 0x7C, 0xBE,
102
+ 0xA3, 0x28, 0xCA, 0x91, 0xC7, 0xE3, 0x79, 0x0D, 0x88, 0xFE, 0xF3, 0x1D, 0xB8, 0x31, 0x0E, 0x00,
103
+ 0x60, 0x45, 0xD3, 0xB4, 0x2D, 0x55, 0x55, 0x7F, 0xFA, 0xFD, 0x7E, 0x4B, 0xD3, 0xB4, 0x86, 0xA2,
104
+ 0x28, 0xEF, 0x81, 0x6B, 0xF4, 0x66, 0xF4, 0x66, 0x00, 0xB0, 0x0F, 0xDC, 0x1D, 0x17, 0xE0, 0xE8,
105
+ 0xBC, 0xCF, 0xED, 0xC5, 0x00, 0xE0, 0x18, 0x78, 0x7C, 0x55, 0xC0, 0x79, 0x7A, 0x02, 0x74, 0xFA,
106
+ 0x80, 0x53, 0xE0, 0xE9, 0xA4, 0x01, 0xF7, 0x81, 0x43, 0xFE, 0x75, 0xF1, 0x8A, 0xE1, 0x35, 0xFE,
107
+ 0x5F, 0xBA, 0x03, 0xFC, 0x18, 0x00, 0x7C, 0xA0, 0xF7, 0x83, 0x99, 0x98, 0xAE, 0x03, 0x5F, 0x06,
108
+ 0x00, 0x2F, 0xA1, 0x37, 0xFD, 0x49, 0x68, 0x17, 0xB8, 0x07, 0x38, 0xBB, 0xE3, 0xD2, 0xD5, 0x70,
109
+ 0x55, 0xC5, 0x9C, 0x97, 0xBF, 0x3E, 0xCA, 0x4D, 0x0B, 0x4A, 0x32, 0x37, 0x13, 0x00, 0x00, 0x00,
110
+ 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
111
+ };
112
+ }}
113
+
114
+ // STATISTICS: gist-any
@@ -0,0 +1,3477 @@
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
+ *
7
+ * Contributing authors:
8
+ * Mikael Lagerkvist <lagerkvist@gecode.org>
9
+ * David Rijsman <David.Rijsman@quintiq.com>
10
+ *
11
+ * Copyright:
12
+ * David Rijsman, 2009
13
+ * Mikael Lagerkvist, 2006
14
+ * Christian Schulte, 2002
15
+ * Guido Tack, 2004
16
+ *
17
+ * Last modified:
18
+ * $Date: 2012-02-22 16:04:20 +1100 (Wed, 22 Feb 2012) $ by $Author: tack $
19
+ * $Revision: 12537 $
20
+ *
21
+ * This file is part of Gecode, the generic constraint
22
+ * development environment:
23
+ * http://www.gecode.org
24
+ *
25
+ * Permission is hereby granted, free of charge, to any person obtaining
26
+ * a copy of this software and associated documentation files (the
27
+ * "Software"), to deal in the Software without restriction, including
28
+ * without limitation the rights to use, copy, modify, merge, publish,
29
+ * distribute, sublicense, and/or sell copies of the Software, and to
30
+ * permit persons to whom the Software is furnished to do so, subject to
31
+ * the following conditions:
32
+ *
33
+ * The above copyright notice and this permission notice shall be
34
+ * included in all copies or substantial portions of the Software.
35
+ *
36
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
38
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
40
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
41
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
42
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43
+ *
44
+ */
45
+
46
+ #ifndef __GECODE_INT_HH__
47
+ #define __GECODE_INT_HH__
48
+
49
+ #include <climits>
50
+ #include <cfloat>
51
+ #include <iostream>
52
+
53
+ #include <vector>
54
+
55
+ #include <gecode/kernel.hh>
56
+ #include <gecode/iter.hh>
57
+
58
+ /*
59
+ * Configure linking
60
+ *
61
+ */
62
+ #if !defined(GECODE_STATIC_LIBS) && \
63
+ (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
64
+
65
+ #ifdef GECODE_BUILD_INT
66
+ #define GECODE_INT_EXPORT __declspec( dllexport )
67
+ #else
68
+ #define GECODE_INT_EXPORT __declspec( dllimport )
69
+ #endif
70
+
71
+ #else
72
+
73
+ #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
74
+ #define GECODE_INT_EXPORT __attribute__ ((visibility("default")))
75
+ #else
76
+ #define GECODE_INT_EXPORT
77
+ #endif
78
+
79
+ #endif
80
+
81
+ // Configure auto-linking
82
+ #ifndef GECODE_BUILD_INT
83
+ #define GECODE_LIBRARY_NAME "Int"
84
+ #include <gecode/support/auto-link.hpp>
85
+ #endif
86
+
87
+ /**
88
+ * \namespace Gecode::Int
89
+ * \brief Finite domain integers
90
+ *
91
+ * The Gecode::Int namespace contains all functionality required
92
+ * to program propagators and branchers for finite domain integers.
93
+ * In addition, all propagators and branchers for finite domain
94
+ * integers provided by %Gecode are contained as nested namespaces.
95
+ *
96
+ */
97
+
98
+ #include <gecode/int/exception.hpp>
99
+
100
+ namespace Gecode { namespace Int {
101
+
102
+ /**
103
+ * \brief Numerical limits for integer variables
104
+ *
105
+ * The integer limits are chosen such changing the sign is always possible
106
+ * without overflow.
107
+ * \ingroup TaskModelIntVars
108
+ */
109
+ namespace Limits {
110
+ /// Largest allowed integer value
111
+ const int max = INT_MAX - 1;
112
+ /// Smallest allowed integer value
113
+ const int min = -max;
114
+ /// Infinity
115
+ const int infinity = max + 1;
116
+ /// Return whether integer \a n is in range
117
+ bool valid(int n);
118
+ /// Return whether double \a n is in range
119
+ bool valid(double n);
120
+ /// Check whether integer \a n is in range, otherwise throw out of limits with information \a l
121
+ void check(int n, const char* l);
122
+ /// Check whether double \a n is in integer range, otherwise throw out of limits exception with information \a l
123
+ void check(double n, const char* l);
124
+ /// Check whether integer \a n is in range and strictly positive, otherwise throw out of limits with information \a l
125
+ void positive(int n, const char* l);
126
+ /// Check whether double \a n is in integer range and strictly postive, otherwise throw out of limits exception with information \a l
127
+ void positive(double n, const char* l);
128
+ /// Check whether integer \a n is in range and nonnegative, otherwise throw out of limits with information \a l
129
+ void nonnegative(int n, const char* l);
130
+ /// Check whether double \a n is in integer range and nonnegative, otherwise throw out of limits exception with information \a l
131
+ void nonnegative(double n, const char* l);
132
+ /// Largest double that can exactly be represented
133
+ const double double_max = 9007199254740991.0;
134
+ /// Smallest double that can exactly be represented
135
+ const double double_min = -9007199254740991.0;
136
+ /// Check whether double \a n is in exactly representable range, otherwise throw out of limits with information \a l
137
+ void double_check(double n, const char* l);
138
+ /// Infinity value for doubles
139
+ const double double_infinity = DBL_MAX;
140
+ }
141
+
142
+ }}
143
+
144
+ #include <gecode/int/limits.hpp>
145
+
146
+ namespace Gecode {
147
+
148
+ class IntSetRanges;
149
+
150
+ template<class I> class IntSetInit;
151
+
152
+ /**
153
+ * \brief Integer sets
154
+ *
155
+ * Integer sets are the means to specify arbitrary sets
156
+ * of integers to be used as domains for integer variables.
157
+ * \ingroup TaskModelIntVars TaskModelSetVars
158
+ */
159
+ class IntSet : public SharedHandle {
160
+ friend class IntSetRanges;
161
+ template<class I> friend class IntSetInit;
162
+ private:
163
+ /// %Range (intervals) of integers
164
+ class Range {
165
+ public:
166
+ int min, max;
167
+ };
168
+ class IntSetObject : public SharedHandle::Object {
169
+ public:
170
+ /// Size of set
171
+ unsigned int size;
172
+ /// Number of ranges
173
+ int n;
174
+ /// Array of ranges
175
+ Range* r;
176
+ /// Allocate object with \a m elements
177
+ GECODE_INT_EXPORT static IntSetObject* allocate(int m);
178
+ /// Return copy of object
179
+ GECODE_INT_EXPORT SharedHandle::Object* copy(void) const;
180
+ /// Check whether \a n is included in the set
181
+ GECODE_INT_EXPORT bool in(int n) const;
182
+ /// Delete object
183
+ GECODE_INT_EXPORT virtual ~IntSetObject(void);
184
+ };
185
+ /// Sort ranges according to increasing minimum
186
+ class MinInc;
187
+ /// Normalize the first \a n elements of \a r
188
+ GECODE_INT_EXPORT void normalize(Range* r, int n);
189
+ /// Initialize as range with minimum \a n and maximum \a m
190
+ GECODE_INT_EXPORT void init(int n, int m);
191
+ /// Initialize with \a n integers from array \a r
192
+ GECODE_INT_EXPORT void init(const int r[], int n);
193
+ /// Initialize with \a n ranges from array \a r
194
+ GECODE_INT_EXPORT void init(const int r[][2], int n);
195
+ public:
196
+ /// \name Constructors and initialization
197
+ //@{
198
+ /// Initialize as empty set
199
+ IntSet(void);
200
+ /** \brief Initialize as range with minimum \a n and maximum \a m
201
+ *
202
+ * Note that the set is empty if \a n is larger than \a m
203
+ */
204
+ IntSet(int n, int m);
205
+ /// Initialize with \a n integers from array \a r
206
+ IntSet(const int r[], int n);
207
+ /** \brief Initialize with \a n ranges from array \a r
208
+ *
209
+ * For position \a i in the array \a r, the minimum is \a r[\a i][0]
210
+ * and the maximum is \a r[\a i][1].
211
+ */
212
+ IntSet(const int r[][2], int n);
213
+ /// Initialize with range iterator \a i
214
+ template<class I>
215
+ explicit IntSet(I& i);
216
+ //@}
217
+
218
+ /// \name Range access
219
+ //@{
220
+ /// Return number of ranges of the specification
221
+ int ranges(void) const;
222
+ /// Return minimum of range at position \a i
223
+ int min(int i) const;
224
+ /// Return maximum of range at position \a i
225
+ int max(int i) const;
226
+ /// Return width of range at position \a i
227
+ unsigned int width(int i) const;
228
+ //@}
229
+
230
+ /// \name Entire set access
231
+ //@{
232
+ /// Return whether \a n is included in the set
233
+ bool in(int n) const;
234
+ /// Return size (cardinality) of set
235
+ unsigned int size(void) const;
236
+ /// Return width of set (distance between maximum and minimum)
237
+ unsigned int width(void) const;
238
+ /// Return minimum of entire set
239
+ int min(void) const;
240
+ /// Return maximum of entire set
241
+ int max(void) const;
242
+ //@}
243
+
244
+ /// \name Predefined value
245
+ //@{
246
+ /// Empty set
247
+ GECODE_INT_EXPORT static const IntSet empty;
248
+ //@}
249
+ };
250
+
251
+ /**
252
+ * \brief Range iterator for integer sets
253
+ *
254
+ * \ingroup TaskModelIntVars TaskModelSetVars
255
+ */
256
+ class IntSetRanges {
257
+ private:
258
+ /// Current range
259
+ const IntSet::Range* i;
260
+ /// End range
261
+ const IntSet::Range* e;
262
+ public:
263
+ /// \name Constructors and initialization
264
+ //@{
265
+ /// Default constructor
266
+ IntSetRanges(void);
267
+ /// Initialize with ranges for set \a s
268
+ IntSetRanges(const IntSet& s);
269
+ /// Initialize with ranges for set \a s
270
+ void init(const IntSet& s);
271
+ //@}
272
+
273
+ /// \name Iteration control
274
+ //@{
275
+ /// Test whether iterator is still at a range or done
276
+ bool operator ()(void) const;
277
+ /// Move iterator to next range (if possible)
278
+ void operator ++(void);
279
+ //@}
280
+
281
+ /// \name Range access
282
+ //@{
283
+ /// Return smallest value of range
284
+ int min(void) const;
285
+ /// Return largest value of range
286
+ int max(void) const;
287
+ /// Return width of range (distance between minimum and maximum)
288
+ unsigned int width(void) const;
289
+ //@}
290
+ };
291
+
292
+ /**
293
+ * \brief Value iterator for integer sets
294
+ *
295
+ * \ingroup TaskModelIntVars TaskModelSetVars
296
+ */
297
+ class IntSetValues : public Iter::Ranges::ToValues<IntSetRanges> {
298
+ public:
299
+ /// \name Constructors and initialization
300
+ //@{
301
+ /// Default constructor
302
+ IntSetValues(void);
303
+ /// Initialize with values for \a s
304
+ IntSetValues(const IntSet& s);
305
+ /// Initialize with values for \a s
306
+ void init(const IntSet& s);
307
+ //@}
308
+ };
309
+
310
+ /**
311
+ * \brief Print integer set \a s
312
+ * \relates Gecode::IntSet
313
+ */
314
+ template<class Char, class Traits>
315
+ std::basic_ostream<Char,Traits>&
316
+ operator <<(std::basic_ostream<Char,Traits>& os, const IntSet& s);
317
+
318
+ }
319
+
320
+ #include <gecode/int/int-set-1.hpp>
321
+
322
+ #include <gecode/int/var-imp.hpp>
323
+
324
+ namespace Gecode {
325
+
326
+ namespace Int {
327
+ class IntView;
328
+ }
329
+
330
+ /**
331
+ * \brief Integer variables
332
+ *
333
+ * \ingroup TaskModelIntVars
334
+ */
335
+ class IntVar : public VarImpVar<Int::IntVarImp> {
336
+ friend class IntVarArray;
337
+ friend class IntVarArgs;
338
+ private:
339
+ using VarImpVar<Int::IntVarImp>::x;
340
+ /**
341
+ * \brief Initialize variable with range domain
342
+ *
343
+ * The variable is created with a domain ranging from \a min
344
+ * to \a max. No exceptions are thrown.
345
+ */
346
+ void _init(Space& home, int min, int max);
347
+ /**
348
+ * \brief Initialize variable with arbitrary domain
349
+ *
350
+ * The variable is created with a domain described by \a d.
351
+ * No exceptions are thrown.
352
+ */
353
+ void _init(Space& home, const IntSet& d);
354
+ public:
355
+ /// \name Constructors and initialization
356
+ //@{
357
+ /// Default constructor
358
+ IntVar(void);
359
+ /// Initialize from integer variable \a y
360
+ IntVar(const IntVar& y);
361
+ /// Initialize from integer view \a y
362
+ IntVar(const Int::IntView& y);
363
+ /**
364
+ * \brief Initialize variable with range domain
365
+ *
366
+ * The variable is created with a domain ranging from \a min
367
+ * to \a max. The following exceptions might be thrown:
368
+ * - If \a min is greater than \a max, an exception of type
369
+ * Gecode::Int::VariableEmptyDomain is thrown.
370
+ * - If \a min or \a max exceed the limits for integers as defined
371
+ * in Gecode::Int::Limits, an exception of type
372
+ * Gecode::Int::OutOfLimits is thrown.
373
+ */
374
+ GECODE_INT_EXPORT IntVar(Space& home, int min, int max);
375
+ /**
376
+ * \brief Initialize variable with arbitrary domain
377
+ *
378
+ * The variable is created with a domain described by \a d.
379
+ * The following exceptions might be thrown:
380
+ * - If \a d is empty, an exception of type
381
+ * Gecode::Int::VariableEmptyDomain is thrown.
382
+ * - If \a d contains values that exceed the limits for integers
383
+ * as defined in Gecode::Int::Limits, an exception of type
384
+ * Gecode::Int::OutOfLimits is thrown.
385
+ */
386
+ GECODE_INT_EXPORT IntVar(Space& home, const IntSet& d);
387
+ //@}
388
+
389
+ /// \name Value access
390
+ //@{
391
+ /// Return minimum of domain
392
+ int min(void) const;
393
+ /// Return maximum of domain
394
+ int max(void) const;
395
+ /// Return median of domain (greatest element not greater than the median)
396
+ int med(void) const;
397
+ /**
398
+ * \brief Return assigned value
399
+ *
400
+ * Throws an exception of type Int::ValOfUnassignedVar if variable
401
+ * is not yet assigned.
402
+ *
403
+ */
404
+ int val(void) const;
405
+
406
+ /// Return size (cardinality) of domain
407
+ unsigned int size(void) const;
408
+ /// Return width of domain (distance between maximum and minimum)
409
+ unsigned int width(void) const;
410
+ /// Return regret of domain minimum (distance to next larger value)
411
+ unsigned int regret_min(void) const;
412
+ /// Return regret of domain maximum (distance to next smaller value)
413
+ unsigned int regret_max(void) const;
414
+ //@}
415
+
416
+ /// \name Domain tests
417
+ //@{
418
+ /// Test whether domain is a range
419
+ bool range(void) const;
420
+ /// Test whether \a n is contained in domain
421
+ bool in(int n) const;
422
+ //@}
423
+ };
424
+
425
+ /**
426
+ * \brief Print integer variable \a x
427
+ * \relates Gecode::IntVar
428
+ */
429
+ template<class Char, class Traits>
430
+ std::basic_ostream<Char,Traits>&
431
+ operator <<(std::basic_ostream<Char,Traits>& os, const IntVar& x);
432
+
433
+ /**
434
+ * \brief %Range iterator for integer variables
435
+ * \ingroup TaskModelIntVars
436
+ */
437
+ class IntVarRanges : public Int::IntVarImpFwd {
438
+ public:
439
+ /// \name Constructors and initialization
440
+ //@{
441
+ /// Default constructor
442
+ IntVarRanges(void);
443
+ /// Initialize with ranges for integer variable \a x
444
+ IntVarRanges(const IntVar& x);
445
+ /// Initialize with ranges for integer variable \a x
446
+ void init(const IntVar& x);
447
+ //@}
448
+ };
449
+
450
+ /**
451
+ * \brief Value iterator for integer variables
452
+ * \ingroup TaskModelIntVars
453
+ */
454
+ class IntVarValues : public Iter::Ranges::ToValues<IntVarRanges> {
455
+ public:
456
+ /// \name Constructors and initialization
457
+ //@{
458
+ /// Default constructor
459
+ IntVarValues(void);
460
+ /// Initialize with values for \a x
461
+ IntVarValues(const IntVar& x);
462
+ /// Initialize with values \a x
463
+ void init(const IntVar& x);
464
+ //@}
465
+ };
466
+
467
+ namespace Int {
468
+ class BoolView;
469
+ }
470
+
471
+ /**
472
+ * \brief Boolean integer variables
473
+ *
474
+ * \ingroup TaskModelIntVars
475
+ */
476
+ class BoolVar : public VarImpVar<Int::BoolVarImp> {
477
+ friend class BoolVarArray;
478
+ friend class BoolVarArgs;
479
+ private:
480
+ using VarImpVar<Int::BoolVarImp>::x;
481
+ /**
482
+ * \brief Initialize Boolean variable with range domain
483
+ *
484
+ * The variable is created with a domain ranging from \a min
485
+ * to \a max. No exceptions are thrown.
486
+ */
487
+ void _init(Space& home, int min, int max);
488
+ public:
489
+ /// \name Constructors and initialization
490
+ //@{
491
+ /// Default constructor
492
+ BoolVar(void);
493
+ /// Initialize from Boolean variable \a y
494
+ BoolVar(const BoolVar& y);
495
+ /// Initialize from Boolean view \a y
496
+ BoolVar(const Int::BoolView& y);
497
+ /**
498
+ * \brief Initialize Boolean variable with range domain
499
+ *
500
+ * The variable is created with a domain ranging from \a min
501
+ * to \a max. The following exceptions might be thrown:
502
+ * - If \a min is greater than \a max, an exception of type
503
+ * Gecode::Int::VariableEmptyDomain is thrown.
504
+ * - If \a min is less than 0 or \a max is greater than 1,
505
+ * an exception of type
506
+ * Gecode::Int::NotZeroOne is thrown.
507
+ */
508
+ GECODE_INT_EXPORT BoolVar(Space& home, int min, int max);
509
+ //@}
510
+
511
+ /// \name Value access
512
+ //@{
513
+ /// Return minimum of domain
514
+ int min(void) const;
515
+ /// Return maximum of domain
516
+ int max(void) const;
517
+ /// Return median of domain (greatest element not greater than the median)
518
+ int med(void) const;
519
+ /**
520
+ * \brief Return assigned value
521
+ *
522
+ * Throws an exception of type Int::ValOfUnassignedVar if variable
523
+ * is not yet assigned.
524
+ *
525
+ */
526
+ int val(void) const;
527
+
528
+ /// Return size (cardinality) of domain
529
+ unsigned int size(void) const;
530
+ /// Return width of domain (distance between maximum and minimum)
531
+ unsigned int width(void) const;
532
+ /// Return regret of domain minimum (distance to next larger value)
533
+ unsigned int regret_min(void) const;
534
+ /// Return regret of domain maximum (distance to next smaller value)
535
+ unsigned int regret_max(void) const;
536
+ //@}
537
+
538
+ /// \name Domain tests
539
+ //@{
540
+ /// Test whether domain is a range
541
+ bool range(void) const;
542
+ /// Test whether \a n is contained in domain
543
+ bool in(int n) const;
544
+ //@}
545
+
546
+ /// \name Boolean domain tests
547
+ //@{
548
+ /// Test whether domain is zero
549
+ bool zero(void) const;
550
+ /// Test whether domain is one
551
+ bool one(void) const;
552
+ /// Test whether domain is neither zero nor one
553
+ bool none(void) const;
554
+ //@}
555
+ };
556
+
557
+ /**
558
+ * \brief Print Boolean variable \a x
559
+ * \relates Gecode::BoolVar
560
+ */
561
+ template<class Char, class Traits>
562
+ std::basic_ostream<Char,Traits>&
563
+ operator <<(std::basic_ostream<Char,Traits>& os, const BoolVar& x);
564
+
565
+ }
566
+
567
+
568
+ #include <gecode/int/view.hpp>
569
+ #include <gecode/int/propagator.hpp>
570
+
571
+ namespace Gecode {
572
+
573
+ /**
574
+ * \defgroup TaskModelIntArgs Argument arrays
575
+ *
576
+ * Argument arrays are just good enough for passing arguments
577
+ * with automatic memory management.
578
+ * \ingroup TaskModelInt
579
+ */
580
+
581
+ //@{
582
+ /// Passing set arguments
583
+ typedef ArgArray<IntSet> IntSetArgs;
584
+
585
+ }
586
+
587
+ #include <gecode/int/array-traits.hpp>
588
+
589
+ namespace Gecode {
590
+
591
+ /// Passing integer arguments
592
+ class IntArgs : public PrimArgArray<int> {
593
+ public:
594
+ /// \name Constructors and initialization
595
+ //@{
596
+ /// Allocate empty array
597
+ IntArgs(void);
598
+ /// Allocate array with \a n elements
599
+ explicit IntArgs(int n);
600
+ /// Allocate array and copy elements from \a x
601
+ IntArgs(const SharedArray<int>& x);
602
+ /// Allocate array and copy elements from \a x
603
+ IntArgs(const std::vector<int>& x);
604
+ /// Allocate array with \a n elements and initialize with \a e0, ...
605
+ GECODE_INT_EXPORT
606
+ IntArgs(int n, int e0, ...);
607
+ /// Allocate array with \a n elements and initialize with elements from array \a e
608
+ IntArgs(int n, const int* e);
609
+ /// Initialize from primitive argument array \a a (copy elements)
610
+ IntArgs(const PrimArgArray<int>& a);
611
+
612
+ /// Allocate array with \a n elements such that for all \f$0\leq i<n: x_i=\text{start}+i\cdot\text{inc}\f$
613
+ static IntArgs create(int n, int start, int inc=1);
614
+ //@}
615
+ };
616
+
617
+ /// \brief Passing integer variables
618
+ class IntVarArgs : public VarArgArray<IntVar> {
619
+ public:
620
+ /// \name Constructors and initialization
621
+ //@{
622
+ /// Allocate empty array
623
+ IntVarArgs(void) {}
624
+ /// Allocate array with \a n elements
625
+ explicit IntVarArgs(int n) : VarArgArray<IntVar>(n) {}
626
+ /// Initialize from variable argument array \a a (copy elements)
627
+ IntVarArgs(const IntVarArgs& a) : VarArgArray<IntVar>(a) {}
628
+ /// Initialize from variable array \a a (copy elements)
629
+ IntVarArgs(const VarArray<IntVar>& a) : VarArgArray<IntVar>(a) {}
630
+ /**
631
+ * \brief Initialize array with \a n new variables
632
+ *
633
+ * The variables are created with a domain ranging from \a min
634
+ * to \a max. The following execptions might be thrown:
635
+ * - If \a min is greater than \a max, an exception of type
636
+ * Gecode::Int::VariableEmptyDomain is thrown.
637
+ * - If \a min or \a max exceed the limits for integers as defined
638
+ * in Gecode::Int::Limits, an exception of type
639
+ * Gecode::Int::OutOfLimits is thrown.
640
+ */
641
+ GECODE_INT_EXPORT
642
+ IntVarArgs(Space& home, int n, int min, int max);
643
+ /**
644
+ * \brief Initialize array with \a n new variables
645
+ *
646
+ * The variables are created with a domain described by \a s.
647
+ * The following execptions might be thrown:
648
+ * - If \a s is empty, an exception of type
649
+ * Gecode::Int::VariableEmptyDomain is thrown.
650
+ * - If \a s contains values that exceed the limits for integers
651
+ * as defined in Gecode::Int::Limits, an exception of type
652
+ * Gecode::Int::OutOfLimits is thrown.
653
+ */
654
+ GECODE_INT_EXPORT
655
+ IntVarArgs(Space& home, int n, const IntSet& s);
656
+ //@}
657
+ };
658
+ /** \brief Passing Boolean variables
659
+ *
660
+ * We could have used a simple typedef instead, but doxygen cannot
661
+ * resolve some overloading then, leading to unusable documentation for
662
+ * important parts of the library. As long as there is no fix for this,
663
+ * we will keep this workaround.
664
+ *
665
+ */
666
+ class BoolVarArgs : public VarArgArray<BoolVar> {
667
+ public:
668
+ /// \name Constructors and initialization
669
+ //@{
670
+ /// Allocate empty array
671
+ BoolVarArgs(void) {}
672
+ /// Allocate array with \a n elements
673
+ explicit BoolVarArgs(int n) : VarArgArray<BoolVar>(n) {}
674
+ /// Initialize from variable argument array \a a (copy elements)
675
+ BoolVarArgs(const BoolVarArgs& a) : VarArgArray<BoolVar>(a) {}
676
+ /// Initialize from variable array \a a (copy elements)
677
+ BoolVarArgs(const VarArray<BoolVar>& a)
678
+ : VarArgArray<BoolVar>(a) {}
679
+ /**
680
+ * \brief Initialize array with \a n new variables
681
+ *
682
+ * The variables are created with a domain ranging from \a min
683
+ * to \a max. The following execptions might be thrown:
684
+ * - If \a min is greater than \a max, an exception of type
685
+ * Gecode::Int::VariableEmptyDomain is thrown.
686
+ * - If \a min is less than 0 or \a max is greater than 1,
687
+ * an exception of type
688
+ * Gecode::Int::NotZeroOne is thrown.
689
+ */
690
+ GECODE_INT_EXPORT
691
+ BoolVarArgs(Space& home, int n, int min, int max);
692
+ //@}
693
+ };
694
+ //@}
695
+
696
+ /**
697
+ * \defgroup TaskModelIntVarArrays Variable arrays
698
+ *
699
+ * Variable arrays can store variables. They are typically used
700
+ * for storing the variables being part of a solution (script). However,
701
+ * they can also be used for temporary purposes (even though
702
+ * memory is not reclaimed until the space it is created for
703
+ * is deleted).
704
+ * \ingroup TaskModelInt
705
+ */
706
+
707
+ /**
708
+ * \brief Integer variable array
709
+ * \ingroup TaskModelIntVarArrays
710
+ */
711
+ class IntVarArray : public VarArray<IntVar> {
712
+ public:
713
+ /// \name Creation and initialization
714
+ //@{
715
+ /// Default constructor (array of size 0)
716
+ IntVarArray(void);
717
+ /// Allocate array for \a n integer variables (variables are uninitialized)
718
+ IntVarArray(Space& home, int n);
719
+ /// Initialize from integer variable array \a a (share elements)
720
+ IntVarArray(const IntVarArray& a);
721
+ /// Initialize from integer variable argument array \a a (copy elements)
722
+ IntVarArray(Space& home, const IntVarArgs& a);
723
+ /**
724
+ * \brief Initialize array with \a n new variables
725
+ *
726
+ * The variables are created with a domain ranging from \a min
727
+ * to \a max. The following execptions might be thrown:
728
+ * - If \a min is greater than \a max, an exception of type
729
+ * Gecode::Int::VariableEmptyDomain is thrown.
730
+ * - If \a min or \a max exceed the limits for integers as defined
731
+ * in Gecode::Int::Limits, an exception of type
732
+ * Gecode::Int::OutOfLimits is thrown.
733
+ */
734
+ GECODE_INT_EXPORT
735
+ IntVarArray(Space& home, int n, int min, int max);
736
+ /**
737
+ * \brief Initialize array with \a n new variables
738
+ *
739
+ * The variables are created with a domain described by \a s.
740
+ * The following execptions might be thrown:
741
+ * - If \a s is empty, an exception of type
742
+ * Gecode::Int::VariableEmptyDomain is thrown.
743
+ * - If \a s contains values that exceed the limits for integers
744
+ * as defined in Gecode::Int::Limits, an exception of type
745
+ * Gecode::Int::OutOfLimits is thrown.
746
+ */
747
+ GECODE_INT_EXPORT
748
+ IntVarArray(Space& home, int n, const IntSet& s);
749
+ //@}
750
+ };
751
+
752
+ /**
753
+ * \brief Boolean variable array
754
+ * \ingroup TaskModelIntVarArrays
755
+ */
756
+ class BoolVarArray : public VarArray<BoolVar> {
757
+ public:
758
+ /// \name Creation and initialization
759
+ //@{
760
+ /// Default constructor (array of size 0)
761
+ BoolVarArray(void);
762
+ /// Allocate array for \a n Boolean variables (variables are uninitialized)
763
+ BoolVarArray(Space& home, int n);
764
+ /// Initialize from Boolean variable array \a a (share elements)
765
+ BoolVarArray(const BoolVarArray& a);
766
+ /// Initialize from Boolean variable argument array \a a (copy elements)
767
+ BoolVarArray(Space& home, const BoolVarArgs& a);
768
+ /**
769
+ * \brief Initialize array with \a n new variables
770
+ *
771
+ * The variables are created with a domain ranging from \a min
772
+ * to \a max. The following execptions might be thrown:
773
+ * - If \a min is greater than \a max, an exception of type
774
+ * Gecode::Int::VariableEmptyDomain is thrown.
775
+ * - If \a min is less than 0 or \a max is greater than 1,
776
+ * an exception of type
777
+ * Gecode::Int::NotZeroOne is thrown.
778
+ */
779
+ GECODE_INT_EXPORT
780
+ BoolVarArray(Space& home, int n, int min, int max);
781
+ //@}
782
+ };
783
+
784
+ }
785
+
786
+ #include <gecode/int/int-set-2.hpp>
787
+
788
+ #include <gecode/int/array.hpp>
789
+
790
+ namespace Gecode {
791
+
792
+ /**
793
+ * \brief Relation types for integers
794
+ * \ingroup TaskModelInt
795
+ */
796
+ enum IntRelType {
797
+ IRT_EQ, ///< Equality (\f$=\f$)
798
+ IRT_NQ, ///< Disequality (\f$\neq\f$)
799
+ IRT_LQ, ///< Less or equal (\f$\leq\f$)
800
+ IRT_LE, ///< Less (\f$<\f$)
801
+ IRT_GQ, ///< Greater or equal (\f$\geq\f$)
802
+ IRT_GR ///< Greater (\f$>\f$)
803
+ };
804
+
805
+ /**
806
+ * \brief Operation types for Booleans
807
+ * \ingroup TaskModelInt
808
+ */
809
+ enum BoolOpType {
810
+ BOT_AND, ///< Conjunction
811
+ BOT_OR, ///< Disjunction
812
+ BOT_IMP, ///< Implication
813
+ BOT_EQV, ///< Equivalence
814
+ BOT_XOR ///< Exclusive or
815
+ };
816
+
817
+ /**
818
+ * \brief Consistency levels for integer propagators
819
+ *
820
+ * The descriptions are meant to be suggestions. It is not
821
+ * required that a propagator achieves full domain consistency or
822
+ * full bounds consistency. It is more like: which level
823
+ * of consistency comes closest.
824
+ *
825
+ * If in the description of a constraint below no consistency level
826
+ * is mentioned, the propagator for the constraint implements
827
+ * domain consistency.
828
+ * \ingroup TaskModelInt
829
+ */
830
+ enum IntConLevel {
831
+ ICL_VAL, ///< Value propagation or consistency (naive)
832
+ ICL_BND, ///< Bounds propagation or consistency
833
+ ICL_DOM, ///< Domain propagation or consistency
834
+ ICL_DEF ///< The default consistency for a constraint
835
+ };
836
+
837
+ /**
838
+ * \brief Type of task for scheduling constraints
839
+ *
840
+ * \ingroup TaskModelInt
841
+ */
842
+ enum TaskType {
843
+ TT_FIXP, //< Task with fixed processing time
844
+ TT_FIXS, //< Task with fixed start time
845
+ TT_FIXE //< Task with fixed end time
846
+ };
847
+
848
+ /**
849
+ * \brief Argument arrays for passing task type arguments
850
+ *
851
+ * \ingroup TaskModelInt
852
+ */
853
+ typedef PrimArgArray<TaskType> TaskTypeArgs;
854
+
855
+ /// Traits of %TaskTypeArgs
856
+ template<>
857
+ class ArrayTraits<PrimArgArray<TaskType> > {
858
+ public:
859
+ typedef TaskTypeArgs StorageType;
860
+ typedef TaskType ValueType;
861
+ typedef TaskTypeArgs ArgsType;
862
+ };
863
+
864
+
865
+ /**
866
+ * \defgroup TaskModelIntDomain Domain constraints
867
+ * \ingroup TaskModelInt
868
+ *
869
+ */
870
+
871
+ //@{
872
+ /// Propagates \f$x=n\f$
873
+ GECODE_INT_EXPORT void
874
+ dom(Home home, IntVar x, int n,
875
+ IntConLevel icl=ICL_DEF);
876
+ /// Propagates \f$ x_i=n\f$ for all \f$0\leq i<|x|\f$
877
+ GECODE_INT_EXPORT void
878
+ dom(Home home, const IntVarArgs& x, int n,
879
+ IntConLevel icl=ICL_DEF);
880
+
881
+ /// Propagates \f$ l\leq x\leq m\f$
882
+ GECODE_INT_EXPORT void
883
+ dom(Home home, IntVar x, int l, int m,
884
+ IntConLevel icl=ICL_DEF);
885
+ /// Propagates \f$ l\leq x_i\leq m\f$ for all \f$0\leq i<|x|\f$
886
+ GECODE_INT_EXPORT void
887
+ dom(Home home, const IntVarArgs& x, int l, int m,
888
+ IntConLevel icl=ICL_DEF);
889
+
890
+ /// Propagates \f$ x\in s \f$
891
+ GECODE_INT_EXPORT void
892
+ dom(Home home, IntVar x, const IntSet& s,
893
+ IntConLevel icl=ICL_DEF);
894
+ /// Propagates \f$ x_i\in s\f$ for all \f$0\leq i<|x|\f$
895
+ GECODE_INT_EXPORT void
896
+ dom(Home home, const IntVarArgs& x, const IntSet& s,
897
+ IntConLevel icl=ICL_DEF);
898
+
899
+ /// Post domain consistent propagator for \f$ (x=n) \Leftrightarrow b\f$
900
+ GECODE_INT_EXPORT void
901
+ dom(Home home, IntVar x, int n, BoolVar b,
902
+ IntConLevel icl=ICL_DEF);
903
+ /// Post domain consistent propagator for \f$ (l\leq x \leq m) \Leftrightarrow b\f$
904
+ GECODE_INT_EXPORT void
905
+ dom(Home home, IntVar x, int l, int m, BoolVar b,
906
+ IntConLevel icl=ICL_DEF);
907
+ /// Post domain consistent propagator for \f$ (x \in s) \Leftrightarrow b\f$
908
+ GECODE_INT_EXPORT void
909
+ dom(Home home, IntVar x, const IntSet& s, BoolVar b,
910
+ IntConLevel icl=ICL_DEF);
911
+ //@}
912
+
913
+
914
+ /**
915
+ * \defgroup TaskModelIntRelInt Simple relation constraints over integer variables
916
+ * \ingroup TaskModelInt
917
+ */
918
+ /** \brief Post propagator for \f$ x_0 \sim_r x_1\f$
919
+ *
920
+ * Supports both bounds (\a icl = ICL_BND) and
921
+ * domain consistency (\a icl = ICL_DOM, default).
922
+ * \ingroup TaskModelIntRelInt
923
+ */
924
+ GECODE_INT_EXPORT void
925
+ rel(Home home, IntVar x0, IntRelType r, IntVar x1,
926
+ IntConLevel icl=ICL_DEF);
927
+ /** \brief Post propagator for \f$ x_i \sim_r y \f$ for all \f$0\leq i<|x|\f$
928
+ *
929
+ * Supports both bounds (\a icl = ICL_BND) and
930
+ * domain consistency (\a icl = ICL_DOM, default).
931
+ * \ingroup TaskModelIntRelInt
932
+ */
933
+ GECODE_INT_EXPORT void
934
+ rel(Home home, const IntVarArgs& x, IntRelType r, IntVar y,
935
+ IntConLevel icl=ICL_DEF);
936
+ /** \brief Propagates \f$ x \sim_r c\f$
937
+ * \ingroup TaskModelIntRelInt
938
+ */
939
+ GECODE_INT_EXPORT void
940
+ rel(Home home, IntVar x, IntRelType r, int c,
941
+ IntConLevel icl=ICL_DEF);
942
+ /** \brief Propagates \f$ x_i \sim_r c \f$ for all \f$0\leq i<|x|\f$
943
+ * \ingroup TaskModelIntRelInt
944
+ */
945
+ GECODE_INT_EXPORT void
946
+ rel(Home home, const IntVarArgs& x, IntRelType r, int c,
947
+ IntConLevel icl=ICL_DEF);
948
+ /** \brief Post propagator for \f$ (x_0 \sim_r x_1)\Leftrightarrow b\f$
949
+ *
950
+ * Supports both bounds (\a icl = ICL_BND) and
951
+ * domain consistency (\a icl = ICL_DOM, default).
952
+ * \ingroup TaskModelIntRelInt
953
+ */
954
+ GECODE_INT_EXPORT void
955
+ rel(Home home, IntVar x0, IntRelType r, IntVar x1, BoolVar b,
956
+ IntConLevel icl=ICL_DEF);
957
+ /** \brief Post propagator for \f$(x \sim_r c)\Leftrightarrow b\f$
958
+ *
959
+ * Supports both bounds (\a icl = ICL_BND) and
960
+ * domain consistency (\a icl = ICL_DOM, default).
961
+ * \ingroup TaskModelIntRelInt
962
+ */
963
+ GECODE_INT_EXPORT void
964
+ rel(Home home, IntVar x, IntRelType r, int c, BoolVar b,
965
+ IntConLevel icl=ICL_DEF);
966
+ /** \brief Post propagator for relation among elements in \a x.
967
+ *
968
+ * States that the elements of \a x are in the following relation:
969
+ * - if \a r = IRT_LE, \a r = IRT_LQ, \a r = IRT_GR, or \a r = IRT_GQ,
970
+ * then the elements of \a x are ordered with respect to \a r.
971
+ * Supports domain consistency (\a icl = ICL_DOM, default).
972
+ * - if \a r = IRT_EQ, then all elements of \a x must be equal.
973
+ * Supports both bounds (\a icl = ICL_BND) and
974
+ * domain consistency (\a icl = ICL_DOM, default).
975
+ * - if \a r = IRT_NQ, then not all elements of \a x must be equal.
976
+ * Supports domain consistency (\a icl = ICL_DOM, default).
977
+ *
978
+ * \ingroup TaskModelIntRelInt
979
+ */
980
+ GECODE_INT_EXPORT void
981
+ rel(Home home, const IntVarArgs& x, IntRelType r,
982
+ IntConLevel icl=ICL_DEF);
983
+ /** \brief Post propagator for relation between \a x and \a y.
984
+ *
985
+ * Note that for the inequality relations this corresponds to
986
+ * the lexical order between \a x and \a y.
987
+ *
988
+ * Supports both bounds (\a icl = ICL_BND) and
989
+ * domain consistency (\a icl = ICL_DOM, default).
990
+ *
991
+ * Note that the constraint is also defined if \a x and \a y are of
992
+ * different size. That means that if \a x and \a y are of different
993
+ * size, then if \a r = IRT_EQ the constraint is false and if
994
+ * \a r = IRT_NQ the constraint is subsumed.
995
+ * \ingroup TaskModelIntRelInt
996
+ */
997
+ GECODE_INT_EXPORT void
998
+ rel(Home home, const IntVarArgs& x, IntRelType r, const IntVarArgs& y,
999
+ IntConLevel icl=ICL_DEF);
1000
+
1001
+ /**
1002
+ * \defgroup TaskModelIntRelBool Simple relation constraints over Boolean variables
1003
+ * \ingroup TaskModelInt
1004
+ */
1005
+ /** \brief Post domain consistent propagator for \f$ x_0 \sim_r x_1\f$
1006
+ * \ingroup TaskModelIntRelBool
1007
+ */
1008
+ GECODE_INT_EXPORT void
1009
+ rel(Home home, BoolVar x0, IntRelType r, BoolVar x1,
1010
+ IntConLevel icl=ICL_DEF);
1011
+ /** \brief Post domain consistent propagator for \f$(x_0 \sim_r x_1)\Leftrightarrow b\f$
1012
+ * \ingroup TaskModelIntRelBool
1013
+ */
1014
+ GECODE_INT_EXPORT void
1015
+ rel(Home home, BoolVar x0, IntRelType r, BoolVar x1, BoolVar b,
1016
+ IntConLevel icl=ICL_DEF);
1017
+ /** \brief Post doamin consistent propagator for \f$ x_i \sim_r y \f$ for all \f$0\leq i<|x|\f$
1018
+ * \ingroup TaskModelIntRelBool
1019
+ */
1020
+ GECODE_INT_EXPORT void
1021
+ rel(Home home, const BoolVarArgs& x, IntRelType r, BoolVar y,
1022
+ IntConLevel icl=ICL_DEF);
1023
+ /**
1024
+ * \brief Propagates \f$ x \sim_r n\f$
1025
+ *
1026
+ * Throws an exception of type Int::NotZeroOne, if \a n is neither
1027
+ * 0 or 1.
1028
+ * \ingroup TaskModelIntRelBool
1029
+ */
1030
+ GECODE_INT_EXPORT void
1031
+ rel(Home home, BoolVar x, IntRelType r, int n,
1032
+ IntConLevel icl=ICL_DEF);
1033
+ /**
1034
+ * \brief Post domain consistent propagator for \f$(x \sim_r n)\Leftrightarrow b\f$
1035
+ *
1036
+ * Throws an exception of type Int::NotZeroOne, if \a n is neither
1037
+ * 0 or 1.
1038
+ * \ingroup TaskModelIntRelBool
1039
+ */
1040
+ GECODE_INT_EXPORT void
1041
+ rel(Home home, BoolVar x, IntRelType r, int n, BoolVar b,
1042
+ IntConLevel icl=ICL_DEF);
1043
+ /**
1044
+ * \brief Propagates \f$ x_i \sim_r n \f$ for all \f$0\leq i<|x|\f$
1045
+ *
1046
+ * Throws an exception of type Int::NotZeroOne, if \a n is neither
1047
+ * 0 or 1.
1048
+ * \ingroup TaskModelIntRelBool
1049
+ */
1050
+ GECODE_INT_EXPORT void
1051
+ rel(Home home, const BoolVarArgs& x, IntRelType r, int n,
1052
+ IntConLevel icl=ICL_DEF);
1053
+ /** \brief Post domain consistent propagator for relation between \a x and \a y.
1054
+ *
1055
+ * Note that for the inequality relations this corresponds to
1056
+ * the lexical order between \a x and \a y.
1057
+ *
1058
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1059
+ * \a x and \a y are of different size.
1060
+ * \ingroup TaskModelIntRelBool
1061
+ */
1062
+ GECODE_INT_EXPORT void
1063
+ rel(Home home, const BoolVarArgs& x, IntRelType r, const BoolVarArgs& y,
1064
+ IntConLevel icl=ICL_DEF);
1065
+ /** \brief Post domain consistent propagator for relation between elements in \a x.
1066
+ *
1067
+ * States that the elements of \a x are in the following relation:
1068
+ * - if \a r = IRT_LE, \a r = IRT_LQ, \a r = IRT_GR, or \a r = IRT_GQ,
1069
+ * then the elements of \a x are ordered with respect to \a r.
1070
+ * - if \a r = IRT_EQ, then all elements of \a x must be equal.
1071
+ * - if \a r = IRT_NQ, then not all elements of \a x must be equal.
1072
+ *
1073
+ * \ingroup TaskModelIntRelBool
1074
+ */
1075
+ GECODE_INT_EXPORT void
1076
+ rel(Home home, const BoolVarArgs& x, IntRelType r,
1077
+ IntConLevel icl=ICL_DEF);
1078
+ /** \brief Post domain consistent propagator for Boolean operation on \a x0 and \a x1
1079
+ *
1080
+ * Posts propagator for \f$ x_0 \diamond_{\mathit{o}} x_1 = x_2\f$
1081
+ * \ingroup TaskModelIntRelBool
1082
+ */
1083
+ GECODE_INT_EXPORT void
1084
+ rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, BoolVar x2,
1085
+ IntConLevel icl=ICL_DEF);
1086
+ /** \brief Post domain consistent propagator for Boolean operation on \a x0 and \a x1
1087
+ *
1088
+ * Posts propagator for \f$ x_0 \diamond_{\mathit{o}} x_1 = n\f$
1089
+ *
1090
+ * Throws an exception of type Int::NotZeroOne, if \a n is neither
1091
+ * 0 or 1.
1092
+ * \ingroup TaskModelIntRelBool
1093
+ */
1094
+ GECODE_INT_EXPORT void
1095
+ rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, int n,
1096
+ IntConLevel icl=ICL_DEF);
1097
+ /** \brief Post domain consistent propagator for Boolean operation on \a x
1098
+ *
1099
+ * Posts propagator for \f$ x_0 \diamond_{\mathit{o}} \cdots
1100
+ * \diamond_{\mathit{o}} x_{|x|-1}= y\f$
1101
+ *
1102
+ * Throws an exception of type Int::TooFewArguments, if \f$|x|<2\f$
1103
+ * and \a o is BOT_IMP, BOT_EQV, or BOT_XOR.
1104
+ * \ingroup TaskModelIntRelBool
1105
+ */
1106
+ GECODE_INT_EXPORT void
1107
+ rel(Home home, BoolOpType o, const BoolVarArgs& x, BoolVar y,
1108
+ IntConLevel icl=ICL_DEF);
1109
+ /** \brief Post domain consistent propagator for Boolean operation on \a x
1110
+ *
1111
+ * Posts propagator for \f$ x_0 \diamond_{\mathit{o}} \cdots
1112
+ * \diamond_{\mathit{o}} x_{|x|-1}= n\f$
1113
+ *
1114
+ * Throws an exception of type Int::NotZeroOne, if \a n is neither
1115
+ * 0 or 1.
1116
+ *
1117
+ * Throws an exception of type Int::TooFewArguments, if \f$|x|<2\f$
1118
+ * and \a o is BOT_IMP, BOT_EQV, or BOT_XOR.
1119
+ * \ingroup TaskModelIntRelBool
1120
+ */
1121
+ GECODE_INT_EXPORT void
1122
+ rel(Home home, BoolOpType o, const BoolVarArgs& x, int n,
1123
+ IntConLevel icl=ICL_DEF);
1124
+ /** \brief Post domain consistent propagator for Boolean clause with positive variables \a x and negative variables \a y
1125
+ *
1126
+ * Posts propagator for \f$ x_0 \diamond_{\mathit{o}} \cdots
1127
+ * \diamond_{\mathit{o}} x_{|x|-1} \diamond_{\mathit{o}} \neg y_0
1128
+ * \diamond_{\mathit{o}} \cdots \diamond_{\mathit{o}} \neg y_{|y|-1}= z\f$
1129
+ *
1130
+ * Throws an exception of type Int::IllegalOperation, if \a o is different
1131
+ * from BOT_AND or BOT_OR.
1132
+ * \ingroup TaskModelIntRelBool
1133
+ */
1134
+ GECODE_INT_EXPORT void
1135
+ clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
1136
+ BoolVar z, IntConLevel icl=ICL_DEF);
1137
+ /** \brief Post domain consistent propagator for Boolean clause with positive variables \a x and negative variables \a y
1138
+ *
1139
+ * Posts propagator for \f$ x_0 \diamond_{\mathit{o}} \cdots
1140
+ * \diamond_{\mathit{o}} x_{|x|-1} \diamond_{\mathit{o}} \neg y_0
1141
+ * \diamond_{\mathit{o}} \cdots \diamond_{\mathit{o}} \neg y_{|y|-1}= n\f$
1142
+ *
1143
+ * Throws an exception of type Int::NotZeroOne, if \a n is neither
1144
+ * 0 or 1.
1145
+ *
1146
+ * Throws an exception of type Int::IllegalOperation, if \a o is different
1147
+ * from BOT_AND or BOT_OR.
1148
+ * \ingroup TaskModelIntRelBool
1149
+ */
1150
+ GECODE_INT_EXPORT void
1151
+ clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
1152
+ int n, IntConLevel icl=ICL_DEF);
1153
+
1154
+
1155
+ /**
1156
+ * \defgroup TaskModelIntPrecede Value precedence constraints over integer variables
1157
+ * \ingroup TaskModelInt
1158
+ */
1159
+ /** \brief Post propagator that \a s precedes \a t in \a x
1160
+ *
1161
+ * This constraint enforces that \f$x_0\neq t\f$ and
1162
+ * \f$x_j=t \to \bigvee_{0\leq i<j} x_i=s\f$ for \f$0\leq j<|x|\f$.
1163
+ * The propagator is domain consistent.
1164
+ * \ingroup TaskModelIntPrecede
1165
+ */
1166
+ GECODE_INT_EXPORT void
1167
+ precede(Home home, const IntVarArgs& x, int s, int t,
1168
+ IntConLevel=ICL_DEF);
1169
+ /** \brief Post propagator that successive values in \a c precede each other in \a x
1170
+ *
1171
+ * This constraint enforces that \f$x_0\neq c_k\f$ for \f$0\leq k<|c|\f$ and
1172
+ * \f$x_j=c_{k} \to \bigvee_{0\leq i<j} x_i=c_{k-1}\f$ for \f$0\leq j<|x|\f$
1173
+ * and \f$0< k<|c|\f$.
1174
+ * \ingroup TaskModelIntPrecede
1175
+ */
1176
+ GECODE_INT_EXPORT void
1177
+ precede(Home home, const IntVarArgs& x, const IntArgs& c,
1178
+ IntConLevel=ICL_DEF);
1179
+
1180
+
1181
+ /**
1182
+ * \defgroup TaskModelIntMember Membership constraints
1183
+ * \ingroup TaskModelInt
1184
+ */
1185
+ //@{
1186
+ /// Post domain consistent propagator for \f$y\in \{x_0,\ldots,x_{|x|-1}\}\f$
1187
+ GECODE_INT_EXPORT void
1188
+ member(Home home, const IntVarArgs& x, IntVar y,
1189
+ IntConLevel icl=ICL_DEF);
1190
+ /// Post domain consistent propagator for \f$y\in \{x_0,\ldots,x_{|x|-1}\}\f$
1191
+ GECODE_INT_EXPORT void
1192
+ member(Home home, const BoolVarArgs& x, BoolVar y,
1193
+ IntConLevel icl=ICL_DEF);
1194
+ /// Post domain consistent propagator for \f$\left(y\in \{x_0,\ldots,x_{|x|-1}\}\right)\Leftrightarrow b\f$
1195
+ GECODE_INT_EXPORT void
1196
+ member(Home home, const IntVarArgs& x, IntVar y, BoolVar b,
1197
+ IntConLevel icl=ICL_DEF);
1198
+ /// Post domain consistent propagator for \f$\left(y\in \{x_0,\ldots,x_{|x|-1}\}\right)\Leftrightarrow b\f$
1199
+ GECODE_INT_EXPORT void
1200
+ member(Home home, const BoolVarArgs& x, BoolVar y, BoolVar b,
1201
+ IntConLevel icl=ICL_DEF);
1202
+ //@}
1203
+
1204
+
1205
+ /**
1206
+ * \defgroup TaskModelIntElement Element constraints
1207
+ * \ingroup TaskModelInt
1208
+ */
1209
+
1210
+ //@{
1211
+ /// Arrays of integers that can be shared among several element constraints
1212
+ typedef SharedArray<int> IntSharedArray;
1213
+ /** \brief Post domain consistent propagator for \f$ n_{x_0}=x_1\f$
1214
+ *
1215
+ * Throws an exception of type Int::OutOfLimits, if
1216
+ * the integers in \a n exceed the limits in Int::Limits.
1217
+ */
1218
+ GECODE_INT_EXPORT void
1219
+ element(Home home, IntSharedArray n, IntVar x0, IntVar x1,
1220
+ IntConLevel icl=ICL_DEF);
1221
+ /** \brief Post domain consistent propagator for \f$ n_{x_0}=x_1\f$
1222
+ *
1223
+ * Throws an exception of type Int::OutOfLimits, if
1224
+ * the integers in \a n exceed the limits in Int::Limits.
1225
+ */
1226
+ GECODE_INT_EXPORT void
1227
+ element(Home home, IntSharedArray n, IntVar x0, BoolVar x1,
1228
+ IntConLevel icl=ICL_DEF);
1229
+ /** \brief Post domain consistent propagator for \f$ n_{x_0}=x_1\f$
1230
+ *
1231
+ * Throws an exception of type Int::OutOfLimits, if
1232
+ * the integers in \a n exceed the limits in Int::Limits.
1233
+ */
1234
+ GECODE_INT_EXPORT void
1235
+ element(Home home, IntSharedArray n, IntVar x0, int x1,
1236
+ IntConLevel icl=ICL_DEF);
1237
+ /** \brief Post propagator for \f$ x_{y_0}=y_1\f$
1238
+ *
1239
+ * Supports both bounds (\a icl = ICL_BND) and
1240
+ * domain consistency (\a icl = ICL_DOM, default).
1241
+ */
1242
+ GECODE_INT_EXPORT void
1243
+ element(Home home, const IntVarArgs& x, IntVar y0, IntVar y1,
1244
+ IntConLevel icl=ICL_DEF);
1245
+ /** \brief Post propagator for \f$ x_{y_0}=y_1\f$
1246
+ *
1247
+ * Supports both bounds (\a icl = ICL_BND) and
1248
+ * domain consistency (\a icl = ICL_DOM, default).
1249
+ */
1250
+ GECODE_INT_EXPORT void
1251
+ element(Home home, const IntVarArgs& x, IntVar y0, int y1,
1252
+ IntConLevel icl=ICL_DEF);
1253
+ /// Post domain consistent propagator for \f$ x_{y_0}=y_1\f$
1254
+ GECODE_INT_EXPORT void
1255
+ element(Home home, const BoolVarArgs& x, IntVar y0, BoolVar y1,
1256
+ IntConLevel icl=ICL_DEF);
1257
+ /// Post domain consistent propagator for \f$ x_{y_0}=y_1\f$
1258
+ GECODE_INT_EXPORT void
1259
+ element(Home home, const BoolVarArgs& x, IntVar y0, int y1,
1260
+ IntConLevel icl=ICL_DEF);
1261
+
1262
+ /** \brief Post domain consistent propagator for \f$ a_{x+w\cdot y}=z\f$
1263
+ *
1264
+ * If \a a is regarded as a two-dimensional array in row-major
1265
+ * order of width \a w and height \a h, then \a z is constrained
1266
+ * to be the element in column \a x and row \a y.
1267
+ *
1268
+ * Throws an exception of type Int::OutOfLimits, if
1269
+ * the integers in \a n exceed the limits in Int::Limits.
1270
+ *
1271
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1272
+ * \f$ w\cdot h\neq|a|\f$.
1273
+ */
1274
+ GECODE_INT_EXPORT void
1275
+ element(Home home, IntSharedArray a,
1276
+ IntVar x, int w, IntVar y, int h, IntVar z,
1277
+ IntConLevel icl=ICL_DEF);
1278
+ /** \brief Post domain consistent propagator for \f$ a_{x+w\cdot y}=z\f$
1279
+ *
1280
+ * If \a a is regarded as a two-dimensional array in row-major
1281
+ * order of width \a w and height \a h, then \a z is constrained
1282
+ * to be the element in column \a x and row \a y.
1283
+ *
1284
+ * Throws an exception of type Int::OutOfLimits, if
1285
+ * the integers in \a n exceed the limits in Int::Limits.
1286
+ *
1287
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1288
+ * \f$ w\cdot h\neq|a|\f$.
1289
+ */
1290
+ GECODE_INT_EXPORT void
1291
+ element(Home home, IntSharedArray a,
1292
+ IntVar x, int w, IntVar y, int h, BoolVar z,
1293
+ IntConLevel icl=ICL_DEF);
1294
+ /** \brief Post propagator for \f$ a_{x+w\cdot y}=z\f$
1295
+ *
1296
+ * If \a a is regarded as a two-dimensional array in row-major
1297
+ * order of width \a w and height \a h, then \a z is constrained
1298
+ * to be the element in column \a x and row \a y.
1299
+ *
1300
+ * Supports both bounds (\a icl = ICL_BND) and
1301
+ * domain consistency (\a icl = ICL_DOM, default).
1302
+ *
1303
+ * Throws an exception of type Int::OutOfLimits, if
1304
+ * the integers in \a n exceed the limits in Int::Limits.
1305
+ *
1306
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1307
+ * \f$ w\cdot h\neq|a|\f$.
1308
+ */
1309
+ GECODE_INT_EXPORT void
1310
+ element(Home home, const IntVarArgs& a,
1311
+ IntVar x, int w, IntVar y, int h, IntVar z,
1312
+ IntConLevel icl=ICL_DEF);
1313
+ /** \brief Post domain consistent propagator for \f$ a_{x+w\cdot y}=z\f$
1314
+ *
1315
+ * If \a a is regarded as a two-dimensional array in row-major
1316
+ * order of width \a w and height \a h, then \a z is constrained
1317
+ * to be the element in column \a x and row \a y.
1318
+ *
1319
+ * Throws an exception of type Int::OutOfLimits, if
1320
+ * the integers in \a n exceed the limits in Int::Limits.
1321
+ *
1322
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1323
+ * \f$ w\cdot h\neq|a|\f$.
1324
+ */
1325
+ GECODE_INT_EXPORT void
1326
+ element(Home home, const BoolVarArgs& a,
1327
+ IntVar x, int w, IntVar y, int h, BoolVar z,
1328
+ IntConLevel icl=ICL_DEF);
1329
+ //@}
1330
+
1331
+
1332
+ /**
1333
+ * \defgroup TaskModelIntDistinct Distinct constraints
1334
+ * \ingroup TaskModelInt
1335
+ */
1336
+
1337
+ //@{
1338
+ /** \brief Post propagator for \f$ x_i\neq x_j\f$ for all \f$0\leq i\neq j<|x|\f$
1339
+ *
1340
+ * Supports value (\a icl = ICL_VAL, default), bounds (\a icl = ICL_BND),
1341
+ * and domain consistency (\a icl = ICL_DOM).
1342
+ *
1343
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1344
+ * the same unassigned variable multiply.
1345
+ */
1346
+ GECODE_INT_EXPORT void
1347
+ distinct(Home home, const IntVarArgs& x,
1348
+ IntConLevel icl=ICL_DEF);
1349
+ /** \brief Post propagator for \f$ x_i+n_i\neq x_j+n_j\f$ for all \f$0\leq i\neq j<|x|\f$
1350
+ *
1351
+ * \li Supports value (\a icl = ICL_VAL, default), bounds (\a icl = ICL_BND),
1352
+ * and domain consistency (\a icl = ICL_DOM).
1353
+ * \li Throws an exception of type Int::OutOfLimits, if
1354
+ * the integers in \a n exceed the limits in Int::Limits
1355
+ * or if the sum of \a n and \a x exceed the limits.
1356
+ * \li Throws an exception of type Int::ArgumentSizeMismatch, if
1357
+ * \a x and \a n are of different size.
1358
+ * \li Throws an exception of type Int::ArgumentSame, if \a x contains
1359
+ * the same unassigned variable multiply.
1360
+ */
1361
+ GECODE_INT_EXPORT void
1362
+ distinct(Home home, const IntArgs& n, const IntVarArgs& x,
1363
+ IntConLevel icl=ICL_DEF);
1364
+ //@}
1365
+
1366
+
1367
+ /**
1368
+ * \defgroup TaskModelIntChannel Channel constraints
1369
+ * \ingroup TaskModelInt
1370
+ */
1371
+
1372
+ //@{
1373
+ /** \brief Post propagator for \f$ x_i = j\leftrightarrow y_j=i\f$ for all \f$0\leq i<|x|\f$
1374
+ *
1375
+ * \li Supports domain consistency (\a icl = ICL_DOM) and value
1376
+ * propagation (all other values for \a icl, default).
1377
+ * \li Throws an exception of type Int::ArgumentSizeMismatch, if
1378
+ * \a x and \a y are of different size.
1379
+ * \li Throws an exception of type Int::ArgumentSame, if \a x or
1380
+ * \a y contain the same unassigned variable multiply. Note that a
1381
+ * variable can occur in both \a x and \a y, but not more than
1382
+ * once in either \a x or \a y.
1383
+ */
1384
+ GECODE_INT_EXPORT void
1385
+ channel(Home home, const IntVarArgs& x, const IntVarArgs& y,
1386
+ IntConLevel icl=ICL_DEF);
1387
+
1388
+ /** \brief Post propagator for \f$ x_i - \mathit{xoff} = j\leftrightarrow y_j - \mathit{yoff} = i\f$ for all \f$0\leq i<|x|\f$
1389
+ *
1390
+ * \li Supports domain consistency (\a icl = ICL_DOM) and value
1391
+ * propagation (all other values for \a icl, default).
1392
+ * \li Throws an exception of type Int::ArgumentSizeMismatch, if
1393
+ * \a x and \a y are of different size.
1394
+ * \li Throws an exception of type Int::ArgumentSame, if \a x or
1395
+ * \a y contain the same unassigned variable multiply. Note that a
1396
+ * variable can occur in both \a x and \a y, but not more than
1397
+ * once in either \a x or \a y.
1398
+ * \li Throws an exception of type Int::OutOfLimits, if \a xoff or
1399
+ * \a yoff are negative.
1400
+ */
1401
+ GECODE_INT_EXPORT void
1402
+ channel(Home home, const IntVarArgs& x, int xoff,
1403
+ const IntVarArgs& y, int yoff,
1404
+ IntConLevel icl=ICL_DEF);
1405
+
1406
+ /// Post domain consistent propagator for channeling a Boolean and an integer variable \f$ x_0 = x_1\f$
1407
+ GECODE_INT_EXPORT void
1408
+ channel(Home home, BoolVar x0, IntVar x1,
1409
+ IntConLevel icl=ICL_DEF);
1410
+ /// Post domain consistent propagator for channeling an integer and a Boolean variable \f$ x_0 = x_1\f$
1411
+ forceinline void
1412
+ channel(Home home, IntVar x0, BoolVar x1,
1413
+ IntConLevel icl=ICL_DEF) {
1414
+ channel(home,x1,x0,icl);
1415
+ }
1416
+ /** \brief Post domain consistent propagator for channeling Boolean and integer variables \f$ x_i = 1\leftrightarrow y=i+o\f$
1417
+ *
1418
+ * Throws an exception of type Int::ArgumentSame, if \a x
1419
+ * contains the same unassigned variable multiply.
1420
+ */
1421
+ GECODE_INT_EXPORT void
1422
+ channel(Home home, const BoolVarArgs& x, IntVar y, int o=0,
1423
+ IntConLevel icl=ICL_DEF);
1424
+ //@}
1425
+
1426
+
1427
+ /**
1428
+ * \defgroup TaskModelIntSorted Sorted constraints
1429
+ *
1430
+ * All sorted constraints support bounds consistency only.
1431
+ *
1432
+ * \ingroup TaskModelInt
1433
+ */
1434
+ //@{
1435
+ /**
1436
+ * \brief Post propagator that \a y is \a x sorted in increasing order
1437
+ *
1438
+ * Might throw the following exceptions:
1439
+ * - Int::ArgumentSizeMismatch, if \a x and \a y differ in size.
1440
+ * - Int::ArgumentSame, if \a x or \a y contain
1441
+ * shared unassigned variables.
1442
+ */
1443
+ GECODE_INT_EXPORT void
1444
+ sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
1445
+ IntConLevel icl=ICL_DEF);
1446
+
1447
+ /**
1448
+ * \brief Post propagator that \a y is \a x sorted in increasing order
1449
+ *
1450
+ * The values in \a z describe the sorting permutation, that is
1451
+ * \f$\forall i\in\{0,\dots,|x|-1\}: x_i=y_{z_i} \f$.
1452
+ *
1453
+ * Might throw the following exceptions:
1454
+ * - Int::ArgumentSizeMismatch, if \a x and \a y differ in size.
1455
+ * - Int::ArgumentSame, if \a x or \a y contain
1456
+ * shared unassigned variables.
1457
+ */
1458
+ GECODE_INT_EXPORT void
1459
+ sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
1460
+ const IntVarArgs& z,
1461
+ IntConLevel icl=ICL_DEF);
1462
+ //@}
1463
+
1464
+
1465
+ /**
1466
+ * \defgroup TaskModelIntCount Counting constraints
1467
+ * \ingroup TaskModelInt
1468
+ *
1469
+ * \note
1470
+ * Domain consistency on the extended cardinality variables of
1471
+ * the Global Cardinality Propagator is only obtained if they are bounds
1472
+ * consistent, otherwise the problem of enforcing domain consistency
1473
+ * on the cardinality variables is NP-complete as proved by
1474
+ * Qumiper et. al. in
1475
+ * ''Improved Algorithms for the Global Cardinality Constraint''.
1476
+ */
1477
+
1478
+ //@{
1479
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\sim_r m\f$
1480
+ *
1481
+ * Performs domain propagation but is not domain consistent.
1482
+ */
1483
+ GECODE_INT_EXPORT void
1484
+ count(Home home, const IntVarArgs& x, int n, IntRelType r, int m,
1485
+ IntConLevel icl=ICL_DEF);
1486
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i\in y\}\sim_r m\f$
1487
+ *
1488
+ * Performs domain propagation but is not domain consistent.
1489
+ */
1490
+ GECODE_INT_EXPORT void
1491
+ count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType r, int m,
1492
+ IntConLevel icl=ICL_DEF);
1493
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\sim_r m\f$
1494
+ *
1495
+ * Performs domain propagation (\a icl = ICL_DOM, default)
1496
+ * and slightly less domain propagation (all other values for \a icl),
1497
+ * where \a y is not pruned. Note that in both cases propagation
1498
+ * is not comain consistent.
1499
+ */
1500
+ GECODE_INT_EXPORT void
1501
+ count(Home home, const IntVarArgs& x, IntVar y, IntRelType r, int m,
1502
+ IntConLevel icl=ICL_DEF);
1503
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\sim_r m\f$
1504
+ *
1505
+ * Performs domain propagation but is not domain consistent.
1506
+ *
1507
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1508
+ * \a x and \a y are of different size.
1509
+ */
1510
+ GECODE_INT_EXPORT void
1511
+ count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType r, int m,
1512
+ IntConLevel icl=ICL_DEF);
1513
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\sim_r z\f$
1514
+ *
1515
+ * Performs domain propagation but is not domain consistent.
1516
+ */
1517
+ GECODE_INT_EXPORT void
1518
+ count(Home home, const IntVarArgs& x, int n, IntRelType r, IntVar z,
1519
+ IntConLevel icl=ICL_DEF);
1520
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i\in y\}\sim_r z\f$
1521
+ *
1522
+ * Performs domain propagation but is not domain consistent.
1523
+ */
1524
+ GECODE_INT_EXPORT void
1525
+ count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType r, IntVar z,
1526
+ IntConLevel icl=ICL_DEF);
1527
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\sim_r z\f$
1528
+ *
1529
+ * Performs domain propagation (\a icl = ICL_DOM, default)
1530
+ * and slightly less domain propagation (all other values for \a icl),
1531
+ * where \a y is not pruned. Note that in both cases propagation
1532
+ * is not comain consistent.
1533
+ */
1534
+ GECODE_INT_EXPORT void
1535
+ count(Home home, const IntVarArgs& x, IntVar y, IntRelType r, IntVar z,
1536
+ IntConLevel icl=ICL_DEF);
1537
+ /** \brief Post propagator for \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\sim_r z\f$
1538
+ *
1539
+ * Performs domain propagation but is not domain consistent.
1540
+ *
1541
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1542
+ * \a x and \a y are of different size.
1543
+ */
1544
+ GECODE_INT_EXPORT void
1545
+ count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType r, IntVar z,
1546
+ IntConLevel icl=ICL_DEF);
1547
+
1548
+ /** \brief Posts a global count (cardinality) constraint
1549
+ *
1550
+ * Posts the constraint that
1551
+ * \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=j\}=c_j\f$ and
1552
+ * \f$ \bigcup_i \{x_i\} \subseteq \{0,\ldots,|c|-1\}\f$
1553
+ * (no other value occurs).
1554
+ *
1555
+ * Supports value (\a icl = ICL_VAL, default), bounds (\a icl = ICL_BND),
1556
+ * and domain consistency (\a icl = ICL_DOM).
1557
+ *
1558
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1559
+ * the same unassigned variable multiply.
1560
+ */
1561
+ GECODE_INT_EXPORT void
1562
+ count(Home home, const IntVarArgs& x, const IntVarArgs& c,
1563
+ IntConLevel icl=ICL_DEF);
1564
+
1565
+ /** \brief Posts a global count (cardinality) constraint
1566
+ *
1567
+ * Posts the constraint that
1568
+ * \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=j\}\in c_j\f$ and
1569
+ * \f$ \bigcup_i \{x_i\} \subseteq \{0,\ldots,|c|-1\}\f$
1570
+ * (no other value occurs).
1571
+ *
1572
+ * Supports value (\a icl = ICL_VAL, default), bounds (\a icl = ICL_BND),
1573
+ * and domain consistency (\a icl = ICL_DOM).
1574
+ *
1575
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1576
+ * the same unassigned variable multiply.
1577
+ */
1578
+ GECODE_INT_EXPORT void
1579
+ count(Home home, const IntVarArgs& x, const IntSetArgs& c,
1580
+ IntConLevel icl=ICL_DEF);
1581
+
1582
+ /** \brief Posts a global count (cardinality) constraint
1583
+ *
1584
+ * Posts the constraint that
1585
+ * \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=v_j\}=c_j\f$ and
1586
+ * \f$ \bigcup_i \{x_i\} \subseteq \bigcup_j \{v_j\}\f$
1587
+ * (no other value occurs).
1588
+ *
1589
+ * Supports value (\a icl = ICL_VAL, default), bounds (\a icl = ICL_BND),
1590
+ * and domain consistency (\a icl = ICL_DOM).
1591
+ *
1592
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1593
+ * the same unassigned variable multiply.
1594
+ *
1595
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1596
+ * \a c and \a v are of different size.
1597
+ */
1598
+ GECODE_INT_EXPORT void
1599
+ count(Home home, const IntVarArgs& x,
1600
+ const IntVarArgs& c, const IntArgs& v,
1601
+ IntConLevel icl=ICL_DEF);
1602
+
1603
+ /** \brief Posts a global count (cardinality) constraint
1604
+ *
1605
+ * Posts the constraint that
1606
+ * \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=v_j\}\in c_j\f$ and
1607
+ * \f$ \bigcup_i \{x_i\} \subseteq \bigcup_j \{v_j\}\f$
1608
+ * (no other value occurs).
1609
+ *
1610
+ * Supports value (\a icl = ICL_VAL, default), bounds (\a icl = ICL_BND),
1611
+ * and domain consistency (\a icl = ICL_DOM).
1612
+ *
1613
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1614
+ * the same unassigned variable multiply.
1615
+ *
1616
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1617
+ * \a c and \a v are of different size.
1618
+ */
1619
+ GECODE_INT_EXPORT void
1620
+ count(Home home, const IntVarArgs& x,
1621
+ const IntSetArgs& c, const IntArgs& v,
1622
+ IntConLevel icl=ICL_DEF);
1623
+
1624
+ /** \brief Posts a global count (cardinality) constraint
1625
+ *
1626
+ * Posts the constraint that
1627
+ * \f$\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=v_j\}\in c\f$ and
1628
+ * \f$ \bigcup_i \{x_i\} \subseteq \bigcup_j \{v_j\}\f$
1629
+ * (no other value occurs).
1630
+ *
1631
+ * Supports value (\a icl = ICL_VAL, default), bounds (\a icl = ICL_BND),
1632
+ * and domain consistency (\a icl = ICL_DOM).
1633
+ *
1634
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1635
+ * the same unassigned variable multiply.
1636
+ *
1637
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
1638
+ * \a c and \a v are of different size.
1639
+ */
1640
+ GECODE_INT_EXPORT void
1641
+ count(Home home, const IntVarArgs& x,
1642
+ const IntSet& c, const IntArgs& v,
1643
+ IntConLevel icl=ICL_DEF);
1644
+
1645
+ //@}
1646
+
1647
+ /**
1648
+ * \defgroup TaskModelIntNValues Number of values constraints
1649
+ * \ingroup TaskModelInt
1650
+ *
1651
+ * The number of values constraints perform propagation
1652
+ * following: C. Bessiere, E. Hebrard, B. Hnich, Z. Kiziltan,
1653
+ * and T. Walsh, Filtering Algorithms for the NValue
1654
+ * Constraint, Constraints, 11(4), 271-293, 2006.
1655
+ */
1656
+
1657
+ //@{
1658
+ /** \brief Post propagator for \f$\#\{x_0,\ldots,x_{|x|-1}\}\sim_r y\f$
1659
+ *
1660
+ */
1661
+ GECODE_INT_EXPORT void
1662
+ nvalues(Home home, const IntVarArgs& x, IntRelType r, int y,
1663
+ IntConLevel icl=ICL_DEF);
1664
+ /** \brief Post propagator for \f$\#\{x_0,\ldots,x_{|x|-1}\}\sim_r y\f$
1665
+ *
1666
+ */
1667
+ GECODE_INT_EXPORT void
1668
+ nvalues(Home home, const IntVarArgs& x, IntRelType r, IntVar y,
1669
+ IntConLevel icl=ICL_DEF);
1670
+ /** \brief Post propagator for \f$\#\{x_0,\ldots,x_{|x|-1}\}\sim_r y\f$
1671
+ *
1672
+ */
1673
+ GECODE_INT_EXPORT void
1674
+ nvalues(Home home, const BoolVarArgs& x, IntRelType r, int y,
1675
+ IntConLevel icl=ICL_DEF);
1676
+ /** \brief Post propagator for \f$\#\{x_0,\ldots,x_{|x|-1}\}\sim_r y\f$
1677
+ *
1678
+ */
1679
+ GECODE_INT_EXPORT void
1680
+ nvalues(Home home, const BoolVarArgs& x, IntRelType r, IntVar y,
1681
+ IntConLevel icl=ICL_DEF);
1682
+ //@}
1683
+
1684
+ /**
1685
+ * \defgroup TaskModelIntSequence Sequence constraints
1686
+ * \ingroup TaskModelInt
1687
+ */
1688
+
1689
+ //@{
1690
+ /** \brief Post propagator for \f$\operatorname{sequence}(x,s,q,l,u)\f$
1691
+ *
1692
+ * Posts a domain consistent propagator for the constraint
1693
+ * \f$\bigwedge_{i=0}^{|x|-q}
1694
+ * \operatorname{among}(\langle x_i,\ldots,x_{i+q-1}\rangle,s,l,u)\f$
1695
+ * where the among constraint is defined as
1696
+ * \f$l\leq\#\{j\in\{i,\ldots,i+q-1\}\;|\;x_j\in s\} \leq u\f$.
1697
+ *
1698
+ * Throws the following exceptions:
1699
+ * - Of type Int::TooFewArguments, if \f$|x|=0\f$.
1700
+ * - Of type Int::ArgumentSame, if \a x contains
1701
+ * the same unassigned variable multiply.
1702
+ * - Of type Int::OutOfRange, if \f$q < 1 \vee q > |x|\f$.
1703
+ */
1704
+ GECODE_INT_EXPORT void
1705
+ sequence(Home home, const IntVarArgs& x, const IntSet& s,
1706
+ int q, int l, int u, IntConLevel icl=ICL_DEF);
1707
+
1708
+ /** \brief Post propagator for \f$\operatorname{sequence}(x,s,q,l,u)\f$
1709
+ *
1710
+ * Posts a domain consistent propagator for the constraint
1711
+ * \f$\bigwedge_{i=0}^{|x|-q}
1712
+ * \operatorname{among}(\langle x_i,\ldots,x_{i+q-1}\rangle,s,l,u)\f$
1713
+ * where the among constraint is defined as
1714
+ * \f$l\leq\#\{j\in\{i,\ldots,i+q-1\}\;|\;x_j\in s\} \leq u\f$.
1715
+ *
1716
+ * Throws the following exceptions:
1717
+ * - Of type Int::TooFewArguments, if \f$|x|=0\f$.
1718
+ * - Of type Int::ArgumentSame, if \a x contains
1719
+ * the same unassigned variable multiply.
1720
+ * - Of type Int::OutOfRange, if \f$q < 1 \vee q > |x|\f$.
1721
+ */
1722
+ GECODE_INT_EXPORT void
1723
+ sequence(Home home, const BoolVarArgs& x, const IntSet& s,
1724
+ int q, int l, int u, IntConLevel icl=ICL_DEF);
1725
+
1726
+ //@}
1727
+
1728
+ /**
1729
+ * \defgroup TaskModelIntExt Extensional constraints
1730
+ * \ingroup TaskModelInt
1731
+ *
1732
+ * Extensional constraints support different ways of how the
1733
+ * extensionally defined relation between the variables is defined.
1734
+ * Examples include specification by a %DFA or a table.
1735
+ *
1736
+ * A %DFA can be defined by a regular expression, for regular expressions
1737
+ * see the module MiniModel.
1738
+ */
1739
+ //@{
1740
+
1741
+ /**
1742
+ * \brief Deterministic finite automaton (%DFA)
1743
+ *
1744
+ * After initialization, the start state is always zero.
1745
+ * The final states are contiguous ranging from the first to the
1746
+ * last final state.
1747
+ */
1748
+ class DFA : public SharedHandle {
1749
+ private:
1750
+ /// Implementation of DFA
1751
+ class DFAI;
1752
+ public:
1753
+ /// Specification of a %DFA transition
1754
+ class Transition {
1755
+ public:
1756
+ int i_state; ///< input state
1757
+ int symbol; ///< symbol
1758
+ int o_state; ///< output state
1759
+ };
1760
+ /// Iterator for %DFA transitions (sorted by symbols)
1761
+ class Transitions {
1762
+ private:
1763
+ /// Current transition
1764
+ const Transition* c_trans;
1765
+ /// End of transitions
1766
+ const Transition* e_trans;
1767
+ public:
1768
+ /// Initialize to all transitions of DFA \a d
1769
+ Transitions(const DFA& d);
1770
+ /// Initialize to transitions of DFA \a d for symbol \a n
1771
+ Transitions(const DFA& d, int n);
1772
+ /// Test whether iterator still at a transition
1773
+ bool operator ()(void) const;
1774
+ /// Move iterator to next transition
1775
+ void operator ++(void);
1776
+ /// Return in-state of current transition
1777
+ int i_state(void) const;
1778
+ /// Return symbol of current transition
1779
+ int symbol(void) const;
1780
+ /// Return out-state of current transition
1781
+ int o_state(void) const;
1782
+ };
1783
+ /// Iterator for %DFA symbols
1784
+ class Symbols {
1785
+ private:
1786
+ /// Current transition
1787
+ const Transition* c_trans;
1788
+ /// End of transitions
1789
+ const Transition* e_trans;
1790
+ public:
1791
+ /// Initialize to symbols of DFA \a d
1792
+ Symbols(const DFA& d);
1793
+ /// Test whether iterator still at a symbol
1794
+ bool operator ()(void) const;
1795
+ /// Move iterator to next symbol
1796
+ void operator ++(void);
1797
+ /// Return current symbol
1798
+ int val(void) const;
1799
+ };
1800
+ public:
1801
+ friend class Transitions;
1802
+ /// Initialize for DFA accepting the empty word
1803
+ DFA(void);
1804
+ /**
1805
+ * \brief Initialize DFA
1806
+ *
1807
+ * - Start state is given by \a s.
1808
+ * - %Transitions are described by \a t, where the last element
1809
+ * must have -1 as value for \c i_state.
1810
+ * - Final states are given by \a f, where the last final element
1811
+ * must be -1.
1812
+ * - Minimizes the DFA, if \a minimize is true.
1813
+ * - Note that the transitions must be deterministic.
1814
+ */
1815
+ GECODE_INT_EXPORT
1816
+ DFA(int s, Transition t[], int f[], bool minimize=true);
1817
+ /// Initialize by DFA \a d (DFA is shared)
1818
+ DFA(const DFA& d);
1819
+ /// Return the number of states
1820
+ int n_states(void) const;
1821
+ /// Return the number of transitions
1822
+ int n_transitions(void) const;
1823
+ /// Return the number of symbols
1824
+ unsigned int n_symbols(void) const;
1825
+ /// Return maximal degree (in-degree and out-degree) of any state
1826
+ unsigned int max_degree(void) const;
1827
+ /// Return the number of the first final state
1828
+ int final_fst(void) const;
1829
+ /// Return the number of the last final state
1830
+ int final_lst(void) const;
1831
+ /// Return smallest symbol in DFA
1832
+ int symbol_min(void) const;
1833
+ /// Return largest symbol in DFA
1834
+ int symbol_max(void) const;
1835
+ };
1836
+
1837
+
1838
+ /**
1839
+ * \brief Extensional propagation kind
1840
+ *
1841
+ * Signals that a particular kind is used in propagation for
1842
+ * the implementation of a extensional constraint.
1843
+ *
1844
+ */
1845
+ enum ExtensionalPropKind {
1846
+ EPK_DEF, ///< Make a default decision
1847
+ EPK_SPEED, ///< Prefer speed over memory consumption
1848
+ EPK_MEMORY ///< Prefer little memory over speed
1849
+ };
1850
+
1851
+ /**
1852
+ * \brief Post domain consistent propagator for extensional constraint described by a DFA
1853
+ *
1854
+ * The elements of \a x must be a word of the language described by
1855
+ * the DFA \a d.
1856
+ *
1857
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1858
+ * the same unassigned variable multiply. If shared occurences of variables
1859
+ * are required, unshare should be used.
1860
+ */
1861
+ GECODE_INT_EXPORT void
1862
+ extensional(Home home, const IntVarArgs& x, DFA d,
1863
+ IntConLevel icl=ICL_DEF);
1864
+
1865
+ /**
1866
+ * \brief Post domain consistent propagator for extensional constraint described by a DFA
1867
+ *
1868
+ * The elements of \a x must be a word of the language described by
1869
+ * the DFA \a d.
1870
+ *
1871
+ * Throws an exception of type Int::ArgumentSame, if \a x contains
1872
+ * the same unassigned variable multiply. If shared occurences of variables
1873
+ * are required, unshare should be used.
1874
+ */
1875
+ GECODE_INT_EXPORT void
1876
+ extensional(Home home, const BoolVarArgs& x, DFA d,
1877
+ IntConLevel icl=ICL_DEF);
1878
+
1879
+ /** \brief Class represeting a set of tuples.
1880
+ *
1881
+ * A TupleSet is used for storing an extensional representation of a
1882
+ * constraint. After a TupleSet is finalized, no more tuples may be
1883
+ * added to it.
1884
+ */
1885
+ class TupleSet : public SharedHandle {
1886
+ public:
1887
+ /** \brief Type of a tuple
1888
+ *
1889
+ * The arity of the tuple is left implicit.
1890
+ */
1891
+ typedef int* Tuple;
1892
+
1893
+ /**
1894
+ * \brief Data stored for a Table
1895
+ *
1896
+ */
1897
+ class GECODE_VTABLE_EXPORT TupleSetI
1898
+ : public SharedHandle::Object {
1899
+ public:
1900
+ /// Arity
1901
+ int arity;
1902
+ /// Number of Tuples
1903
+ int size;
1904
+ /// Tuples index
1905
+ Tuple** tuples;
1906
+ /// Tuple index data
1907
+ Tuple* tuple_data;
1908
+ /// Tuples data
1909
+ int* data;
1910
+ /// Excess storage
1911
+ int excess;
1912
+ /// Minimum and maximum in domain-values
1913
+ int min, max;
1914
+ /// Domain size
1915
+ unsigned int domsize;
1916
+ /// Initial last structure
1917
+ Tuple** last;
1918
+ /// Pointer to NULL-pointer
1919
+ Tuple* nullpointer;
1920
+
1921
+ /// Add Tuple. Assumes that arity matches.
1922
+ template<class T>
1923
+ void add(T t);
1924
+ /// Finalize datastructure (disallows additions of more Tuples)
1925
+ GECODE_INT_EXPORT void finalize(void);
1926
+ /// Resize data cache
1927
+ GECODE_INT_EXPORT void resize(void);
1928
+ /// Is datastructure finalized
1929
+ bool finalized(void) const;
1930
+ /// Initialize as empty tuple set
1931
+ TupleSetI(void);
1932
+ /// Delete implementation
1933
+ GECODE_INT_EXPORT virtual ~TupleSetI(void);
1934
+ /// Create a copy
1935
+ GECODE_INT_EXPORT virtual SharedHandle::Object* copy(void) const;
1936
+ };
1937
+
1938
+ /// Get implementation
1939
+ TupleSetI* implementation(void);
1940
+
1941
+ /// Construct empty tuple set
1942
+ TupleSet(void);
1943
+ /// Initialize by TupleSet \a d (tuple set is shared)
1944
+ TupleSet(const TupleSet& d);
1945
+
1946
+ /// Add tuple to tuple set
1947
+ void add(const IntArgs& tuple);
1948
+ /// Finalize tuple set
1949
+ void finalize(void);
1950
+ /// Is tuple set finalized
1951
+ bool finalized(void) const;
1952
+ /// Arity of tuple set
1953
+ int arity(void) const;
1954
+ /// Number of tuples
1955
+ int tuples(void) const;
1956
+ /// Get tuple i
1957
+ Tuple operator [](int i) const;
1958
+ /// Minimum domain element
1959
+ int min(void) const;
1960
+ /// Maximum domain element
1961
+ int max(void) const;
1962
+ };
1963
+
1964
+ /** \brief Post propagator for \f$x\in t\f$.
1965
+ *
1966
+ * \li Supports implementations optimized for memory (\a epk = \a
1967
+ * EPK_MEMORY, default) and speed (\a epk = \a EPK_SPEED).
1968
+ * \li Supports domain consistency (\a icl = ICL_DOM, default) only.
1969
+ * \li Throws an exception of type Int::ArgumentSizeMismatch, if
1970
+ * \a x and \a t are of different size.
1971
+ * \li Throws an exception of type Int::NotYetFinalized, if the tuple
1972
+ * set \a t has not been finalized.
1973
+ *
1974
+ * \warning If the domains for the \f$x_i\f$ are not dense and
1975
+ * have similar bounds, lots of memory will be wasted (memory
1976
+ * consumption is in \f$
1977
+ * O\left(|x|\cdot\min_i(\underline{x_i})\cdot\max_i(\overline{x_i})\right)\f$
1978
+ * for the basic algorithm (\a epk = \a EPK_MEMORY) and additionally \f$
1979
+ * O\left(|x|^2\cdot\min_i(\underline{x_i})\cdot\max_i(\overline{x_i})\right)\f$
1980
+ * for the incremental algorithm (\a epk = \a EPK_SPEED).
1981
+ */
1982
+ GECODE_INT_EXPORT void
1983
+ extensional(Home home, const IntVarArgs& x, const TupleSet& t,
1984
+ ExtensionalPropKind epk=EPK_DEF, IntConLevel icl=ICL_DEF);
1985
+
1986
+ /** \brief Post propagator for \f$x\in t\f$.
1987
+ *
1988
+ * \li Supports implementations optimized for memory (\a epk = \a
1989
+ * EPK_MEMORY, default) and speed (\a epk = \a EPK_SPEED).
1990
+ * \li Supports domain consistency (\a icl = ICL_DOM, default) only.
1991
+ * \li Throws an exception of type Int::ArgumentSizeMismatch, if
1992
+ * \a x and \a t are of different size.
1993
+ * \li Throws an exception of type Int::NotYetFinalized, if the tuple
1994
+ * set \a t has not been finalized.
1995
+ */
1996
+ GECODE_INT_EXPORT void
1997
+ extensional(Home home, const BoolVarArgs& x, const TupleSet& t,
1998
+ ExtensionalPropKind epk=EPK_DEF, IntConLevel icl=ICL_DEF);
1999
+ //@}
2000
+
2001
+ }
2002
+
2003
+ #include <gecode/int/extensional/dfa.hpp>
2004
+ #include <gecode/int/extensional/tuple-set.hpp>
2005
+
2006
+ namespace Gecode {
2007
+
2008
+ /**
2009
+ * \defgroup TaskModelIntArith Arithmetic constraints
2010
+ * \ingroup TaskModelInt
2011
+ */
2012
+
2013
+ //@{
2014
+ /** \brief Post propagator for \f$ \min\{x_0,x_1\}=x_2\f$
2015
+ *
2016
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2017
+ * and domain consistency (\a icl = ICL_DOM).
2018
+ */
2019
+ GECODE_INT_EXPORT void
2020
+ min(Home home, IntVar x0, IntVar x1, IntVar x2,
2021
+ IntConLevel icl=ICL_DEF);
2022
+ /** \brief Post propagator for \f$ \min x=y\f$
2023
+ *
2024
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2025
+ * and domain consistency (\a icl = ICL_DOM).
2026
+ *
2027
+ * If \a x is empty, an exception of type Int::TooFewArguments is thrown.
2028
+ */
2029
+ GECODE_INT_EXPORT void
2030
+ min(Home home, const IntVarArgs& x, IntVar y,
2031
+ IntConLevel icl=ICL_DEF);
2032
+ /** \brief Post propagator for \f$ \max\{x_0,x_1\}=x_2\f$
2033
+ *
2034
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2035
+ * and domain consistency (\a icl = ICL_DOM).
2036
+ */
2037
+ GECODE_INT_EXPORT void
2038
+ max(Home home, IntVar x0, IntVar x1, IntVar x2,
2039
+ IntConLevel icl=ICL_DEF);
2040
+ /** \brief Post propagator for \f$ \max x=y\f$
2041
+ *
2042
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2043
+ * and domain consistency (\a icl = ICL_DOM).
2044
+ *
2045
+ * If \a x is empty, an exception of type Int::TooFewArguments is thrown.
2046
+ */
2047
+ GECODE_INT_EXPORT void
2048
+ max(Home home, const IntVarArgs& x, IntVar y,
2049
+ IntConLevel icl=ICL_DEF);
2050
+
2051
+ /** \brief Post propagator for \f$ |x_0|=x_1\f$
2052
+ *
2053
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2054
+ * and domain consistency (\a icl = ICL_DOM).
2055
+ */
2056
+ GECODE_INT_EXPORT void
2057
+ abs(Home home, IntVar x0, IntVar x1,
2058
+ IntConLevel icl=ICL_DEF);
2059
+
2060
+ /** \brief Post propagator for \f$x_0\cdot x_1=x_2\f$
2061
+ *
2062
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2063
+ * and domain consistency (\a icl = ICL_DOM).
2064
+ */
2065
+ GECODE_INT_EXPORT void
2066
+ mult(Home home, IntVar x0, IntVar x1, IntVar x2,
2067
+ IntConLevel icl=ICL_DEF);
2068
+
2069
+ /** \brief Post propagator for \f$x_0\cdot x_0=x_1\f$
2070
+ *
2071
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2072
+ * and domain consistency (\a icl = ICL_DOM).
2073
+ */
2074
+ GECODE_INT_EXPORT void
2075
+ sqr(Home home, IntVar x0, IntVar x1,
2076
+ IntConLevel icl=ICL_DEF);
2077
+
2078
+ /** \brief Post propagator for \f$\lfloor\sqrt{x_0}\rfloor=x_1\f$
2079
+ *
2080
+ * Supports both bounds consistency (\a icl = ICL_BND, default)
2081
+ * and domain consistency (\a icl = ICL_DOM).
2082
+ */
2083
+ GECODE_INT_EXPORT void
2084
+ sqrt(Home home, IntVar x0, IntVar x1,
2085
+ IntConLevel icl=ICL_DEF);
2086
+
2087
+ /** \brief Post propagator for \f$x_0\ \mathrm{div}\ x_1=x_2 \land x_0\ \mathrm{mod}\ x_1 = x_3\f$
2088
+ *
2089
+ * Supports bounds consistency (\a icl = ICL_BND, default).
2090
+ */
2091
+ GECODE_INT_EXPORT void
2092
+ divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
2093
+ IntConLevel icl=ICL_DEF);
2094
+
2095
+ /** \brief Post propagator for \f$x_0\ \mathrm{div}\ x_1=x_2\f$
2096
+ *
2097
+ * Supports bounds consistency (\a icl = ICL_BND, default).
2098
+ */
2099
+ GECODE_INT_EXPORT void
2100
+ div(Home home, IntVar x0, IntVar x1, IntVar x2,
2101
+ IntConLevel icl=ICL_DEF);
2102
+
2103
+ /** \brief Post propagator for \f$x_0\ \mathrm{mod}\ x_1=x_2\f$
2104
+ *
2105
+ * Supports bounds consistency (\a icl = ICL_BND, default).
2106
+ */
2107
+ GECODE_INT_EXPORT void
2108
+ mod(Home home, IntVar x0, IntVar x1, IntVar x2,
2109
+ IntConLevel icl=ICL_DEF);
2110
+ //@}
2111
+
2112
+ /**
2113
+ * \defgroup TaskModelIntLI Linear constraints over integer variables
2114
+ * \ingroup TaskModelInt
2115
+ *
2116
+ * All variants for linear constraints over integer variables share
2117
+ * the following properties:
2118
+ * - Bounds consistency (over the real numbers) is supported for
2119
+ * all constraints (actually, for disequlities always domain consistency
2120
+ * is used as it is cheaper). Domain consistency is supported for all
2121
+ * non-reified constraint. As bounds consistency for inequalities
2122
+ * coincides with domain consistency, the only
2123
+ * real variation is for linear equations. Domain consistent
2124
+ * linear equations have exponential complexity, so use with care!
2125
+ * - Variables occurring multiply in the argument arrays are replaced
2126
+ * by a single occurrence: for example, \f$ax+bx\f$ becomes
2127
+ * \f$(a+b)x\f$.
2128
+ * - If in the above simplification the value for \f$(a+b)\f$ (or for
2129
+ * \f$a\f$ and \f$b\f$) exceeds the limits for integers as
2130
+ * defined in Int::Limits, an exception of type
2131
+ * Int::OutOfLimits is thrown.
2132
+ * - Assume the constraint
2133
+ * \f$\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\f$.
2134
+ * If \f$|c|+\sum_{i=0}^{|x|-1}a_i\cdot x_i\f$ exceeds the maximal
2135
+ * available precision (at least \f$2^{48}\f$), an exception of
2136
+ * type Int::OutOfLimits is thrown.
2137
+ * - In all other cases, the created propagators are accurate (that
2138
+ * is, they will not silently overflow during propagation).
2139
+ */
2140
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}x_i\sim_r c\f$
2141
+ * \ingroup TaskModelIntLI
2142
+ */
2143
+ GECODE_INT_EXPORT void
2144
+ linear(Home home, const IntVarArgs& x,
2145
+ IntRelType r, int c,
2146
+ IntConLevel icl=ICL_DEF);
2147
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}x_i\sim_r y\f$
2148
+ * \ingroup TaskModelIntLI
2149
+ */
2150
+ GECODE_INT_EXPORT void
2151
+ linear(Home home, const IntVarArgs& x,
2152
+ IntRelType r, IntVar y,
2153
+ IntConLevel icl=ICL_DEF);
2154
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}x_i\sim_r c\right)\Leftrightarrow b\f$
2155
+ * \ingroup TaskModelIntLI
2156
+ */
2157
+ GECODE_INT_EXPORT void
2158
+ linear(Home home, const IntVarArgs& x,
2159
+ IntRelType r, int c, BoolVar b,
2160
+ IntConLevel icl=ICL_DEF);
2161
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}x_i\sim_r y\right)\Leftrightarrow b\f$
2162
+ * \ingroup TaskModelIntLI
2163
+ */
2164
+ GECODE_INT_EXPORT void
2165
+ linear(Home home, const IntVarArgs& x,
2166
+ IntRelType r, IntVar y, BoolVar b,
2167
+ IntConLevel icl=ICL_DEF);
2168
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\f$
2169
+ *
2170
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2171
+ * \a a and \a x are of different size.
2172
+ * \ingroup TaskModelIntLI
2173
+ */
2174
+ GECODE_INT_EXPORT void
2175
+ linear(Home home, const IntArgs& a, const IntVarArgs& x,
2176
+ IntRelType r, int c,
2177
+ IntConLevel icl=ICL_DEF);
2178
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y\f$
2179
+ *
2180
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2181
+ * \a a and \a x are of different size.
2182
+ * \ingroup TaskModelIntLI
2183
+ */
2184
+ GECODE_INT_EXPORT void
2185
+ linear(Home home, const IntArgs& a, const IntVarArgs& x,
2186
+ IntRelType r, IntVar y,
2187
+ IntConLevel icl=ICL_DEF);
2188
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\right)\Leftrightarrow b\f$
2189
+ *
2190
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2191
+ * \a a and \a x are of different size.
2192
+ * \ingroup TaskModelIntLI
2193
+ */
2194
+ GECODE_INT_EXPORT void
2195
+ linear(Home home, const IntArgs& a, const IntVarArgs& x,
2196
+ IntRelType r, int c, BoolVar b,
2197
+ IntConLevel icl=ICL_DEF);
2198
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y\right)\Leftrightarrow b\f$
2199
+ *
2200
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2201
+ * \a a and \a x are of different size.
2202
+ * \ingroup TaskModelIntLI
2203
+ */
2204
+ GECODE_INT_EXPORT void
2205
+ linear(Home home, const IntArgs& a, const IntVarArgs& x,
2206
+ IntRelType r, IntVar y, BoolVar b,
2207
+ IntConLevel icl=ICL_DEF);
2208
+
2209
+
2210
+ /**
2211
+ * \defgroup TaskModelIntLB Linear constraints over Boolean variables
2212
+ * \ingroup TaskModelInt
2213
+ *
2214
+ * All variants for linear constraints over Boolean variables share
2215
+ * the following properties:
2216
+ * - Bounds consistency (over the real numbers) is supported for
2217
+ * all constraints (actually, for disequlities always domain consistency
2218
+ * is used as it is cheaper).
2219
+ * - Variables occurring multiply in the argument arrays are replaced
2220
+ * by a single occurrence: for example, \f$ax+bx\f$ becomes
2221
+ * \f$(a+b)x\f$.
2222
+ * - If in the above simplification the value for \f$(a+b)\f$ (or for
2223
+ * \f$a\f$ and \f$b\f$) exceeds the limits for integers as
2224
+ * defined in Int::Limits, an exception of type
2225
+ * Int::OutOfLimits is thrown.
2226
+ * - Assume the constraint
2227
+ * \f$\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\f$.
2228
+ * If \f$|c|+\sum_{i=0}^{|x|-1}a_i\cdot x_i\f$ exceeds the limits
2229
+ * for integers as defined in Int::Limits, an exception of
2230
+ * type Int::OutOfLimits is thrown.
2231
+ * - In all other cases, the created propagators are accurate (that
2232
+ * is, they will not silently overflow during propagation).
2233
+ */
2234
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}x_i\sim_r c\f$
2235
+ * \ingroup TaskModelIntLB
2236
+ */
2237
+ GECODE_INT_EXPORT void
2238
+ linear(Home home, const BoolVarArgs& x,
2239
+ IntRelType r, int c,
2240
+ IntConLevel icl=ICL_DEF);
2241
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}x_i\sim_r c\right)\Leftrightarrow b\f$
2242
+ * \ingroup TaskModelIntLB
2243
+ */
2244
+ GECODE_INT_EXPORT void
2245
+ linear(Home home, const BoolVarArgs& x,
2246
+ IntRelType r, int c, BoolVar b,
2247
+ IntConLevel icl=ICL_DEF);
2248
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}x_i\sim_r y\f$
2249
+ * \ingroup TaskModelIntLB
2250
+ */
2251
+ GECODE_INT_EXPORT void
2252
+ linear(Home home, const BoolVarArgs& x,
2253
+ IntRelType r, IntVar y,
2254
+ IntConLevel icl=ICL_DEF);
2255
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}x_i\sim_r y\right)\Leftrightarrow b\f$
2256
+ * \ingroup TaskModelIntLB
2257
+ */
2258
+ GECODE_INT_EXPORT void
2259
+ linear(Home home, const BoolVarArgs& x,
2260
+ IntRelType r, IntVar y, BoolVar b,
2261
+ IntConLevel icl=ICL_DEF);
2262
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\f$
2263
+ *
2264
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2265
+ * \a a and \a x are of different size.
2266
+ * \ingroup TaskModelIntLB
2267
+ */
2268
+ GECODE_INT_EXPORT void
2269
+ linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2270
+ IntRelType r, int c,
2271
+ IntConLevel icl=ICL_DEF);
2272
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r c\right)\Leftrightarrow b\f$
2273
+ *
2274
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2275
+ * \a a and \a x are of different size.
2276
+ * \ingroup TaskModelIntLB
2277
+ */
2278
+ GECODE_INT_EXPORT void
2279
+ linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2280
+ IntRelType r, int c, BoolVar b,
2281
+ IntConLevel icl=ICL_DEF);
2282
+ /** \brief Post propagator for \f$\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y\f$
2283
+ *
2284
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2285
+ * \a a and \a x are of different size.
2286
+ * \ingroup TaskModelIntLB
2287
+ */
2288
+ GECODE_INT_EXPORT void
2289
+ linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2290
+ IntRelType r, IntVar y,
2291
+ IntConLevel icl=ICL_DEF);
2292
+ /** \brief Post propagator for \f$\left(\sum_{i=0}^{|x|-1}a_i\cdot x_i\sim_r y\right)\Leftrightarrow b\f$
2293
+ *
2294
+ * Throws an exception of type Int::ArgumentSizeMismatch, if
2295
+ * \a a and \a x are of different size.
2296
+ * \ingroup TaskModelIntLB
2297
+ */
2298
+ GECODE_INT_EXPORT void
2299
+ linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2300
+ IntRelType r, IntVar y, BoolVar b,
2301
+ IntConLevel icl=ICL_DEF);
2302
+
2303
+
2304
+ /**
2305
+ * \defgroup TaskModelIntBinPacking Bin packing constraints
2306
+ * \ingroup TaskModelInt
2307
+ *
2308
+ * Constraints for modeling bin packing problems. Propagation follows:
2309
+ * Paul Shaw. A Constraint for Bin Packing. CP 2004.
2310
+ */
2311
+ /** \brief Post propagator for bin packing
2312
+ *
2313
+ * The variables in \a l are the loads for each bin, whereas the
2314
+ * variables in \a b define for each item into which bin it is packed.
2315
+ * The integer values \a s define the size of the items.
2316
+ *
2317
+ * It is propagated that for each \f$j\f$ with \f$0\leq j<|l|\f$ the
2318
+ * constraint \f$l_j=\sum_{0\leq i<|b|\wedge b_i=j}s_i\f$ holds and that
2319
+ * for each \f$i\f$ with \f$0\leq i<|b|\f$ the constraint
2320
+ * \f$0\leq b_i<|l|\f$ holds.
2321
+ *
2322
+ * Throws the following exceptions:
2323
+ * - Of type Int::ArgumentSizeMismatch if \a b and \a s are not of
2324
+ * the same size.
2325
+ * - Of type Int::ArgumentSame if \a l and \a b share unassigned variables.
2326
+ * - Of type Int::OutOfLimits if \a s contains a non-positive number.
2327
+ *
2328
+ * \ingroup TaskModelIntBinPacking
2329
+ */
2330
+ GECODE_INT_EXPORT void
2331
+ binpacking(Home home,
2332
+ const IntVarArgs& l,
2333
+ const IntVarArgs& b, const IntArgs& s,
2334
+ IntConLevel icl=ICL_DEF);
2335
+ /**
2336
+ * \defgroup TaskModelIntGeoPacking Geometrical packing constraints
2337
+ * \ingroup TaskModelInt
2338
+ *
2339
+ * Constraints for modeling geometrical packing problems.
2340
+ */
2341
+ /** \brief Post propagator for rectangle packing
2342
+ *
2343
+ * Propagate that no two rectangles as described by the coordinates
2344
+ * \a x, and \a y, widths \a w, and heights \a h overlap.
2345
+ *
2346
+ * Throws the following exceptions:
2347
+ * - Of type Int::ArgumentSizeMismatch if \a x, \a w, \a y, or \a h
2348
+ * are not of the same size.
2349
+ * - Of type Int::ArgumentSame if \a x or \a y share unassigned variables.
2350
+ * - Of type Int::OutOfLimits if \a w or \a h contain a negative number.
2351
+ *
2352
+ * \ingroup TaskModelIntGeoPacking
2353
+ */
2354
+ GECODE_INT_EXPORT void
2355
+ nooverlap(Home home,
2356
+ const IntVarArgs& x, const IntArgs& w,
2357
+ const IntVarArgs& y, const IntArgs& h,
2358
+ IntConLevel icl=ICL_DEF);
2359
+ /** \brief Post propagator for rectangle packing
2360
+ *
2361
+ * Propagate that no two rectangles as described by the coordinates
2362
+ * \a x, and \a y, widths \a w, and heights \a h overlap. The rectangles
2363
+ * can be optional, as described by the Boolean variables \a o.
2364
+ *
2365
+ * Throws the following exceptions:
2366
+ * - Of type Int::ArgumentSizeMismatch if \a x, \a w, \a y, \a h, or \a o
2367
+ * are not of the same size.
2368
+ * - Of type Int::ArgumentSame if \a x, \a y, or \a o share unassigned
2369
+ * variables.
2370
+ * - Of type Int::OutOfLimits if \a w or \a h contain a negative number.
2371
+ *
2372
+ * \ingroup TaskModelIntGeoPacking
2373
+ */
2374
+ GECODE_INT_EXPORT void
2375
+ nooverlap(Home home,
2376
+ const IntVarArgs& x, const IntArgs& w,
2377
+ const IntVarArgs& y, const IntArgs& h,
2378
+ const BoolVarArgs& o,
2379
+ IntConLevel icl=ICL_DEF);
2380
+ /** \brief Post propagator for rectangle packing
2381
+ *
2382
+ * Propagate that no two rectangles as described by the start coordinates
2383
+ * \a x0 and \a y0, widths \a w and heights \a h, and end coordinates
2384
+ * \a x1 and \a y1 overlap.
2385
+ *
2386
+ * Note that the relations \f$x0_i+w_i=x1_i\f$ and \f$y0_i+h_i=y1_i\f$ are
2387
+ * not propagated (for \f$0\leq i<|x0|\f$). That is, additional constraints
2388
+ * must be posted to enforce that relation.
2389
+ *
2390
+ * Throws the following exceptions:
2391
+ * - Of type Int::ArgumentSizeMismatch if \a x0, \a x1, \a w,
2392
+ * \a y0, \a y1, or \a h are not of the same size.
2393
+ * - Of type Int::ArgumentSame if \a x0, \a x1, \a w, \a y0, \a y1,
2394
+ * or \a h share unassigned variables.
2395
+ *
2396
+ * \ingroup TaskModelIntGeoPacking
2397
+ */
2398
+ GECODE_INT_EXPORT void
2399
+ nooverlap(Home home,
2400
+ const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
2401
+ const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
2402
+ IntConLevel icl=ICL_DEF);
2403
+ /** \brief Post propagator for rectangle packing
2404
+ *
2405
+ * Propagate that no two rectangles as described by the start coordinates
2406
+ * \a x0 and \a y0, widths \a w and heights \a h, and end coordinates
2407
+ * \a x1 and \a y1 overlap. The rectangles can be optional, as described
2408
+ * by the Boolean variables \a o.
2409
+ *
2410
+ * Note that the relations \f$x0_i+w_i=x1_i\f$ and \f$y0_i+h_i=y1_i\f$ are
2411
+ * not propagated (for \f$0\leq i<|x0|\f$). That is, additional constraints
2412
+ * must be posted to enforce that relation.
2413
+ *
2414
+ * Throws the following exceptions:
2415
+ * - Of type Int::ArgumentSizeMismatch if \a x0, \a x1, \a w,
2416
+ * \a y0, \a y1, or \a h are not of the same size.
2417
+ * - Of type Int::ArgumentSame if \a x0, \a x1, \a w, \a y0, \a y1,
2418
+ * \a h, or \a o share unassigned variables.
2419
+ *
2420
+ * \ingroup TaskModelIntGeoPacking
2421
+ */
2422
+ GECODE_INT_EXPORT void
2423
+ nooverlap(Home home,
2424
+ const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
2425
+ const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
2426
+ const BoolVarArgs& o,
2427
+ IntConLevel icl=ICL_DEF);
2428
+
2429
+
2430
+ /**
2431
+ * \defgroup TaskModelIntScheduling Scheduling constraints
2432
+ * \ingroup TaskModelInt
2433
+ */
2434
+ //@{
2435
+
2436
+ /**
2437
+ * \brief Post propagators for the cumulatives constraint
2438
+ *
2439
+ * This function creates propagators for the cumulatives constraint
2440
+ * presented in <em>"A new multi-resource cumulatives constraint
2441
+ * with negative heights"</em>, Nicolas Beldiceanu and Mats
2442
+ * Carlsson, Principles and Practice of Constraint Programming 2002.
2443
+ *
2444
+ * The constraint models a set of machines and a set of tasks that
2445
+ * should be assigned to the machines. The machines have a positive
2446
+ * resource limit and the tasks each have a resource usage that can
2447
+ * be either positive, negative, or zero. The constraint is enforced
2448
+ * over each point in time for a machine where there is at least one
2449
+ * task assigned.
2450
+ *
2451
+ * The propagator does not enforce \f$s_i+p_i=e_i\f$, this constraint
2452
+ * has to be posted in addition to ensure consistency of the task bounds.
2453
+ *
2454
+ * The limit for a machine is either the maximum amount available at
2455
+ * any given time (\a at_most = true), or else the least amount to
2456
+ * be used (\a at_most = false).
2457
+ *
2458
+ * \param home current space
2459
+ * \param m \f$ m_i \f$ is the machine assigned to task \f$ i \f$
2460
+ * \param s \f$ s_i \f$ is the start time assigned to task \f$ i \f$
2461
+ * \param p \f$ p_i \f$ is the processing time of task \f$ i \f$
2462
+ * \param e \f$ e_i \f$ is the end time assigned to task \f$ i \f$
2463
+ * \param u \f$ u_i \f$ is the amount of
2464
+ * resources consumed by task \f$ i \f$
2465
+ * \param c \f$ c_r \f$ is the capacity, the amount of resource available
2466
+ * for machine \f$ r \f$
2467
+ * \param at_most \a at_most tells if the amount of resources used
2468
+ * for a machine should be less than the limit (\a at_most
2469
+ * = true) or greater than the limit (\a at_most = false)
2470
+ * \param icl Supports value-consistency only (\a icl = ICL_VAL, default).
2471
+ *
2472
+ * \exception Int::ArgumentSizeMismatch thrown if the sizes
2473
+ * of the arguments representing tasks does not match.
2474
+ * \exception Int::OutOfLimits thrown if any numerical argument is
2475
+ * larger than Int::Limits::max or less than
2476
+ * Int::Limits::min.
2477
+ */
2478
+ GECODE_INT_EXPORT void
2479
+ cumulatives(Home home, const IntVarArgs& m,
2480
+ const IntVarArgs& s, const IntVarArgs& p,
2481
+ const IntVarArgs& e, const IntVarArgs& u,
2482
+ const IntArgs& c, bool at_most,
2483
+ IntConLevel icl=ICL_DEF);
2484
+ /** \brief Post propagators for the cumulatives constraint.
2485
+ *
2486
+ * \copydoc cumulatives()
2487
+ */
2488
+ GECODE_INT_EXPORT void
2489
+ cumulatives(Home home, const IntArgs& m,
2490
+ const IntVarArgs& s, const IntVarArgs& p,
2491
+ const IntVarArgs& e, const IntVarArgs& u,
2492
+ const IntArgs& c, bool at_most,
2493
+ IntConLevel icl=ICL_DEF);
2494
+ /** \brief Post propagators for the cumulatives constraint.
2495
+ *
2496
+ * \copydoc cumulatives()
2497
+ */
2498
+ GECODE_INT_EXPORT void
2499
+ cumulatives(Home home, const IntVarArgs& m,
2500
+ const IntVarArgs& s, const IntArgs& p,
2501
+ const IntVarArgs& e, const IntVarArgs& u,
2502
+ const IntArgs& c, bool at_most,
2503
+ IntConLevel icl=ICL_DEF);
2504
+ /** \brief Post propagators for the cumulatives constraint.
2505
+ *
2506
+ * \copydoc cumulatives()
2507
+ */
2508
+ GECODE_INT_EXPORT void
2509
+ cumulatives(Home home, const IntArgs& m,
2510
+ const IntVarArgs& s, const IntArgs& p,
2511
+ const IntVarArgs& e, const IntVarArgs& u,
2512
+ const IntArgs& c, bool at_most,
2513
+ IntConLevel icl=ICL_DEF);
2514
+ /** \brief Post propagators for the cumulatives constraint.
2515
+ *
2516
+ * \copydoc cumulatives()
2517
+ */
2518
+ GECODE_INT_EXPORT void
2519
+ cumulatives(Home home, const IntVarArgs& m,
2520
+ const IntVarArgs& s, const IntVarArgs& p,
2521
+ const IntVarArgs& e, const IntArgs& u,
2522
+ const IntArgs& c, bool at_most,
2523
+ IntConLevel icl=ICL_DEF);
2524
+ /** \brief Post propagators for the cumulatives constraint.
2525
+ *
2526
+ * \copydoc cumulatives()
2527
+ */
2528
+ GECODE_INT_EXPORT void
2529
+ cumulatives(Home home, const IntArgs& m,
2530
+ const IntVarArgs& s, const IntVarArgs& p,
2531
+ const IntVarArgs& e, const IntArgs& u,
2532
+ const IntArgs& c, bool at_most,
2533
+ IntConLevel icl=ICL_DEF);
2534
+ /** \brief Post propagators for the cumulatives constraint.
2535
+ *
2536
+ * \copydoc cumulatives()
2537
+ */
2538
+ GECODE_INT_EXPORT void
2539
+ cumulatives(Home home, const IntVarArgs& m,
2540
+ const IntVarArgs& s, const IntArgs& p,
2541
+ const IntVarArgs& e, const IntArgs& u,
2542
+ const IntArgs& c, bool at_most,
2543
+ IntConLevel icl=ICL_DEF);
2544
+ /** \brief Post propagators for the cumulatives constraint.
2545
+ *
2546
+ * \copydoc cumulatives()
2547
+ */
2548
+ GECODE_INT_EXPORT void
2549
+ cumulatives(Home home, const IntArgs& m,
2550
+ const IntVarArgs& s, const IntArgs& p,
2551
+ const IntVarArgs& e, const IntArgs& u,
2552
+ const IntArgs& c, bool at_most,
2553
+ IntConLevel icl=ICL_DEF);
2554
+
2555
+ /** \brief Post propagators for scheduling tasks on unary resources
2556
+ *
2557
+ * Schedule tasks with start times \a s and processing times \a p
2558
+ * on a unary resource. The propagator uses the algorithms from:
2559
+ * Petr Vil�m, Global Constraints in Scheduling, PhD thesis,
2560
+ * Charles University, Prague, Czech Republic, 2007.
2561
+ *
2562
+ * The propagator performs overload checking, detectable precendence
2563
+ * propagation, not-first-not-last propagation, and edge finding.
2564
+ *
2565
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s
2566
+ * and \a p are of different size.
2567
+ * - Throws an exception of type Int::ArgumentSame, if \a s contains
2568
+ * the same unassigned variable multiply.
2569
+ * - Throws an exception of type Int::OutOfLimits, if \a p contains
2570
+ * an integer that is negative or that could generate
2571
+ * an overflow.
2572
+ */
2573
+ GECODE_INT_EXPORT void
2574
+ unary(Home home, const IntVarArgs& s, const IntArgs& p,
2575
+ IntConLevel icl=ICL_DEF);
2576
+
2577
+ /** \brief Post propagators for scheduling optional tasks on unary resources
2578
+ *
2579
+ * Schedule optional tasks with start times \a s, processing times \a p,
2580
+ * and whether a task is mandatory \a m (a task is mandatory if the
2581
+ * Boolean variable is 1) on a unary resource. The propagator uses the
2582
+ * algorithms from:
2583
+ * Petr Vil�m, Global Constraints in Scheduling, PhD thesis,
2584
+ * Charles University, Prague, Czech Republic, 2007.
2585
+ *
2586
+ * The propagator performs overload checking, detectable precendence
2587
+ * propagation, not-first-not-last propagation, and edge finding.
2588
+ *
2589
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s,
2590
+ * \a p, or \a m are of different size.
2591
+ * - Throws an exception of type Int::ArgumentSame, if \a s contains
2592
+ * the same unassigned variable multiply.
2593
+ * - Throws an exception of type Int::OutOfLimits, if \a p contains
2594
+ * an integer that is negative or that could generate
2595
+ * an overflow.
2596
+ */
2597
+ GECODE_INT_EXPORT void
2598
+ unary(Home home, const IntVarArgs& s, const IntArgs& p,
2599
+ const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2600
+
2601
+ /** \brief Post propagators for scheduling tasks on unary resources
2602
+ *
2603
+ * Schedule tasks with flexible times \a flex and fixed times \a fix
2604
+ * on a unary resource. For each
2605
+ * task, it depends on \a t how the flexible and fix times are interpreted:
2606
+ * - If <code>t[i]</code> is <code>TT_FIXP</code>, then
2607
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2608
+ * processing time.
2609
+ * - If <code>t[i]</code> is <code>TT_FIXS</code>, then
2610
+ * <code>flex[i]</code> is the end time and <code>fix[i]</code> is the
2611
+ * start time.
2612
+ * - If <code>t[i]</code> is <code>TT_FIXE</code>, then
2613
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2614
+ * end time.
2615
+ *
2616
+ * The propagator uses the algorithms from:
2617
+ * Petr Vil�m, Global Constraints in Scheduling, PhD thesis,
2618
+ * Charles University, Prague, Czech Republic, 2007.
2619
+ *
2620
+ * The propagator performs overload checking, detectable precendence
2621
+ * propagation, not-first-not-last propagation, and edge finding.
2622
+ *
2623
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s
2624
+ * and \a p are of different size.
2625
+ * - Throws an exception of type Int::OutOfLimits, if \a p contains
2626
+ * an integer that is negative for a task with type <code>TT_FIXP</code>
2627
+ * or that could generate an overflow.
2628
+ */
2629
+ GECODE_INT_EXPORT void
2630
+ unary(Home home, const TaskTypeArgs& t,
2631
+ const IntVarArgs& flex, const IntArgs& fix, IntConLevel icl=ICL_DEF);
2632
+
2633
+ /** \brief Post propagators for scheduling optional tasks on unary resources
2634
+ *
2635
+ * Schedule optional tasks with flexible times \a flex, fixed times \a fix,
2636
+ * and whether a task is mandatory \a m (a task is mandatory if the
2637
+ * Boolean variable is 1) on a unary resource. For each
2638
+ * task, it depends on \a t how the flexible and fix times are interpreted:
2639
+ * - If <code>t[i]</code> is <code>TT_FIXP</code>, then
2640
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2641
+ * processing time.
2642
+ * - If <code>t[i]</code> is <code>TT_FIXS</code>, then
2643
+ * <code>flex[i]</code> is the end time and <code>fix[i]</code> is the
2644
+ * start time.
2645
+ * - If <code>t[i]</code> is <code>TT_FIXE</code>, then
2646
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2647
+ * end time.
2648
+ *
2649
+ * The propagator uses the
2650
+ * algorithms from:
2651
+ * Petr Vil�m, Global Constraints in Scheduling, PhD thesis,
2652
+ * Charles University, Prague, Czech Republic, 2007.
2653
+ *
2654
+ * The propagator performs overload checking, detectable precendence
2655
+ * propagation, not-first-not-last propagation, and edge finding.
2656
+ *
2657
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s,
2658
+ * \a p, or \a m are of different size.
2659
+ * - Throws an exception of type Int::OutOfLimits, if \a p contains
2660
+ * an integer that is negative for a task with type <code>TT_FIXP</code>
2661
+ * or that could generate an overflow.
2662
+ */
2663
+ GECODE_INT_EXPORT void
2664
+ unary(Home home, const TaskTypeArgs& t,
2665
+ const IntVarArgs& flex, const IntArgs& fix,
2666
+ const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2667
+
2668
+ /** \brief Post propagators for scheduling tasks on unary resources
2669
+ *
2670
+ * Schedule tasks with start times \a s, processing times \a p, and
2671
+ * end times \a e
2672
+ * on a unary resource. The propagator uses the algorithms from:
2673
+ * Petr Vil�m, Global Constraints in Scheduling, PhD thesis,
2674
+ * Charles University, Prague, Czech Republic, 2007.
2675
+ *
2676
+ * The propagator does not enforce \f$s_i+p_i=e_i\f$, this constraint
2677
+ * has to be posted in addition to ensure consistency of the task bounds.
2678
+ *
2679
+ * The propagator performs overload checking, detectable precendence
2680
+ * propagation, not-first-not-last propagation, and edge finding.
2681
+ *
2682
+ * The processing times are constrained to be non-negative.
2683
+ *
2684
+ * Throws an exception of type Int::ArgumentSizeMismatch, if \a s
2685
+ * and \a p are of different size.
2686
+ */
2687
+ GECODE_INT_EXPORT void
2688
+ unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
2689
+ const IntVarArgs& e, IntConLevel icl=ICL_DEF);
2690
+
2691
+ /** \brief Post propagators for scheduling optional tasks on unary resources
2692
+ *
2693
+ * Schedule optional tasks with start times \a s, processing times \a p,
2694
+ * end times \a e,
2695
+ * and whether a task is mandatory \a m (a task is mandatory if the
2696
+ * Boolean variable is 1) on a unary resource. The propagator uses the
2697
+ * algorithms from:
2698
+ * Petr Vil�m, Global Constraints in Scheduling, PhD thesis,
2699
+ * Charles University, Prague, Czech Republic, 2007.
2700
+ *
2701
+ * The propagator does not enforce \f$s_i+p_i=e_i\f$, this constraint
2702
+ * has to be posted in addition to ensure consistency of the task bounds.
2703
+ *
2704
+ * The processing times are constrained to be non-negative.
2705
+ *
2706
+ * The propagator performs overload checking, detectable precendence
2707
+ * propagation, not-first-not-last propagation, and edge finding.
2708
+ *
2709
+ * Throws an exception of type Int::ArgumentSizeMismatch, if \a s,
2710
+ * \a p, or \a m are of different size.
2711
+ */
2712
+ GECODE_INT_EXPORT void
2713
+ unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
2714
+ const IntVarArgs& e, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2715
+
2716
+ /** \brief Post propagators for scheduling tasks on cumulative resources
2717
+ *
2718
+ * Schedule tasks with flexible times \a flex, fixed times \a fix, and
2719
+ * use capacity \a u on a cumulative resource with capacity \a c. For each
2720
+ * task, it depends on \a t how the flexible and fix times are interpreted:
2721
+ * - If <code>t[i]</code> is <code>TT_FIXP</code>, then
2722
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2723
+ * processing time.
2724
+ * - If <code>t[i]</code> is <code>TT_FIXS</code>, then
2725
+ * <code>flex[i]</code> is the end time and <code>fix[i]</code> is the
2726
+ * start time.
2727
+ * - If <code>t[i]</code> is <code>TT_FIXE</code>, then
2728
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2729
+ * end time.
2730
+ *
2731
+ * The propagator performs time-tabling, overload checking, and
2732
+ * edge-finding. It uses algorithms taken from:
2733
+ *
2734
+ * Petr Vil�m, Max Energy Filtering Algorithm for Discrete Cumulative
2735
+ * Resources, in W. J. van Hoeve and J. N. Hooker, editors, CPAIOR, volume
2736
+ * 5547 of LNCS, pages 294-308. Springer, 2009.
2737
+ *
2738
+ * and
2739
+ *
2740
+ * Petr Vil�m, Edge finding filtering algorithm for discrete cumulative
2741
+ * resources in O(kn log n). In I. P. Gent, editor, CP, volume 5732 of LNCS,
2742
+ * pages 802-816. Springer, 2009.
2743
+ *
2744
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a t, \a s
2745
+ * \a p, or \a u are of different size.
2746
+ * - Throws an exception of type Int::OutOfLimits, if \a p, \a u, or \a c
2747
+ * contain an integer that is not nonnegative, or that could generate
2748
+ * an overflow.
2749
+ */
2750
+ GECODE_INT_EXPORT void
2751
+ cumulative(Home home, int c, const TaskTypeArgs& t,
2752
+ const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
2753
+ IntConLevel icl=ICL_DEF);
2754
+
2755
+
2756
+ /** \brief Post propagators for scheduling tasks on cumulative resources
2757
+ *
2758
+ * \copydoc cumulative(Home,int,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel)
2759
+ */
2760
+ GECODE_INT_EXPORT void
2761
+ cumulative(Home home, IntVar c, const TaskTypeArgs& t,
2762
+ const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
2763
+ IntConLevel icl=ICL_DEF);
2764
+
2765
+ /** \brief Post propagators for scheduling optional tasks on cumulative resources
2766
+ *
2767
+ * Schedule tasks with flexible times \a flex, fixed times \a fix,
2768
+ * use capacity \a u, and whether a task is mandatory \a m (a task is
2769
+ * mandatory if the Boolean variable is 1) on a cumulative resource with
2770
+ * capacity \a c. For each
2771
+ * task, it depends on \a t how the flexible and fix times are interpreted:
2772
+ * - If <code>t[i]</code> is <code>TT_FIXP</code>, then
2773
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2774
+ * processing time.
2775
+ * - If <code>t[i]</code> is <code>TT_FIXS</code>, then
2776
+ * <code>flex[i]</code> is the end time and <code>fix[i]</code> is the
2777
+ * start time.
2778
+ * - If <code>t[i]</code> is <code>TT_FIXE</code>, then
2779
+ * <code>flex[i]</code> is the start time and <code>fix[i]</code> is the
2780
+ * end time.
2781
+ *
2782
+ * The propagator performs time-tabling, overload checking, and
2783
+ * edge-finding. It uses algorithms taken from:
2784
+ *
2785
+ * Petr Vil�m, Max Energy Filtering Algorithm for Discrete Cumulative
2786
+ * Resources, in W. J. van Hoeve and J. N. Hooker, editors, CPAIOR, volume
2787
+ * 5547 of LNCS, pages 294-308. Springer, 2009.
2788
+ *
2789
+ * and
2790
+ *
2791
+ * Petr Vil�m, Edge finding filtering algorithm for discrete cumulative
2792
+ * resources in O(kn log n). In I. P. Gent, editor, CP, volume 5732 of LNCS,
2793
+ * pages 802-816. Springer, 2009.
2794
+ *
2795
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a t, \a s
2796
+ * \a p, or \a u are of different size.
2797
+ * - Throws an exception of type Int::OutOfLimits, if \a p, \a u, or \a c
2798
+ * contain an integer that is not nonnegative, or that could generate
2799
+ * an overflow.
2800
+ */
2801
+ GECODE_INT_EXPORT void
2802
+ cumulative(Home home, int c, const TaskTypeArgs& t,
2803
+ const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
2804
+ const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2805
+
2806
+ /** \brief Post propagators for scheduling optional tasks on cumulative resources
2807
+ * \copydoc cumulative(Home,int,const TaskTypeArgs&,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel)
2808
+ */
2809
+ GECODE_INT_EXPORT void
2810
+ cumulative(Home home, IntVar c, const TaskTypeArgs& t,
2811
+ const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
2812
+ const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2813
+
2814
+ /** \brief Post propagators for scheduling tasks on cumulative resources
2815
+ *
2816
+ * Schedule tasks with start times \a s, processing times \a p, and
2817
+ * use capacity \a u on a cumulative resource with capacity \a c.
2818
+ *
2819
+ * The propagator performs time-tabling, overload checking, and
2820
+ * edge-finding. It uses algorithms taken from:
2821
+ *
2822
+ * Petr Vil�m, Max Energy Filtering Algorithm for Discrete Cumulative
2823
+ * Resources, in W. J. van Hoeve and J. N. Hooker, editors, CPAIOR, volume
2824
+ * 5547 of LNCS, pages 294-308. Springer, 2009.
2825
+ *
2826
+ * and
2827
+ *
2828
+ * Petr Vil�m, Edge finding filtering algorithm for discrete cumulative
2829
+ * resources in O(kn log n). In I. P. Gent, editor, CP, volume 5732 of LNCS,
2830
+ * pages 802-816. Springer, 2009.
2831
+ *
2832
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s
2833
+ * \a p, or \a u are of different size.
2834
+ * - Throws an exception of type Int::OutOfLimits, if \a p, \a u, or \a c
2835
+ * contain an integer that is not nonnegative, or that could generate
2836
+ * an overflow.
2837
+ */
2838
+ GECODE_INT_EXPORT void
2839
+ cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
2840
+ const IntArgs& u, IntConLevel icl=ICL_DEF);
2841
+
2842
+ /** \brief Post propagators for scheduling tasks on cumulative resources
2843
+ * \copydoc cumulative(Home,int,const IntVarArgs&,const IntArgs&,const IntArgs&,IntConLevel)
2844
+ */
2845
+ GECODE_INT_EXPORT void
2846
+ cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
2847
+ const IntArgs& u, IntConLevel icl=ICL_DEF);
2848
+
2849
+ /** \brief Post propagators for scheduling optional tasks on cumulative resources
2850
+ *
2851
+ * Schedule optional tasks with start times \a s, processing times \a p,
2852
+ * used capacity \a u, and whether a task is mandatory \a m (a task is
2853
+ * mandatory if the Boolean variable is 1) on a cumulative resource
2854
+ * with capacity \a c.
2855
+ *
2856
+ * The propagator performs time-tabling, overload checking, and
2857
+ * edge-finding. It uses algorithms taken from:
2858
+ *
2859
+ * Petr Vil�m, Max Energy Filtering Algorithm for Discrete Cumulative
2860
+ * Resources, in W. J. van Hoeve and J. N. Hooker, editors, CPAIOR, volume
2861
+ * 5547 of LNCS, pages 294-308. Springer, 2009.
2862
+ *
2863
+ * and
2864
+ *
2865
+ * Petr Vil�m, Edge finding filtering algorithm for discrete cumulative
2866
+ * resources in O(kn log n). In I. P. Gent, editor, CP, volume 5732 of LNCS,
2867
+ * pages 802-816. Springer, 2009.
2868
+ *
2869
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s,
2870
+ * \a p, \a u, or \a m are of different size.
2871
+ * - Throws an exception of type Int::OutOfLimits, if \a p, \a u, or \a c
2872
+ * contain an integer that is not nonnegative, or that could generate
2873
+ * an overflow.
2874
+ */
2875
+ GECODE_INT_EXPORT void
2876
+ cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
2877
+ const IntArgs& u, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2878
+
2879
+ /** \brief Post propagators for scheduling optional tasks on cumulative resources
2880
+ * \copydoc cumulative(Home,int,const IntVarArgs&,const IntArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel)
2881
+ */
2882
+ GECODE_INT_EXPORT void
2883
+ cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
2884
+ const IntArgs& u, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2885
+
2886
+ /** \brief Post propagators for scheduling tasks on cumulative resources
2887
+ *
2888
+ * Schedule tasks with start times \a s, processing times \a p,
2889
+ * end times \a e, and
2890
+ * use capacity \a u on a cumulative resource with capacity \a c.
2891
+ *
2892
+ * The propagator does not enforce \f$s_i+p_i=e_i\f$, this constraint
2893
+ * has to be posted in addition to ensure consistency of the task bounds.
2894
+ *
2895
+ * The propagator performs time-tabling, overload checking, and
2896
+ * edge-finding. It uses algorithms taken from:
2897
+ *
2898
+ * Petr Vil�m, Max Energy Filtering Algorithm for Discrete Cumulative
2899
+ * Resources, in W. J. van Hoeve and J. N. Hooker, editors, CPAIOR, volume
2900
+ * 5547 of LNCS, pages 294-308. Springer, 2009.
2901
+ *
2902
+ * and
2903
+ *
2904
+ * Petr Vil�m, Edge finding filtering algorithm for discrete cumulative
2905
+ * resources in O(kn log n). In I. P. Gent, editor, CP, volume 5732 of LNCS,
2906
+ * pages 802-816. Springer, 2009.
2907
+ *
2908
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s
2909
+ * \a p, or \a u are of different size.
2910
+ * - Throws an exception of type Int::OutOfLimits, if \a u or \a c
2911
+ * contain an integer that is not nonnegative, or that could generate
2912
+ * an overflow.
2913
+ */
2914
+ GECODE_INT_EXPORT void
2915
+ cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
2916
+ const IntVarArgs& e, const IntArgs& u, IntConLevel icl=ICL_DEF);
2917
+
2918
+ /** \brief Post propagators for scheduling tasks on cumulative resources
2919
+ * \copydoc cumulative(Home,int,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,IntConLevel)
2920
+ */
2921
+ GECODE_INT_EXPORT void
2922
+ cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
2923
+ const IntVarArgs& e, const IntArgs& u, IntConLevel icl=ICL_DEF);
2924
+
2925
+ /** \brief Post propagators for scheduling optional tasks on cumulative resources
2926
+ *
2927
+ * Schedule optional tasks with start times \a s, processing times \a p,
2928
+ * end times \a e,
2929
+ * used capacity \a u, and whether a task is mandatory \a m (a task is
2930
+ * mandatory if the Boolean variable is 1) on a cumulative resource
2931
+ * with capacity \a c.
2932
+ *
2933
+ * The propagator does not enforce \f$s_i+p_i=e_i\f$, this constraint
2934
+ * has to be posted in addition to ensure consistency of the task bounds.
2935
+ *
2936
+ * The propagator performs time-tabling, overload checking, and
2937
+ * edge-finding. It uses algorithms taken from:
2938
+ *
2939
+ * Petr Vil�m, Max Energy Filtering Algorithm for Discrete Cumulative
2940
+ * Resources, in W. J. van Hoeve and J. N. Hooker, editors, CPAIOR, volume
2941
+ * 5547 of LNCS, pages 294-308. Springer, 2009.
2942
+ *
2943
+ * and
2944
+ *
2945
+ * Petr Vil�m, Edge finding filtering algorithm for discrete cumulative
2946
+ * resources in O(kn log n). In I. P. Gent, editor, CP, volume 5732 of LNCS,
2947
+ * pages 802-816. Springer, 2009.
2948
+ *
2949
+ * - Throws an exception of type Int::ArgumentSizeMismatch, if \a s,
2950
+ * \a p, \a u, or \a m are of different size.
2951
+ * - Throws an exception of type Int::OutOfLimits, if \a u or \a c
2952
+ * contain an integer that is not nonnegative, or that could generate
2953
+ * an overflow.
2954
+ */
2955
+ GECODE_INT_EXPORT void
2956
+ cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
2957
+ const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
2958
+ IntConLevel icl=ICL_DEF);
2959
+
2960
+ /** \brief Post propagators for scheduling optional tasks on cumulative resources
2961
+ * \copydoc cumulative(Home,int,const IntVarArgs&,const IntVarArgs&,const IntVarArgs&,const IntArgs&,const BoolVarArgs&,IntConLevel)
2962
+ */
2963
+ GECODE_INT_EXPORT void
2964
+ cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
2965
+ const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
2966
+ IntConLevel icl=ICL_DEF);
2967
+ //@}
2968
+
2969
+
2970
+ /**
2971
+ * \defgroup TaskModelIntGraph Graph constraints
2972
+ * \ingroup TaskModelInt
2973
+ */
2974
+ //@{
2975
+ /** \brief Post propagator such that \a x forms a circuit
2976
+ *
2977
+ * \a x forms a circuit if the graph with edges \f$i\to j\f$ where
2978
+ * \f$x_i=j\f$ has a single cycle covering all nodes.
2979
+ *
2980
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
2981
+ * other values for \a icl), where this refers to whether value or
2982
+ * domain consistent distinct in enforced on \a x.
2983
+ *
2984
+ * Throws the following exceptions:
2985
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
2986
+ * multiply.
2987
+ * - Int::TooFewArguments, if \a x has no elements.
2988
+ */
2989
+ GECODE_INT_EXPORT void
2990
+ circuit(Home home, const IntVarArgs& x,
2991
+ IntConLevel icl=ICL_DEF);
2992
+ /** \brief Post propagator such that \a x forms a circuit
2993
+ *
2994
+ * \a x forms a circuit if the graph with edges \f$i\to j\f$ where
2995
+ * \f$x_{i-\text{offset}}=j\f$ has a single cycle covering all nodes.
2996
+ *
2997
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
2998
+ * other values for \a icl), where this refers to whether value or
2999
+ * domain consistent distinct in enforced on \a x.
3000
+ *
3001
+ * Throws the following exceptions:
3002
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3003
+ * multiply.
3004
+ * - Int::TooFewArguments, if \a x has no elements.
3005
+ * - Int::OutOfLimits, if \a offset is negative.
3006
+ */
3007
+ GECODE_INT_EXPORT void
3008
+ circuit(Home home, int offset, const IntVarArgs& x,
3009
+ IntConLevel icl=ICL_DEF);
3010
+ /** \brief Post propagator such that \a x forms a circuit with costs \a y and \a z
3011
+ *
3012
+ * \a x forms a circuit if the graph with edges \f$i\to j\f$ where
3013
+ * \f$x_i=j\f$ has a single cycle covering all nodes.
3014
+ * The integer array
3015
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3016
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3017
+ * the entire circuit. The variables \a y define the cost
3018
+ * of the edge in \a x: that is, if \f$x_i=j\f$ then \f$y_i=c_{i*n+j}\f$.
3019
+ *
3020
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3021
+ * other values for \a icl), where this refers to whether value or
3022
+ * domain consistent distinct in enforced on \a x for circuit.
3023
+ *
3024
+ * Throws the following exceptions:
3025
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3026
+ * multiply.
3027
+ * - Int::TooFewArguments, if \a x has no elements.
3028
+ * - Int::ArgumentSizeMismacth, if \a x and \a y do not have the same
3029
+ * size or if \f$|x|\times|x|\neq|c|\f$.
3030
+ */
3031
+ GECODE_INT_EXPORT void
3032
+ circuit(Home home,
3033
+ const IntArgs& c,
3034
+ const IntVarArgs& x, const IntVarArgs& y, IntVar z,
3035
+ IntConLevel icl=ICL_DEF);
3036
+ /** \brief Post propagator such that \a x forms a circuit with costs \a y and \a z
3037
+ *
3038
+ * \a x forms a circuit if the graph with edges \f$i\to j\f$ where
3039
+ * \f$x_{i-\text{offset}}=j\f$ has a single cycle covering all nodes.
3040
+ * The integer array
3041
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3042
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3043
+ * the entire circuit. The variables \a y define the cost
3044
+ * of the edge in \a x: that is, if \f$x_i=j\f$ then \f$y_i=c_{i*n+j}\f$.
3045
+ *
3046
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3047
+ * other values for \a icl), where this refers to whether value or
3048
+ * domain consistent distinct in enforced on \a x for circuit.
3049
+ *
3050
+ * Throws the following exceptions:
3051
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3052
+ * multiply.
3053
+ * - Int::TooFewArguments, if \a x has no elements.
3054
+ * - Int::ArgumentSizeMismacth, if \a x and \a y do not have the same
3055
+ * size or if \f$|x|\times|x|\neq|c|\f$.
3056
+ * - Int::OutOfLimits, if \a offset is negative.
3057
+ */
3058
+ GECODE_INT_EXPORT void
3059
+ circuit(Home home,
3060
+ const IntArgs& c, int offset,
3061
+ const IntVarArgs& x, const IntVarArgs& y, IntVar z,
3062
+ IntConLevel icl=ICL_DEF);
3063
+ /** \brief Post propagator such that \a x forms a circuit with cost \a z
3064
+ *
3065
+ * \a x forms a circuit if the graph with edges \f$i\to j\f$ where
3066
+ * \f$x_i=j\f$ has a single cycle covering all nodes. The integer array
3067
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3068
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3069
+ * the entire circuit.
3070
+ *
3071
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3072
+ * other values for \a icl), where this refers to whether value or
3073
+ * domain consistent distinct in enforced on \a x for circuit.
3074
+ *
3075
+ * Throws the following exceptions:
3076
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3077
+ * multiply.
3078
+ * - Int::TooFewArguments, if \a x has no elements.
3079
+ * - Int::ArgumentSizeMismacth, if \f$|x|\times|x|\neq|c|\f$.
3080
+ */
3081
+ GECODE_INT_EXPORT void
3082
+ circuit(Home home,
3083
+ const IntArgs& c,
3084
+ const IntVarArgs& x, IntVar z,
3085
+ IntConLevel icl=ICL_DEF);
3086
+ /** \brief Post propagator such that \a x forms a circuit with cost \a z
3087
+ *
3088
+ * \a x forms a circuit if the graph with edges \f$i\to j\f$ where
3089
+ * \f$x_{i-\text{offset}}=j\f$ has a single cycle covering all nodes.
3090
+ * The integer array
3091
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3092
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3093
+ * the entire circuit.
3094
+ *
3095
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3096
+ * other values for \a icl), where this refers to whether value or
3097
+ * domain consistent distinct in enforced on \a x for circuit.
3098
+ *
3099
+ * Throws the following exceptions:
3100
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3101
+ * multiply.
3102
+ * - Int::TooFewArguments, if \a x has no elements.
3103
+ * - Int::ArgumentSizeMismacth, if \f$|x|\times|x|\neq|c|\f$.
3104
+ * - Int::OutOfLimits, if \a offset is negative.
3105
+ */
3106
+ GECODE_INT_EXPORT void
3107
+ circuit(Home home,
3108
+ const IntArgs& c, int offset,
3109
+ const IntVarArgs& x, IntVar z,
3110
+ IntConLevel icl=ICL_DEF);
3111
+ /** \brief Post propagator such that \a x forms a Hamiltonian path
3112
+ *
3113
+ * \a x forms a Hamiltonian path if the graph with edges \f$i\to j\f$
3114
+ * where \f$x_i=j\f$ visits all nodes exactly once. The path starts at
3115
+ * node \a s and the successor of the last node \a e is equal to \f$|x|\f$.
3116
+ *
3117
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3118
+ * other values for \a icl), where this refers to whether value or
3119
+ * domain consistent distinct in enforced on \a x.
3120
+ *
3121
+ * Throws the following exceptions:
3122
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3123
+ * multiply.
3124
+ * - Int::TooFewArguments, if \a x has no elements.
3125
+ */
3126
+ GECODE_INT_EXPORT void
3127
+ path(Home home, const IntVarArgs& x, IntVar s, IntVar e,
3128
+ IntConLevel icl=ICL_DEF);
3129
+ /** \brief Post propagator such that \a x forms a Hamiltonian path
3130
+ *
3131
+ * \a x forms a Hamiltonian path if the graph with edges \f$i\to j\f$
3132
+ * where \f$x_{i-\text{offset}}=j\f$ visits all nodes exactly once.
3133
+ * The path starts at node \a s and the successor of the last node \a e
3134
+ * is equal to \f$|x|+\text{offset}\f$.
3135
+ *
3136
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3137
+ * other values for \a icl), where this refers to whether value or
3138
+ * domain consistent distinct in enforced on \a x.
3139
+ *
3140
+ * Throws the following exceptions:
3141
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3142
+ * multiply.
3143
+ * - Int::TooFewArguments, if \a x has no elements.
3144
+ * - Int::OutOfLimits, if \a offset is negative.
3145
+ */
3146
+ GECODE_INT_EXPORT void
3147
+ path(Home home, int offset, const IntVarArgs& x, IntVar s, IntVar e,
3148
+ IntConLevel icl=ICL_DEF);
3149
+ /** \brief Post propagator such that \a x forms a Hamiltonian path with costs \a y and \a z
3150
+ *
3151
+ * \a x forms a Hamiltonian path if the graph with edges \f$i\to j\f$
3152
+ * where \f$x_i=j\f$ visits all nodes exactly once. The path starts at node
3153
+ * \a s and the successor of
3154
+ * the last node \a e is equal to \f$|x|\f$. The integer array
3155
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3156
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3157
+ * the entire path. The variables \a y define the cost
3158
+ * of the edge in \a x: that is, if \f$x_i=j\f$ then \f$y_i=c_{i*n+j}\f$.
3159
+ *
3160
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3161
+ * other values for \a icl), where this refers to whether value or
3162
+ * domain consistent distinct in enforced on \a x for circuit.
3163
+ *
3164
+ * Throws the following exceptions:
3165
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3166
+ * multiply.
3167
+ * - Int::TooFewArguments, if \a x has no elements.
3168
+ * - Int::ArgumentSizeMismacth, if \a x and \a y do not have the same
3169
+ * size or if \f$|x|\times|x|\neq|c|\f$.
3170
+ */
3171
+ GECODE_INT_EXPORT void
3172
+ path(Home home,
3173
+ const IntArgs& c,
3174
+ const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
3175
+ IntConLevel icl=ICL_DEF);
3176
+ /** \brief Post propagator such that \a x forms a Hamiltonian path with costs \a y and \a z
3177
+ *
3178
+ * \a x forms a Hamiltonian path if the graph with edges \f$i\to j\f$
3179
+ * where \f$x_{i-\text{offset}}=j\f$ visits all nodes exactly once.
3180
+ * The path starts at node \a s and the successor of
3181
+ * the last node \a e is equal to \f$|x|+\text{offset}\f$.
3182
+ * The integer array
3183
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3184
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3185
+ * the entire path. The variables \a y define the cost
3186
+ * of the edge in \a x: that is, if \f$x_i=j\f$ then \f$y_i=c_{i*n+j}\f$.
3187
+ *
3188
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3189
+ * other values for \a icl), where this refers to whether value or
3190
+ * domain consistent distinct in enforced on \a x for circuit.
3191
+ *
3192
+ * Throws the following exceptions:
3193
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3194
+ * multiply.
3195
+ * - Int::TooFewArguments, if \a x has no elements.
3196
+ * - Int::ArgumentSizeMismacth, if \a x and \a y do not have the same
3197
+ * size or if \f$|x|\times|x|\neq|c|\f$.
3198
+ * - Int::OutOfLimits, if \a offset is negative.
3199
+ */
3200
+ GECODE_INT_EXPORT void
3201
+ path(Home home,
3202
+ const IntArgs& c, int offset,
3203
+ const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
3204
+ IntConLevel icl=ICL_DEF);
3205
+ /** \brief Post propagator such that \a x forms a Hamiltonian path with cost \a z
3206
+ *
3207
+ * \a x forms a Hamiltonian path if the graph with edges \f$i\to j\f$
3208
+ * where \f$x_i=j\f$ visits all nodes exactly once. The path starts at node
3209
+ * \a s and the successor of
3210
+ * the last node \a e is equal to \f$|x|\f$. The integer array
3211
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3212
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3213
+ * the entire path.
3214
+ *
3215
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3216
+ * other values for \a icl), where this refers to whether value or
3217
+ * domain consistent distinct in enforced on \a x for circuit.
3218
+ *
3219
+ * Throws the following exceptions:
3220
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3221
+ * multiply.
3222
+ * - Int::TooFewArguments, if \a x has no elements.
3223
+ * - Int::ArgumentSizeMismacth, if \f$|x|\times|x|\neq|c|\f$.
3224
+ */
3225
+ GECODE_INT_EXPORT void
3226
+ path(Home home,
3227
+ const IntArgs& c,
3228
+ const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
3229
+ IntConLevel icl=ICL_DEF);
3230
+ /** \brief Post propagator such that \a x forms a Hamiltonian path with cost \a z
3231
+ *
3232
+ * \a x forms a Hamiltonian path if the graph with edges \f$i\to j\f$
3233
+ * where \f$x_{i-\text{offset}}=j\f$ visits all nodes exactly once.
3234
+ * The path starts at node \a s and the successor of
3235
+ * the last node \a e is equal to \f$|x|+\text{offset}\f$.
3236
+ * The integer array
3237
+ * \a c gives the costs of all possible edges where \f$c_{i*|x|+j}\f$ is
3238
+ * the cost of the edge \f$i\to j\f$. The variable \a z is the cost of
3239
+ * the entire circuit.
3240
+ *
3241
+ * Supports domain (\a icl = ICL_DOM) and value propagation (all
3242
+ * other values for \a icl), where this refers to whether value or
3243
+ * domain consistent distinct in enforced on \a x for circuit.
3244
+ *
3245
+ * Throws the following exceptions:
3246
+ * - Int::ArgumentSame, if \a x contains the same unassigned variable
3247
+ * multiply.
3248
+ * - Int::TooFewArguments, if \a x has no elements.
3249
+ * - Int::ArgumentSizeMismacth, if \f$|x|\times|x|\neq|c|\f$.
3250
+ * - Int::OutOfLimits, if \a offset is negative.
3251
+ */
3252
+ GECODE_INT_EXPORT void
3253
+ path(Home home,
3254
+ const IntArgs& c, int offset,
3255
+ const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
3256
+ IntConLevel icl=ICL_DEF);
3257
+ //@}
3258
+
3259
+
3260
+
3261
+ /**
3262
+ * \defgroup TaskModelIntExec Synchronized execution
3263
+ * \ingroup TaskModelInt
3264
+ *
3265
+ * Synchronized execution executes a function or a static member function
3266
+ * when a certain event happends.
3267
+ */
3268
+ //@{
3269
+ /// Execute \a c when \a x becomes assigned
3270
+ GECODE_INT_EXPORT void
3271
+ wait(Home home, IntVar x, void (*c)(Space& home),
3272
+ IntConLevel icl=ICL_DEF);
3273
+ /// Execute \a c when \a x becomes assigned
3274
+ GECODE_INT_EXPORT void
3275
+ wait(Home home, BoolVar x, void (*c)(Space& home),
3276
+ IntConLevel icl=ICL_DEF);
3277
+ /// Execute \a c when all variables in \a x become assigned
3278
+ GECODE_INT_EXPORT void
3279
+ wait(Home home, const IntVarArgs& x, void (*c)(Space& home),
3280
+ IntConLevel icl=ICL_DEF);
3281
+ /// Execute \a c when all variables in \a x become assigned
3282
+ GECODE_INT_EXPORT void
3283
+ wait(Home home, const BoolVarArgs& x, void (*c)(Space& home),
3284
+ IntConLevel icl=ICL_DEF);
3285
+ /// Execute \a t (then) when \a x is assigned one, and \a e (else) otherwise
3286
+ GECODE_INT_EXPORT void
3287
+ when(Home home, BoolVar x,
3288
+ void (*t)(Space& home), void (*e)(Space& home)= NULL,
3289
+ IntConLevel icl=ICL_DEF);
3290
+ //@}
3291
+
3292
+
3293
+ /**
3294
+ * \defgroup TaskModelIntUnshare Unsharing variables
3295
+ * \ingroup TaskModelInt
3296
+ *
3297
+ * Unsharing replaces multiple occurences of the same variable by
3298
+ * fresh yet equal (enforced through propagators for equality)
3299
+ * variables: after unsharing a variable appears at most once. Note
3300
+ * that this is only done for not yet assigned variables (as all
3301
+ * propagators can handle multiple occurences of the same variable
3302
+ * provided it is already assigned).
3303
+ *
3304
+ * Unsharing is useful for constraints that only accept variable
3305
+ * arrays without multiple occurences of the same variable, for
3306
+ * example extensional.
3307
+ *
3308
+ */
3309
+ //@{
3310
+ /**
3311
+ * \brief Replace multiple variable occurences in \a x by fresh variables
3312
+ *
3313
+ * Supports domain consistency (\a icl = ICL_DOM, default) and
3314
+ * bounds consistency (\a icl = ICL_BND).
3315
+ *
3316
+ */
3317
+ GECODE_INT_EXPORT void
3318
+ unshare(Home home, IntVarArgs& x,
3319
+ IntConLevel icl=ICL_DEF);
3320
+ /// Replace multiple variable occurences in \a x by fresh variables
3321
+ GECODE_INT_EXPORT void
3322
+ unshare(Home home, BoolVarArgs& x,
3323
+ IntConLevel icl=ICL_DEF);
3324
+ //@}
3325
+
3326
+
3327
+ /**
3328
+ * \defgroup TaskModelIntBranch Branching
3329
+ * \ingroup TaskModelInt
3330
+ */
3331
+ //@{
3332
+ /// Which variable to select for branching
3333
+ enum IntVarBranch {
3334
+ INT_VAR_NONE = 0, ///< First unassigned
3335
+ INT_VAR_RND, ///< Random (uniform, for tie breaking)
3336
+ INT_VAR_DEGREE_MIN, ///< With smallest degree
3337
+ INT_VAR_DEGREE_MAX, ///< With largest degree
3338
+ INT_VAR_AFC_MIN, ///< With smallest accumulated failure count
3339
+ INT_VAR_AFC_MAX, ///< With largest accumulated failure count
3340
+ INT_VAR_MIN_MIN, ///< With smallest min
3341
+ INT_VAR_MIN_MAX, ///< With largest min
3342
+ INT_VAR_MAX_MIN, ///< With smallest max
3343
+ INT_VAR_MAX_MAX, ///< With largest max
3344
+ INT_VAR_SIZE_MIN, ///< With smallest domain size
3345
+ INT_VAR_SIZE_MAX, ///< With largest domain size
3346
+ INT_VAR_SIZE_DEGREE_MIN, ///< With smallest domain size divided by degree
3347
+ INT_VAR_SIZE_DEGREE_MAX, ///< With largest domain size divided by degree
3348
+ INT_VAR_SIZE_AFC_MIN, ///< With smallest domain size divided by accumulated failure count
3349
+ INT_VAR_SIZE_AFC_MAX, ///< With largest domain size divided by accumulated failure count
3350
+ /** \brief With smallest min-regret
3351
+ *
3352
+ * The min-regret of a variable is the difference between the
3353
+ * smallest and second-smallest value still in the domain.
3354
+ */
3355
+ INT_VAR_REGRET_MIN_MIN,
3356
+ /** \brief With largest min-regret
3357
+ *
3358
+ * The min-regret of a variable is the difference between the
3359
+ * smallest and second-smallest value still in the domain.
3360
+ */
3361
+ INT_VAR_REGRET_MIN_MAX,
3362
+ /** \brief With smallest max-regret
3363
+ *
3364
+ * The max-regret of a variable is the difference between the
3365
+ * largest and second-largest value still in the domain.
3366
+ */
3367
+ INT_VAR_REGRET_MAX_MIN,
3368
+ /** \brief With largest max-regret
3369
+ *
3370
+ * The max-regret of a variable is the difference between the
3371
+ * largest and second-largest value still in the domain.
3372
+ */
3373
+ INT_VAR_REGRET_MAX_MAX
3374
+ };
3375
+
3376
+ /// Which values to select first for branching
3377
+ enum IntValBranch {
3378
+ INT_VAL_MIN, ///< Select smallest value
3379
+ INT_VAL_MED, ///< Select greatest value not greater than the median
3380
+ INT_VAL_MAX, ///< Select largest value
3381
+ INT_VAL_RND, ///< Select random value
3382
+ INT_VAL_SPLIT_MIN, ///< Select values not greater than mean of smallest and largest value
3383
+ INT_VAL_SPLIT_MAX, ///< Select values greater than mean of smallest and largest value
3384
+ INT_VAL_RANGE_MIN, ///< Select the smallest range of the variable domain if it has sevral ranges, otherwise select values not greater than mean of smallest and largest value
3385
+ INT_VAL_RANGE_MAX, ///< Select the largest range of the variable domain if it has sevral ranges, otherwise select values greater than mean of smallest and largest value
3386
+ INT_VALUES_MIN, ///< Try all values starting from smallest
3387
+ INT_VALUES_MAX ///< Try all values starting from largest
3388
+ };
3389
+
3390
+ /// Branch over \a x with variable selection \a vars and value selection \a vals
3391
+ GECODE_INT_EXPORT void
3392
+ branch(Home home, const IntVarArgs& x,
3393
+ IntVarBranch vars, IntValBranch vals,
3394
+ const VarBranchOptions& o_vars = VarBranchOptions::def,
3395
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3396
+ /// Branch over \a x with tie-breaking variable selection \a vars and value selection \a vals
3397
+ GECODE_INT_EXPORT void
3398
+ branch(Home home, const IntVarArgs& x,
3399
+ const TieBreakVarBranch<IntVarBranch>& vars, IntValBranch vals,
3400
+ const TieBreakVarBranchOptions& o_vars = TieBreakVarBranchOptions::def,
3401
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3402
+ /// Branch over \a x with value selection \a vals
3403
+ GECODE_INT_EXPORT void
3404
+ branch(Home home, IntVar x, IntValBranch vals,
3405
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3406
+ /// Branch over \a x with variable selection \a vars and value selection \a vals
3407
+ GECODE_INT_EXPORT void
3408
+ branch(Home home, const BoolVarArgs& x,
3409
+ IntVarBranch vars, IntValBranch vals,
3410
+ const VarBranchOptions& o_vars = VarBranchOptions::def,
3411
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3412
+ /// Branch over \a x with tie-breaking variable selection \a vars and value selection \a vals
3413
+ GECODE_INT_EXPORT void
3414
+ branch(Home home, const BoolVarArgs& x,
3415
+ const TieBreakVarBranch<IntVarBranch>& vars, IntValBranch vals,
3416
+ const TieBreakVarBranchOptions& o_vars = TieBreakVarBranchOptions::def,
3417
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3418
+ /// Branch over \a x with value selection \a vals
3419
+ GECODE_INT_EXPORT void
3420
+ branch(Home home, BoolVar x, IntValBranch vals,
3421
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3422
+
3423
+ //@}
3424
+
3425
+ /**
3426
+ * \defgroup TaskModelIntAssign Assigning
3427
+ * \ingroup TaskModelInt
3428
+ */
3429
+ //@{
3430
+ /// Which value to select for assignment
3431
+ enum IntAssign {
3432
+ INT_ASSIGN_MIN, ///< Select smallest value
3433
+ INT_ASSIGN_MED, ///< Select greatest element not greater than the median
3434
+ INT_ASSIGN_MAX, ///< Select maximum value
3435
+ INT_ASSIGN_RND ///< Select random value
3436
+ };
3437
+
3438
+ /// Assign all \a x with value selection \a vals
3439
+ GECODE_INT_EXPORT void
3440
+ assign(Home home, const IntVarArgs& x, IntAssign vals,
3441
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3442
+ /// Assign \a x with value selection \a vals
3443
+ GECODE_INT_EXPORT void
3444
+ assign(Home home, IntVar x, IntAssign vals,
3445
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3446
+ /// Assign all \a x with value selection \a vals
3447
+ GECODE_INT_EXPORT void
3448
+ assign(Home home, const BoolVarArgs& x, IntAssign vals,
3449
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3450
+ /// Assign \a x with value selection \a vals
3451
+ GECODE_INT_EXPORT void
3452
+ assign(Home home, BoolVar x, IntAssign vals,
3453
+ const ValBranchOptions& o_vals = ValBranchOptions::def);
3454
+
3455
+ //@}
3456
+
3457
+ /** Print DFA \a d
3458
+ * \relates Gecode::DFA
3459
+ */
3460
+ template<class Char, class Traits>
3461
+ std::basic_ostream<Char,Traits>&
3462
+ operator <<(std::basic_ostream<Char,Traits>& os, const DFA& d);
3463
+
3464
+ /** Print TupleSet \a ts
3465
+ * \relates Gecode::TupleSet
3466
+ */
3467
+ template<class Char, class Traits>
3468
+ std::basic_ostream<Char,Traits>&
3469
+ operator <<(std::basic_ostream<Char,Traits>& os, const TupleSet& ts);
3470
+
3471
+ }
3472
+
3473
+ #endif
3474
+
3475
+ // IFDEF: GECODE_HAS_INT_VARS
3476
+ // STATISTICS: int-post
3477
+