dep-selector-libgecode 1.0.0.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (806) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +26 -0
  3. data/Gemfile +3 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +29 -0
  6. data/Rakefile +20 -0
  7. data/dep-selector-libgecode.gemspec +25 -0
  8. data/ext/libgecode3/Makefile +8 -0
  9. data/ext/libgecode3/extconf.rb +57 -0
  10. data/ext/libgecode3/vendor/gecode-3.7.3/LICENSE +25 -0
  11. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.contribs +88 -0
  12. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.dep +11307 -0
  13. data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.in +1795 -0
  14. data/ext/libgecode3/vendor/gecode-3.7.3/changelog.in +6132 -0
  15. data/ext/libgecode3/vendor/gecode-3.7.3/configure +13054 -0
  16. data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac +356 -0
  17. data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac.in +352 -0
  18. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/README +26 -0
  19. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/AbstractWorker.hh +42 -0
  20. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Doxyfile +263 -0
  21. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Makefile.in.in +162 -0
  22. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.cc +82 -0
  23. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.hh +124 -0
  24. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.cc +306 -0
  25. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.hh +166 -0
  26. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.cc +239 -0
  27. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.hh +140 -0
  28. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/README +6 -0
  29. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.cc +253 -0
  30. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.hh +112 -0
  31. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.cc +59 -0
  32. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.hh +49 -0
  33. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableBranching.hh +34 -0
  34. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.cc +61 -0
  35. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.hh +45 -0
  36. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.cc +48 -0
  37. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.hh +64 -0
  38. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkComparators.hh +67 -0
  39. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.cc +376 -0
  40. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.hh +96 -0
  41. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.cc +285 -0
  42. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.hh +70 -0
  43. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/clean +5 -0
  44. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure +2637 -0
  45. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure.ac +44 -0
  46. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myDom.cc +59 -0
  47. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.cc +119 -0
  48. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.hh +79 -0
  49. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qecode.hh +56 -0
  50. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.cc +41 -0
  51. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.hh +43 -0
  52. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.cc +268 -0
  53. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.hh +56 -0
  54. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.cc +163 -0
  55. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.hh +63 -0
  56. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.cc +423 -0
  57. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.hh +84 -0
  58. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/shortdesc.ac +1 -0
  59. data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/vartype.hh +31 -0
  60. data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.conf.in +1245 -0
  61. data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.hh.in +594 -0
  62. data/ext/libgecode3/vendor/gecode-3.7.3/examples/all-interval.cpp +136 -0
  63. data/ext/libgecode3/vendor/gecode-3.7.3/examples/alpha.cpp +151 -0
  64. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bacp.cpp +596 -0
  65. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bibd.cpp +182 -0
  66. data/ext/libgecode3/vendor/gecode-3.7.3/examples/bin-packing.cpp +25363 -0
  67. data/ext/libgecode3/vendor/gecode-3.7.3/examples/black-hole.cpp +413 -0
  68. data/ext/libgecode3/vendor/gecode-3.7.3/examples/car-sequencing.cpp +653 -0
  69. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crew.cpp +269 -0
  70. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crossword.cpp +3954 -0
  71. data/ext/libgecode3/vendor/gecode-3.7.3/examples/crowded-chess.cpp +424 -0
  72. data/ext/libgecode3/vendor/gecode-3.7.3/examples/dominating-queens.cpp +170 -0
  73. data/ext/libgecode3/vendor/gecode-3.7.3/examples/domino.cpp +346 -0
  74. data/ext/libgecode3/vendor/gecode-3.7.3/examples/donald.cpp +135 -0
  75. data/ext/libgecode3/vendor/gecode-3.7.3/examples/efpa.cpp +323 -0
  76. data/ext/libgecode3/vendor/gecode-3.7.3/examples/eq20.cpp +128 -0
  77. data/ext/libgecode3/vendor/gecode-3.7.3/examples/golf.cpp +190 -0
  78. data/ext/libgecode3/vendor/gecode-3.7.3/examples/golomb-ruler.cpp +157 -0
  79. data/ext/libgecode3/vendor/gecode-3.7.3/examples/graph-color.cpp +425 -0
  80. data/ext/libgecode3/vendor/gecode-3.7.3/examples/grocery.cpp +116 -0
  81. data/ext/libgecode3/vendor/gecode-3.7.3/examples/hamming.cpp +144 -0
  82. data/ext/libgecode3/vendor/gecode-3.7.3/examples/ind-set.cpp +144 -0
  83. data/ext/libgecode3/vendor/gecode-3.7.3/examples/kakuro.cpp +627 -0
  84. data/ext/libgecode3/vendor/gecode-3.7.3/examples/knights.cpp +430 -0
  85. data/ext/libgecode3/vendor/gecode-3.7.3/examples/langford-number.cpp +218 -0
  86. data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-sequence.cpp +133 -0
  87. data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-square.cpp +141 -0
  88. data/ext/libgecode3/vendor/gecode-3.7.3/examples/minesweeper.cpp +311 -0
  89. data/ext/libgecode3/vendor/gecode-3.7.3/examples/money.cpp +132 -0
  90. data/ext/libgecode3/vendor/gecode-3.7.3/examples/nonogram.cpp +1215 -0
  91. data/ext/libgecode3/vendor/gecode-3.7.3/examples/open-shop.cpp +412 -0
  92. data/ext/libgecode3/vendor/gecode-3.7.3/examples/ortho-latin.cpp +183 -0
  93. data/ext/libgecode3/vendor/gecode-3.7.3/examples/partition.cpp +145 -0
  94. data/ext/libgecode3/vendor/gecode-3.7.3/examples/pentominoes.cpp +952 -0
  95. data/ext/libgecode3/vendor/gecode-3.7.3/examples/perfect-square.cpp +317 -0
  96. data/ext/libgecode3/vendor/gecode-3.7.3/examples/photo.cpp +166 -0
  97. data/ext/libgecode3/vendor/gecode-3.7.3/examples/queen-armies.cpp +335 -0
  98. data/ext/libgecode3/vendor/gecode-3.7.3/examples/queens.cpp +214 -0
  99. data/ext/libgecode3/vendor/gecode-3.7.3/examples/radiotherapy.cpp +943 -0
  100. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sat.cpp +260 -0
  101. data/ext/libgecode3/vendor/gecode-3.7.3/examples/schurs-lemma.cpp +142 -0
  102. data/ext/libgecode3/vendor/gecode-3.7.3/examples/scowl.hpp +14149 -0
  103. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sports-league.cpp +353 -0
  104. data/ext/libgecode3/vendor/gecode-3.7.3/examples/steel-mill.cpp +654 -0
  105. data/ext/libgecode3/vendor/gecode-3.7.3/examples/steiner.cpp +170 -0
  106. data/ext/libgecode3/vendor/gecode-3.7.3/examples/sudoku.cpp +2294 -0
  107. data/ext/libgecode3/vendor/gecode-3.7.3/examples/tsp.cpp +339 -0
  108. data/ext/libgecode3/vendor/gecode-3.7.3/examples/warehouses.cpp +185 -0
  109. data/ext/libgecode3/vendor/gecode-3.7.3/examples/word-square.cpp +168 -0
  110. data/ext/libgecode3/vendor/gecode-3.7.3/gecode.m4 +1272 -0
  111. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver.hh +602 -0
  112. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.cpp +435 -0
  113. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.hpp +418 -0
  114. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.cpp +104 -0
  115. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.hpp +388 -0
  116. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc.hh +417 -0
  117. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/CHANGES +63 -0
  118. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/ast.hh +492 -0
  119. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/conexpr.hh +82 -0
  120. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.cpp +49 -0
  121. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.hh +47 -0
  122. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.pro +51 -0
  123. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/test_myplugin.fzn +1 -0
  124. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/flatzinc.cpp +1056 -0
  125. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.lxx +137 -0
  126. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.yy.cpp +2458 -0
  127. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_different_int.mzn +37 -0
  128. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_equal_int.mzn +37 -0
  129. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/among.mzn +37 -0
  130. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_int.mzn +37 -0
  131. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_set.mzn +38 -0
  132. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_int.mzn +37 -0
  133. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_set.mzn +38 -0
  134. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing.mzn +44 -0
  135. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_capa.mzn +45 -0
  136. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_load.mzn +45 -0
  137. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/circuit.mzn +40 -0
  138. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/count.mzn +37 -0
  139. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/cumulative.mzn +53 -0
  140. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_bool.mzn +37 -0
  141. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_int.mzn +37 -0
  142. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/diffn.mzn +44 -0
  143. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/disjoint.mzn +37 -0
  144. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/distribute.mzn +46 -0
  145. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_int.mzn +40 -0
  146. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_set.mzn +38 -0
  147. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/gecode.mzn +98 -0
  148. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality.mzn +43 -0
  149. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_closed.mzn +39 -0
  150. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up.mzn +40 -0
  151. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up_closed.mzn +40 -0
  152. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_bool.mzn +37 -0
  153. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_int.mzn +37 -0
  154. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/int_set_channel.mzn +49 -0
  155. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/inverse.mzn +42 -0
  156. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_less_int.mzn +42 -0
  157. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_lesseq_int.mzn +42 -0
  158. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/link_set_to_booleans.mzn +47 -0
  159. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/maximum_int.mzn +37 -0
  160. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_bool.mzn +41 -0
  161. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_int.mzn +41 -0
  162. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/minimum_int.mzn +37 -0
  163. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/nvalue.mzn +37 -0
  164. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/partition_set.mzn +42 -0
  165. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/precedence.mzn +41 -0
  166. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/range.mzn +51 -0
  167. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/redefinitions.mzn +62 -0
  168. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/regular.mzn +38 -0
  169. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/roots.mzn +63 -0
  170. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sort.mzn +37 -0
  171. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sum_pred.mzn +42 -0
  172. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_bool.mzn +37 -0
  173. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_int.mzn +37 -0
  174. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/option.hh +70 -0
  175. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.hh +265 -0
  176. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.cpp +3571 -0
  177. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.hh +164 -0
  178. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.yxx +1604 -0
  179. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/plugin.hh +83 -0
  180. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.cpp +1812 -0
  181. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.hh +71 -0
  182. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/symboltable.hh +96 -0
  183. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/varspec.hh +163 -0
  184. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist.hh +298 -0
  185. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.cpp +288 -0
  186. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hh +110 -0
  187. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hpp +84 -0
  188. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.cpp +673 -0
  189. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.hh +65 -0
  190. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.cpp +120 -0
  191. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.hpp +207 -0
  192. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hh +69 -0
  193. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hpp +70 -0
  194. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.cpp +341 -0
  195. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.hh +129 -0
  196. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.cpp +82 -0
  197. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hh +160 -0
  198. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hpp +210 -0
  199. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hh +215 -0
  200. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hpp +271 -0
  201. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.cpp +138 -0
  202. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.hh +81 -0
  203. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hh +96 -0
  204. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hpp +126 -0
  205. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.cpp +90 -0
  206. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.hh +59 -0
  207. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.cpp +190 -0
  208. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.hh +96 -0
  209. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.cpp +809 -0
  210. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.hh +294 -0
  211. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.cpp +369 -0
  212. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hh +221 -0
  213. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hpp +191 -0
  214. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/mygist.cpp +80 -0
  215. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/standalone_example.pro +18 -0
  216. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.cpp +90 -0
  217. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.hh +82 -0
  218. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.cpp +175 -0
  219. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.hh +75 -0
  220. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.cpp +1430 -0
  221. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.hh +369 -0
  222. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.cpp +473 -0
  223. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hh +237 -0
  224. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hpp +220 -0
  225. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/zoomToFitIcon.hpp +114 -0
  226. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int.hh +3477 -0
  227. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.cpp +185 -0
  228. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.hh +666 -0
  229. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/abs.hpp +236 -0
  230. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/divmod.hpp +350 -0
  231. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/max.hpp +398 -0
  232. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/mult.hpp +750 -0
  233. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqr.hpp +377 -0
  234. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqrt.hpp +217 -0
  235. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array-traits.hpp +147 -0
  236. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.cpp +113 -0
  237. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.hpp +111 -0
  238. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.cpp +71 -0
  239. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.hh +184 -0
  240. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.cpp +388 -0
  241. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.hpp +219 -0
  242. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.cpp +755 -0
  243. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.hh +581 -0
  244. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/base.hpp +137 -0
  245. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/clause.hpp +353 -0
  246. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eq.hpp +196 -0
  247. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.cpp +104 -0
  248. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.hpp +202 -0
  249. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/lq.hpp +241 -0
  250. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/or.hpp +850 -0
  251. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.cpp +152 -0
  252. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.hh +607 -0
  253. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-bool.hpp +81 -0
  254. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-int.hpp +107 -0
  255. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.bs +121 -0
  256. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.cpp +438 -0
  257. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.bs +121 -0
  258. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.cpp +438 -0
  259. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-val.hpp +229 -0
  260. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-values.hpp +213 -0
  261. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-view.hpp +364 -0
  262. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.cpp +172 -0
  263. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.hh +249 -0
  264. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/base.hpp +78 -0
  265. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/dom.hpp +332 -0
  266. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.cpp +241 -0
  267. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.hpp +84 -0
  268. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.cpp +77 -0
  269. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.hpp +71 -0
  270. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/val.hpp +256 -0
  271. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.cpp +229 -0
  272. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.hh +160 -0
  273. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/base.hpp +270 -0
  274. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/dom.hpp +128 -0
  275. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/val.hpp +105 -0
  276. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.cpp +417 -0
  277. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.hh +410 -0
  278. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-base.hpp +80 -0
  279. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-eq.hpp +143 -0
  280. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-gq.hpp +137 -0
  281. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-lq.hpp +136 -0
  282. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/rel.hpp +281 -0
  283. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-base.hpp +131 -0
  284. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-eq.hpp +117 -0
  285. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-gq.hpp +109 -0
  286. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-lq.hpp +96 -0
  287. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.cpp +432 -0
  288. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.hh +745 -0
  289. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/basic.hpp +211 -0
  290. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/edge-finding.hpp +185 -0
  291. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/man-prop.hpp +127 -0
  292. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/opt-prop.hpp +171 -0
  293. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/overload.hpp +63 -0
  294. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task-view.hpp +84 -0
  295. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task.hpp +256 -0
  296. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/tree.hpp +272 -0
  297. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.cpp +187 -0
  298. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.hh +133 -0
  299. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives/val.hpp +380 -0
  300. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.cpp +97 -0
  301. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.hh +314 -0
  302. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/bnd.hpp +444 -0
  303. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom-ctrl.hpp +81 -0
  304. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom.hpp +123 -0
  305. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/graph.hpp +266 -0
  306. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/ter-dom.hpp +113 -0
  307. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/val.hpp +185 -0
  308. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.cpp +135 -0
  309. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.hh +118 -0
  310. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/range.hpp +105 -0
  311. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/spec.hpp +124 -0
  312. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.cpp +190 -0
  313. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.hh +384 -0
  314. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/int.hpp +443 -0
  315. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.cpp +151 -0
  316. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.hpp +74 -0
  317. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/view.hpp +559 -0
  318. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exception.hpp +196 -0
  319. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.cpp +83 -0
  320. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.hh +87 -0
  321. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.cpp +77 -0
  322. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.hpp +51 -0
  323. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.cpp +124 -0
  324. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.hh +508 -0
  325. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/base.hpp +163 -0
  326. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/basic.hpp +148 -0
  327. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.cpp +535 -0
  328. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.hpp +282 -0
  329. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/incremental.hpp +454 -0
  330. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/layered-graph.hpp +982 -0
  331. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.cpp +222 -0
  332. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.hpp +184 -0
  333. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.cpp +172 -0
  334. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.hh +268 -0
  335. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd-sup.hpp +608 -0
  336. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd.hpp +829 -0
  337. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom-sup.hpp +1777 -0
  338. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom.hpp +315 -0
  339. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/post.hpp +169 -0
  340. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/val.hpp +299 -0
  341. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/view.hpp +410 -0
  342. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-1.hpp +249 -0
  343. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-2.hpp +51 -0
  344. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set.cpp +167 -0
  345. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/limits.hpp +94 -0
  346. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-bool.cpp +196 -0
  347. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-int.cpp +194 -0
  348. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear.hh +1560 -0
  349. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-int.hpp +743 -0
  350. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-post.cpp +602 -0
  351. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-scale.hpp +695 -0
  352. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-view.hpp +319 -0
  353. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-bin.hpp +439 -0
  354. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-dom.hpp +484 -0
  355. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-nary.hpp +864 -0
  356. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-noview.hpp +251 -0
  357. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-post.cpp +561 -0
  358. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-ter.hpp +273 -0
  359. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/post.hpp +152 -0
  360. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.cpp +85 -0
  361. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.hh +125 -0
  362. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/prop.hpp +175 -0
  363. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/re-prop.hpp +178 -0
  364. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.cpp +226 -0
  365. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.hh +318 -0
  366. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/base.hpp +88 -0
  367. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/box.hpp +198 -0
  368. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/dim.hpp +197 -0
  369. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/man.hpp +119 -0
  370. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/opt.hpp +153 -0
  371. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.cpp +244 -0
  372. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.hh +429 -0
  373. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-base.hpp +98 -0
  374. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-eq.hpp +174 -0
  375. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-gq.hpp +149 -0
  376. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-lq.hpp +151 -0
  377. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/graph.hpp +283 -0
  378. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-base.hpp +347 -0
  379. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-eq.hpp +167 -0
  380. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-gq.hpp +130 -0
  381. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-lq.hpp +154 -0
  382. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/range-event.hpp +51 -0
  383. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/sym-bit-matrix.hpp +69 -0
  384. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.cpp +73 -0
  385. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.hh +113 -0
  386. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede/single.hpp +232 -0
  387. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/propagator.hpp +311 -0
  388. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.cpp +381 -0
  389. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.hh +665 -0
  390. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/eq.hpp +676 -0
  391. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lex.hpp +414 -0
  392. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lq-le.hpp +537 -0
  393. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/nq.hpp +196 -0
  394. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.cpp +197 -0
  395. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.hh +154 -0
  396. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/int.hpp +168 -0
  397. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/set-op.hpp +154 -0
  398. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/view.hpp +499 -0
  399. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/violations.hpp +101 -0
  400. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.cpp +82 -0
  401. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.hh +107 -0
  402. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/matching.hpp +173 -0
  403. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/narrowing.hpp +250 -0
  404. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/order.hpp +213 -0
  405. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/propagate.hpp +646 -0
  406. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/sortsup.hpp +564 -0
  407. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hh +154 -0
  408. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hpp +187 -0
  409. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task.hh +454 -0
  410. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/array.hpp +179 -0
  411. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/fwd-to-bwd.hpp +102 -0
  412. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/iter.hpp +92 -0
  413. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/man-to-opt.hpp +100 -0
  414. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/prop.hpp +70 -0
  415. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/purge.hpp +74 -0
  416. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/sort.hpp +234 -0
  417. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/tree.hpp +189 -0
  418. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.cpp +258 -0
  419. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.hh +839 -0
  420. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/detectable.hpp +116 -0
  421. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/edge-finding.hpp +78 -0
  422. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/man-prop.hpp +78 -0
  423. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/not-first-not-last.hpp +133 -0
  424. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/opt-prop.hpp +116 -0
  425. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/overload.hpp +93 -0
  426. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/subsumption.hpp +55 -0
  427. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task-view.hpp +105 -0
  428. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task.hpp +532 -0
  429. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/tree.hpp +229 -0
  430. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unshare.cpp +146 -0
  431. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hh +118 -0
  432. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hpp +186 -0
  433. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp.hpp +710 -0
  434. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.cpp +65 -0
  435. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.hpp +431 -0
  436. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.vis +75 -0
  437. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/delta.hpp +64 -0
  438. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.cpp +361 -0
  439. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.hpp +1029 -0
  440. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.vis +117 -0
  441. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.cpp +53 -0
  442. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.hpp +121 -0
  443. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.cpp +61 -0
  444. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.hpp +145 -0
  445. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/print.hpp +56 -0
  446. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph.hh +334 -0
  447. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/bi-link.hpp +89 -0
  448. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/comb-ptr-flag.hpp +78 -0
  449. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/edge.hpp +124 -0
  450. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/graph.hpp +202 -0
  451. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/iter-prune-val.hpp +70 -0
  452. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/node.hpp +171 -0
  453. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view.hpp +1690 -0
  454. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool-test.hpp +64 -0
  455. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool.hpp +314 -0
  456. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/cached.hpp +402 -0
  457. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/constint.hpp +324 -0
  458. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/int.hpp +264 -0
  459. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/iter.hpp +65 -0
  460. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/minus.hpp +300 -0
  461. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/neg-bool.hpp +177 -0
  462. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/offset.hpp +303 -0
  463. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/print.hpp +162 -0
  464. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/rel-test.hpp +231 -0
  465. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/scale.hpp +368 -0
  466. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/zero.hpp +305 -0
  467. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter.hh +96 -0
  468. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-add.hpp +144 -0
  469. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-append.hpp +222 -0
  470. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-array.hpp +139 -0
  471. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-cache.hpp +106 -0
  472. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-compl.hpp +220 -0
  473. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-diff.hpp +142 -0
  474. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-empty.hpp +111 -0
  475. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-inter.hpp +309 -0
  476. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-list.hpp +263 -0
  477. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-map.hpp +260 -0
  478. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minmax.hpp +118 -0
  479. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minus.hpp +107 -0
  480. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-negative.hpp +137 -0
  481. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-offset.hpp +127 -0
  482. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-operations.hpp +157 -0
  483. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-positive.hpp +139 -0
  484. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-rangelist.hpp +115 -0
  485. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-scale.hpp +238 -0
  486. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton-append.hpp +111 -0
  487. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton.hpp +86 -0
  488. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-size.hpp +146 -0
  489. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-union.hpp +361 -0
  490. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-values.hpp +140 -0
  491. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-array.hpp +120 -0
  492. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-bitset.hpp +114 -0
  493. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-inter.hpp +130 -0
  494. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-list.hpp +186 -0
  495. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-map.hpp +136 -0
  496. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-minus.hpp +105 -0
  497. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-negative.hpp +116 -0
  498. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-offset.hpp +113 -0
  499. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-positive.hpp +123 -0
  500. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-ranges.hpp +106 -0
  501. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-singleton.hpp +109 -0
  502. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-union.hpp +137 -0
  503. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-unique.hpp +118 -0
  504. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel.hh +194 -0
  505. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/advisor.hpp +102 -0
  506. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/allocators.hpp +476 -0
  507. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.cpp +70 -0
  508. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.hpp +298 -0
  509. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/array.hpp +2133 -0
  510. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.cpp +121 -0
  511. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.hpp +254 -0
  512. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-tiebreak.hpp +615 -0
  513. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-val.hpp +126 -0
  514. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-view.hpp +455 -0
  515. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher.hpp +431 -0
  516. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.cpp +563 -0
  517. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.hpp +3668 -0
  518. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/exception.hpp +124 -0
  519. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/global-prop-info.hpp +258 -0
  520. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/macros.hpp +118 -0
  521. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-config.hpp +154 -0
  522. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.cpp +53 -0
  523. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.hpp +511 -0
  524. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/modevent.hpp +69 -0
  525. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/propagator.hpp +699 -0
  526. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/range-list.hpp +184 -0
  527. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.cpp +85 -0
  528. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.hpp +459 -0
  529. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/shared-array.hpp +345 -0
  530. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-imp.hpp +332 -0
  531. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-type.hpp +767 -0
  532. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var.hpp +144 -0
  533. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/view.hpp +715 -0
  534. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/wait.hh +244 -0
  535. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel.hh +1870 -0
  536. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/arithmetic.cpp +408 -0
  537. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.cpp +522 -0
  538. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.hpp +87 -0
  539. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/exception.hpp +84 -0
  540. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.cpp +594 -0
  541. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.hpp +297 -0
  542. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.cpp +414 -0
  543. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.hpp +85 -0
  544. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/matrix.hpp +247 -0
  545. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/optimize.hpp +62 -0
  546. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.cpp +817 -0
  547. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.hpp +94 -0
  548. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.cpp +704 -0
  549. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.hpp +96 -0
  550. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.cpp +81 -0
  551. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.hpp +84 -0
  552. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search.hh +458 -0
  553. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.cpp +62 -0
  554. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.hpp +91 -0
  555. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.cpp +62 -0
  556. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.hpp +84 -0
  557. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.cpp +72 -0
  558. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.hpp +49 -0
  559. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.cpp +178 -0
  560. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.hh +203 -0
  561. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.cpp +176 -0
  562. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.hh +195 -0
  563. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.cpp +118 -0
  564. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.hh +418 -0
  565. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/path.hh +477 -0
  566. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.cpp +167 -0
  567. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.hh +73 -0
  568. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.cpp +62 -0
  569. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.hpp +88 -0
  570. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/bab.hh +177 -0
  571. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/dfs.hh +176 -0
  572. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/path.hh +411 -0
  573. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/restart.hh +89 -0
  574. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/statistics.hpp +70 -0
  575. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.cpp +83 -0
  576. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.hpp +137 -0
  577. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/support.hh +91 -0
  578. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/worker.hh +202 -0
  579. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set.hh +1144 -0
  580. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array-traits.hpp +86 -0
  581. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.cpp +219 -0
  582. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.hpp +64 -0
  583. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.cpp +128 -0
  584. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.hh +438 -0
  585. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-val.hpp +107 -0
  586. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.bs +109 -0
  587. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.cpp +370 -0
  588. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-val.hpp +204 -0
  589. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-view.hpp +306 -0
  590. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/cardinality.cpp +65 -0
  591. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.cpp +60 -0
  592. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.hh +107 -0
  593. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.cpp +97 -0
  594. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.hpp +67 -0
  595. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.cpp +116 -0
  596. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.hpp +68 -0
  597. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.cpp +56 -0
  598. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.hh +79 -0
  599. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.cpp +162 -0
  600. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.hpp +66 -0
  601. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/dom.cpp +300 -0
  602. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.cpp +255 -0
  603. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.hh +218 -0
  604. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/disjoint.hpp +324 -0
  605. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/inter.hpp +308 -0
  606. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/union.hpp +342 -0
  607. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/unionConst.hpp +293 -0
  608. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exception.hpp +146 -0
  609. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exec.cpp +58 -0
  610. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.cpp +191 -0
  611. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.hh +459 -0
  612. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/card.hpp +93 -0
  613. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-bool.hpp +282 -0
  614. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-int.hpp +158 -0
  615. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/match.hpp +199 -0
  616. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/minmax.hpp +645 -0
  617. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/weights.hpp +353 -0
  618. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/limits.hpp +62 -0
  619. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.cpp +74 -0
  620. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.hh +115 -0
  621. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede/single.hpp +255 -0
  622. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvc.cpp +66 -0
  623. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvv.cpp +65 -0
  624. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcc.cpp +168 -0
  625. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcv.cpp +166 -0
  626. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vvc.cpp +63 -0
  627. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-singleton.cpp +115 -0
  628. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-ternary.cpp +60 -0
  629. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.cpp +105 -0
  630. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.hh +297 -0
  631. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/common.hpp +619 -0
  632. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/inter.hpp +389 -0
  633. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/partition.hpp +164 -0
  634. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvc.cpp +58 -0
  635. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvv.cpp +54 -0
  636. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-vvc.cpp +57 -0
  637. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl.cpp +54 -0
  638. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvc.cpp +55 -0
  639. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvv.cpp +54 -0
  640. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-vvc.cpp +54 -0
  641. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl.cpp +54 -0
  642. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post.hpp +266 -0
  643. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/subofunion.hpp +166 -0
  644. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/superofinter.hpp +167 -0
  645. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/union.hpp +319 -0
  646. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.cpp +232 -0
  647. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.hh +322 -0
  648. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/common.hpp +125 -0
  649. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/eq.hpp +116 -0
  650. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/lq.hpp +417 -0
  651. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nosubset.hpp +104 -0
  652. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nq.hpp +160 -0
  653. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-eq.hpp +152 -0
  654. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-lq.hpp +182 -0
  655. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-subset.hpp +146 -0
  656. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/subset.hpp +96 -0
  657. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.cpp +64 -0
  658. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.hh +115 -0
  659. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/common.hpp +100 -0
  660. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.cpp +145 -0
  661. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.hpp +79 -0
  662. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.cpp +76 -0
  663. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.hpp +69 -0
  664. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp.hpp +634 -0
  665. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/delta.hpp +78 -0
  666. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.cpp +348 -0
  667. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.hpp +426 -0
  668. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/iter.hpp +63 -0
  669. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.cpp +142 -0
  670. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.hpp +531 -0
  671. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.vis +197 -0
  672. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/print.hpp +49 -0
  673. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.cpp +111 -0
  674. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.hpp +254 -0
  675. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view.hpp +1142 -0
  676. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/cached.hpp +399 -0
  677. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/complement.hpp +556 -0
  678. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/const.hpp +723 -0
  679. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/print.hpp +140 -0
  680. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/set.hpp +263 -0
  681. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/singleton.hpp +402 -0
  682. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support.hh +135 -0
  683. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/auto-link.hpp +73 -0
  684. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset-base.hpp +379 -0
  685. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset.hpp +81 -0
  686. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/block-allocator.hpp +169 -0
  687. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/cast.hpp +52 -0
  688. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/config.hpp.in +109 -0
  689. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-array.hpp +140 -0
  690. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-queue.hpp +156 -0
  691. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-stack.hpp +186 -0
  692. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.cpp +65 -0
  693. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.hpp +102 -0
  694. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.cpp +49 -0
  695. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.hpp +593 -0
  696. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/int-type.hpp +172 -0
  697. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/macros.hpp +103 -0
  698. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/marked-pointer.hpp +79 -0
  699. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/random.hpp +128 -0
  700. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/sort.hpp +268 -0
  701. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/static-stack.hpp +148 -0
  702. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread.hpp +272 -0
  703. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/none.hpp +87 -0
  704. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.cpp +66 -0
  705. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.hpp +142 -0
  706. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.cpp +72 -0
  707. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.hpp +114 -0
  708. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.cpp +68 -0
  709. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.hpp +108 -0
  710. data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/timer.hpp +103 -0
  711. data/ext/libgecode3/vendor/gecode-3.7.3/install-sh +323 -0
  712. data/ext/libgecode3/vendor/gecode-3.7.3/misc/allexamples.perl +60 -0
  713. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/back.png +0 -0
  714. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/footer.html +3 -0
  715. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/gecode-logo-100.png +0 -0
  716. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/header.html +66 -0
  717. data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/stylesheet.css +468 -0
  718. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixautoheader.perl +55 -0
  719. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixmanifest.perl +84 -0
  720. data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixproperties.sh +98 -0
  721. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gecode-logo.ico +0 -0
  722. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genbranch.perl +310 -0
  723. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genchangelog.perl +249 -0
  724. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gencurrentchangelog.perl +191 -0
  725. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlcovmakefile.perl +148 -0
  726. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlicense.perl +121 -0
  727. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genrc.perl +236 -0
  728. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genstatistics.perl +178 -0
  729. data/ext/libgecode3/vendor/gecode-3.7.3/misc/gentxtchangelog.perl +198 -0
  730. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genvarimp.perl +877 -0
  731. data/ext/libgecode3/vendor/gecode-3.7.3/misc/genxcodeproj.perl +144 -0
  732. data/ext/libgecode3/vendor/gecode-3.7.3/misc/getrevision.perl +47 -0
  733. data/ext/libgecode3/vendor/gecode-3.7.3/misc/makedepend.perl +85 -0
  734. data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore-root.txt +43 -0
  735. data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore.txt +18 -0
  736. data/ext/libgecode3/vendor/gecode-3.7.3/test/afc.cpp +143 -0
  737. data/ext/libgecode3/vendor/gecode-3.7.3/test/array.cpp +277 -0
  738. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.cpp +278 -0
  739. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.hh +119 -0
  740. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/bool.cpp +61 -0
  741. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/int.cpp +70 -0
  742. data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/set.cpp +72 -0
  743. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.cpp +504 -0
  744. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.hh +119 -0
  745. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/bool.cpp +61 -0
  746. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/int.cpp +70 -0
  747. data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/set.cpp +72 -0
  748. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.cpp +655 -0
  749. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hh +353 -0
  750. data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hpp +314 -0
  751. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/arithmetic.cpp +772 -0
  752. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/basic.cpp +82 -0
  753. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bin-packing.cpp +237 -0
  754. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bool.cpp +500 -0
  755. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/channel.cpp +234 -0
  756. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/circuit.cpp +359 -0
  757. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/count.cpp +410 -0
  758. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulative.cpp +560 -0
  759. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulatives.cpp +276 -0
  760. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/distinct.cpp +248 -0
  761. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/dom.cpp +174 -0
  762. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/element.cpp +602 -0
  763. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/exec.cpp +150 -0
  764. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/extensional.cpp +571 -0
  765. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/gcc.cpp +320 -0
  766. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/linear.cpp +394 -0
  767. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/member.cpp +138 -0
  768. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-arithmetic.cpp +368 -0
  769. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-bool.cpp +4344 -0
  770. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-count.cpp +295 -0
  771. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-lin.cpp +2179 -0
  772. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-rel.cpp +136 -0
  773. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/no-overlap.cpp +259 -0
  774. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/nvalues.cpp +241 -0
  775. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/precede.cpp +115 -0
  776. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/rel.cpp +568 -0
  777. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sequence.cpp +168 -0
  778. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sorted.cpp +165 -0
  779. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unary.cpp +327 -0
  780. data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unshare.cpp +109 -0
  781. data/ext/libgecode3/vendor/gecode-3.7.3/test/search.cpp +487 -0
  782. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.cpp +638 -0
  783. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hh +362 -0
  784. data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hpp +121 -0
  785. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/construct.cpp +225 -0
  786. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/convex.cpp +139 -0
  787. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/distinct.cpp +116 -0
  788. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/dom.cpp +346 -0
  789. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/element.cpp +397 -0
  790. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/exec.cpp +86 -0
  791. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/int.cpp +532 -0
  792. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/mm-set.cpp +4532 -0
  793. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/precede.cpp +136 -0
  794. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op-const.cpp +368 -0
  795. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op.cpp +504 -0
  796. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel.cpp +157 -0
  797. data/ext/libgecode3/vendor/gecode-3.7.3/test/set/sequence.cpp +133 -0
  798. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.cpp +281 -0
  799. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hh +161 -0
  800. data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hpp +76 -0
  801. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/fz.cpp +93 -0
  802. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.bat.in +41 -0
  803. data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.in +41 -0
  804. data/lib/dep-selector-libgecode.rb +15 -0
  805. data/lib/dep-selector-libgecode/version.rb +3 -0
  806. metadata +878 -0
@@ -0,0 +1,18 @@
1
+ ######################################################################
2
+ # Automatically generated by qmake (2.01a) Mi. Mrz 31 09:30:46 2010
3
+ ######################################################################
4
+
5
+ TEMPLATE = app
6
+ TARGET = mygist
7
+ DEPENDPATH += .
8
+ INCLUDEPATH += . ../../../
9
+ CONFIG += release x86_64
10
+
11
+ # Input
12
+ SOURCES += mygist.cpp
13
+
14
+ win32:DESTDIR = ./
15
+ LIBS += -L../../..
16
+ !win32 {
17
+ LIBS += -lgecodekernel -lgecodesupport -lgecodeint -lgecodesearch -lgecodegist
18
+ }
@@ -0,0 +1,90 @@
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: 2011-05-11 20:44:17 +1000 (Wed, 11 May 2011) $ by $Author: tack $
11
+ * $Revision: 12001 $
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
+ #include <gecode/gist/stopbrancher.hh>
39
+
40
+ namespace Gecode { namespace Gist {
41
+
42
+ StopChoice::StopChoice(const Brancher& b) : Choice(b,1) {}
43
+ size_t
44
+ StopChoice::size(void) const {
45
+ return sizeof(StopChoice);
46
+ }
47
+ void
48
+ StopChoice::archive(Archive& e) const {
49
+ Choice::archive(e);
50
+ }
51
+
52
+ StopBrancher::StopBrancher(Home home) : Brancher(home), done(false) {}
53
+
54
+ StopBrancher::StopBrancher(Space& home, bool share, StopBrancher& b)
55
+ : Brancher(home, share, b), done(b.done) {}
56
+
57
+ bool
58
+ StopBrancher::status(const Space&) const {
59
+ return !done;
60
+ }
61
+
62
+ Choice*
63
+ StopBrancher::choice(Space&) {
64
+ return new StopChoice(*this);
65
+ }
66
+ Choice*
67
+ StopBrancher::choice(const Space&, Archive&) {
68
+ return new StopChoice(*this);
69
+ }
70
+ ExecStatus
71
+ StopBrancher::commit(Space&, const Choice&, unsigned int) {
72
+ done = true;
73
+ return ES_OK;
74
+ }
75
+ Actor*
76
+ StopBrancher::copy(Space& home, bool share) {
77
+ return new (home) StopBrancher(home, share, *this);
78
+ }
79
+ void
80
+ StopBrancher::post(Home home) {
81
+ (void) new (home) StopBrancher(home);
82
+ }
83
+ size_t
84
+ StopBrancher::dispose(Space&) {
85
+ return sizeof(*this);
86
+ }
87
+
88
+ }}
89
+
90
+ // STATISTICS: gist-any
@@ -0,0 +1,82 @@
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: 2011-05-11 20:44:17 +1000 (Wed, 11 May 2011) $ by $Author: tack $
11
+ * $Revision: 12001 $
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
+ #include <gecode/kernel.hh>
39
+ #include <gecode/gist.hh>
40
+
41
+ namespace Gecode { namespace Gist {
42
+
43
+ /// %Choice for %StopBrancher
44
+ class GECODE_GIST_EXPORT StopChoice : public Choice {
45
+ public:
46
+ /// Initialize choice for brancher \a b
47
+ StopChoice(const Brancher& b);
48
+ /// Report size occupied
49
+ virtual size_t size(void) const;
50
+ /// Archive into \a e
51
+ virtual void archive(Archive& e) const;
52
+ };
53
+
54
+ /// %Brancher that stops exploration in %Gist
55
+ class StopBrancher : public Brancher {
56
+ protected:
57
+ /// Flag whether brancher has been executed
58
+ bool done;
59
+ /// Construct brancher
60
+ StopBrancher(Home home);
61
+ /// Copy constructor
62
+ StopBrancher(Space& home, bool share, StopBrancher& b);
63
+ public:
64
+ /// Check status of brancher, return true if alternatives left
65
+ virtual bool status(const Space&) const;
66
+ /// Return choice
67
+ virtual Choice* choice(Space&);
68
+ /// Return choice
69
+ virtual Choice* choice(const Space& home, Archive&);
70
+ /// Perform commit for choice \a _c and alternative \a a
71
+ virtual ExecStatus commit(Space&, const Choice&, unsigned int);
72
+ /// Copy brancher
73
+ virtual Actor* copy(Space& home, bool share);
74
+ /// Post brancher
75
+ static void post(Home home);
76
+ /// Delete brancher and return its size
77
+ virtual size_t dispose(Space&);
78
+ };
79
+
80
+ }}
81
+
82
+ // STATISTICS: gist-any
@@ -0,0 +1,175 @@
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: 2011-08-25 18:43:31 +1000 (Thu, 25 Aug 2011) $ by $Author: tack $
11
+ * $Revision: 12352 $
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
+ #include <QtGui>
39
+
40
+ #include <iostream>
41
+ #include <gecode/gist/textoutput.hh>
42
+ #include <gecode/gist/gecodelogo.hh>
43
+
44
+ namespace Gecode { namespace Gist {
45
+
46
+ /// \brief An outputstream that prints on a QTextEdit
47
+ class GistOutputStream
48
+ : public std::basic_ostream<char, std::char_traits<char> > {
49
+ /// \brief Buffer for printing on a QTextEdit
50
+ class Buf
51
+ : public std::basic_streambuf<char, std::char_traits<char> > {
52
+ QString buffer;
53
+ QTextEdit* editor;
54
+ public:
55
+ void flush(void) {
56
+ QTextBlockFormat bf = editor->textCursor().blockFormat();
57
+ bf.setBottomMargin(0);
58
+ editor->textCursor().setBlockFormat(bf);
59
+ editor->append(buffer);
60
+ buffer.clear();
61
+ }
62
+ virtual int overflow(int v = std::char_traits<char>::eof()) {
63
+ if (v == '\n') {
64
+ flush();
65
+ } else {
66
+ buffer += (char)v;
67
+ }
68
+ return v;
69
+ }
70
+ Buf(QTextEdit* e) : editor(e) {}
71
+ };
72
+
73
+ Buf _buf;
74
+ public:
75
+ GistOutputStream(QTextEdit* editor)
76
+ : std::basic_ostream<char, std::char_traits<char> >(&_buf),
77
+ _buf(editor) {
78
+ clear();
79
+ }
80
+ void flush(void) {
81
+ _buf.flush();
82
+ }
83
+ };
84
+
85
+ TextOutputI::TextOutputI(const std::string& name, QWidget *parent)
86
+ : QMainWindow(parent) {
87
+ Logos logos;
88
+
89
+ QPixmap myPic;
90
+ myPic.loadFromData(logos.gistLogo, logos.gistLogoSize);
91
+ setWindowIcon(myPic);
92
+
93
+ QFont font;
94
+ QString fontFamily("Courier");
95
+ font.setFamily(fontFamily);
96
+ font.setFixedPitch(true);
97
+ font.setPointSize(12);
98
+
99
+
100
+ editor = new QTextEdit;
101
+ editor->setFont(font);
102
+ editor->setReadOnly(true);
103
+ editor->setLineWrapMode(QTextEdit::FixedColumnWidth);
104
+ editor->setLineWrapColumnOrWidth(80);
105
+ os = new GistOutputStream(editor);
106
+
107
+ QAction* clearText = new QAction("Clear", this);
108
+ clearText->setShortcut(QKeySequence("Ctrl+K"));
109
+ this->addAction(clearText);
110
+ connect(clearText, SIGNAL(triggered()), editor,
111
+ SLOT(clear()));
112
+
113
+ QAction* closeWindow = new QAction("Close window", this);
114
+ closeWindow->setShortcut(QKeySequence("Ctrl+W"));
115
+ this->addAction(closeWindow);
116
+ connect(closeWindow, SIGNAL(triggered()), this,
117
+ SLOT(close()));
118
+
119
+ QToolBar* t = addToolBar("Tools");
120
+ t->setFloatable(false);
121
+ t->setMovable(false);
122
+ t->addAction(clearText);
123
+
124
+ stayOnTop = new QAction("Stay on top", this);
125
+ stayOnTop->setCheckable(true);
126
+ t->addAction(stayOnTop);
127
+ connect(stayOnTop, SIGNAL(changed()), this,
128
+ SLOT(changeStayOnTop()));
129
+
130
+ changeStayOnTop();
131
+ setCentralWidget(editor);
132
+ setWindowTitle(QString((std::string("Gist Console: ") + name).c_str()));
133
+
134
+ setAttribute(Qt::WA_QuitOnClose, false);
135
+ setAttribute(Qt::WA_DeleteOnClose, false);
136
+ resize(600,300);
137
+ }
138
+
139
+ TextOutputI::~TextOutputI(void) {
140
+ delete os;
141
+ }
142
+
143
+ std::ostream&
144
+ TextOutputI::getStream(void) {
145
+ return *os;
146
+ }
147
+
148
+ void
149
+ TextOutputI::flush(void) {
150
+ static_cast<GistOutputStream*>(os)->flush();
151
+ }
152
+
153
+ void
154
+ TextOutputI::insertHtml(const QString& s) {
155
+ QTextBlockFormat bf = editor->textCursor().blockFormat();
156
+ bf.setBottomMargin(0);
157
+ editor->textCursor().setBlockFormat(bf);
158
+ editor->insertHtml(s);
159
+ editor->ensureCursorVisible();
160
+ }
161
+
162
+ void TextOutputI::changeStayOnTop(void) {
163
+ QPoint p = pos();
164
+ if (stayOnTop->isChecked()) {
165
+ setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
166
+ } else {
167
+ setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
168
+ }
169
+ move(p);
170
+ show();
171
+ }
172
+
173
+ }}
174
+
175
+ // STATISTICS: gist-any
@@ -0,0 +1,75 @@
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: 2011-08-25 18:43:31 +1000 (Thu, 25 Aug 2011) $ by $Author: tack $
11
+ * $Revision: 12352 $
12
+ *
13
+ * This file is part of Gecode, the generic constraint
14
+ * development environment:
15
+ * http://www.gecode.org
16
+ *
17
+ * Permission is hereby granted, free of charge, to any person obtaining
18
+ * a copy of this software and associated documentation files (the
19
+ * "Software"), to deal in the Software without restriction, including
20
+ * without limitation the rights to use, copy, modify, merge, publish,
21
+ * distribute, sublicense, and/or sell copies of the Software, and to
22
+ * permit persons to whom the Software is furnished to do so, subject to
23
+ * the following conditions:
24
+ *
25
+ * The above copyright notice and this permission notice shall be
26
+ * included in all copies or substantial portions of the Software.
27
+ *
28
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35
+ *
36
+ */
37
+
38
+ #ifndef GECODE_GIST_TEXTOUTPUT_HH
39
+ #define GECODE_GIST_TEXTOUTPUT_HH
40
+
41
+ #include <QMainWindow>
42
+ #include <QTextEdit>
43
+
44
+ namespace Gecode { namespace Gist {
45
+ /// \brief Window with associated ostream, used for inspecting %Gist nodes
46
+ class TextOutputI : public QMainWindow {
47
+ Q_OBJECT
48
+ private:
49
+ /// Action used for toggling stay-on-top behavior
50
+ QAction* stayOnTop;
51
+ /// The QTextEditor used for text display
52
+ QTextEdit *editor;
53
+ /// The ostream that prints to the editor
54
+ std::ostream *os;
55
+
56
+ public:
57
+ /// Constructor
58
+ TextOutputI(const std::string& name, QWidget *parent = 0);
59
+ /// Destructor
60
+ ~TextOutputI(void);
61
+ /// Return stream that prints to the text display
62
+ std::ostream& getStream(void);
63
+ /// Add html string \a s to the output
64
+ void insertHtml(const QString& s);
65
+ /// Flush output
66
+ void flush(void);
67
+ protected Q_SLOTS:
68
+ void changeStayOnTop(void);
69
+ };
70
+
71
+ }}
72
+
73
+ #endif
74
+
75
+ // STATISTICS: gist-any
@@ -0,0 +1,1430 @@
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: 2011-08-30 19:40:00 +1000 (Tue, 30 Aug 2011) $ by $Author: tack $
11
+ * $Revision: 12374 $
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
+ #include <QtGui/QPainter>
39
+
40
+ #include <stack>
41
+ #include <fstream>
42
+
43
+ #include <gecode/gist/treecanvas.hh>
44
+
45
+ #include <gecode/gist/nodevisitor.hh>
46
+ #include <gecode/gist/visualnode.hh>
47
+ #include <gecode/gist/drawingcursor.hh>
48
+
49
+ #include <gecode/search.hh>
50
+ #include <gecode/search/support.hh>
51
+
52
+ namespace Gecode { namespace Gist {
53
+
54
+ TreeCanvas::TreeCanvas(Space* rootSpace, bool bab,
55
+ QWidget* parent, const Options& opt)
56
+ : QWidget(parent)
57
+ , mutex(QMutex::Recursive)
58
+ , layoutMutex(QMutex::Recursive)
59
+ , finishedFlag(false)
60
+ , compareNodes(false), compareNodesBeforeFP(false)
61
+ , autoHideFailed(true), autoZoom(false)
62
+ , refresh(500), refreshPause(0), smoothScrollAndZoom(false)
63
+ , zoomTimeLine(500)
64
+ , scrollTimeLine(1000), targetX(0), sourceX(0), targetY(0), sourceY(0)
65
+ , targetW(0), targetH(0), targetScale(0)
66
+ , layoutDoneTimerId(0) {
67
+ QMutexLocker locker(&mutex);
68
+ curBest = (bab ? new BestNode(NULL) : NULL);
69
+ if (rootSpace->status() == SS_FAILED) {
70
+ if (!opt.clone)
71
+ delete rootSpace;
72
+ rootSpace = NULL;
73
+ } else {
74
+ rootSpace = Gecode::Search::snapshot(rootSpace,opt);
75
+ }
76
+ na = new Node::NodeAllocator(bab);
77
+ int rootIdx = na->allocate(rootSpace);
78
+ assert(rootIdx == 0); (void) rootIdx;
79
+ root = (*na)[0];
80
+ root->layout(*na);
81
+ root->setMarked(true);
82
+ currentNode = root;
83
+ pathHead = root;
84
+ scale = LayoutConfig::defScale / 100.0;
85
+
86
+ setAutoFillBackground(true);
87
+
88
+ connect(&searcher, SIGNAL(update(int,int,int)), this,
89
+ SLOT(layoutDone(int,int,int)));
90
+ connect(&searcher, SIGNAL(statusChanged(bool)), this,
91
+ SLOT(statusChanged(bool)));
92
+
93
+ connect(&searcher, SIGNAL(solution(const Space*)),
94
+ this, SIGNAL(solution(const Space*)),
95
+ Qt::BlockingQueuedConnection);
96
+ connect(this, SIGNAL(solution(const Space*)),
97
+ this, SLOT(inspectSolution(const Space*)));
98
+ connect(&searcher, SIGNAL(solution(const Space*)),
99
+ this, SLOT(inspectSolution(const Space*)),
100
+ Qt::BlockingQueuedConnection);
101
+
102
+ connect(&searcher, SIGNAL(searchFinished(void)), this, SIGNAL(searchFinished(void)));
103
+
104
+ connect(&scrollTimeLine, SIGNAL(frameChanged(int)),
105
+ this, SLOT(scroll(int)));
106
+ scrollTimeLine.setCurveShape(QTimeLine::EaseInOutCurve);
107
+
108
+ scaleBar = new QSlider(Qt::Vertical, this);
109
+ scaleBar->setObjectName("scaleBar");
110
+ scaleBar->setMinimum(LayoutConfig::minScale);
111
+ scaleBar->setMaximum(LayoutConfig::maxScale);
112
+ scaleBar->setValue(LayoutConfig::defScale);
113
+ connect(scaleBar, SIGNAL(valueChanged(int)),
114
+ this, SLOT(scaleTree(int)));
115
+ connect(this, SIGNAL(scaleChanged(int)), scaleBar, SLOT(setValue(int)));
116
+ connect(&searcher, SIGNAL(scaleChanged(int)),
117
+ scaleBar, SLOT(setValue(int)));
118
+
119
+ connect(&zoomTimeLine, SIGNAL(frameChanged(int)),
120
+ scaleBar, SLOT(setValue(int)));
121
+ zoomTimeLine.setCurveShape(QTimeLine::EaseInOutCurve);
122
+
123
+ qRegisterMetaType<Statistics>("Statistics");
124
+ update();
125
+ }
126
+
127
+ TreeCanvas::~TreeCanvas(void) {
128
+ if (root) {
129
+ DisposeCursor dc(root,*na);
130
+ PreorderNodeVisitor<DisposeCursor>(dc).run();
131
+ }
132
+ delete na;
133
+ }
134
+
135
+ void
136
+ TreeCanvas::addDoubleClickInspector(Inspector* i) {
137
+ doubleClickInspectors.append(QPair<Inspector*,bool>(i,false));
138
+ }
139
+
140
+ void
141
+ TreeCanvas::activateDoubleClickInspector(int i, bool active) {
142
+ assert(i < doubleClickInspectors.size());
143
+ doubleClickInspectors[i].second = active;
144
+ }
145
+
146
+ void
147
+ TreeCanvas::addSolutionInspector(Inspector* i) {
148
+ solutionInspectors.append(QPair<Inspector*,bool>(i,false));
149
+ }
150
+
151
+ void
152
+ TreeCanvas::activateSolutionInspector(int i, bool active) {
153
+ assert(i < solutionInspectors.size());
154
+ solutionInspectors[i].second = active;
155
+ }
156
+
157
+ void
158
+ TreeCanvas::addMoveInspector(Inspector* i) {
159
+ moveInspectors.append(QPair<Inspector*,bool>(i,false));
160
+ }
161
+
162
+ void
163
+ TreeCanvas::activateMoveInspector(int i, bool active) {
164
+ assert(i < moveInspectors.size());
165
+ moveInspectors[i].second = active;
166
+ }
167
+
168
+ void
169
+ TreeCanvas::addComparator(Comparator* c) {
170
+ comparators.append(QPair<Comparator*,bool>(c,false));
171
+ }
172
+
173
+ void
174
+ TreeCanvas::activateComparator(int i, bool active) {
175
+ assert(i < comparators.size());
176
+ comparators[i].second = active;
177
+ }
178
+
179
+ void
180
+ TreeCanvas::scaleTree(int scale0, int zoomx, int zoomy) {
181
+ QMutexLocker locker(&layoutMutex);
182
+
183
+ QSize viewport_size = size();
184
+ QAbstractScrollArea* sa =
185
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
186
+
187
+ if (zoomx==-1)
188
+ zoomx = viewport_size.width()/2;
189
+ if (zoomy==-1)
190
+ zoomy = viewport_size.height()/2;
191
+
192
+ int xoff = (sa->horizontalScrollBar()->value()+zoomx)/scale;
193
+ int yoff = (sa->verticalScrollBar()->value()+zoomy)/scale;
194
+
195
+ BoundingBox bb;
196
+ scale0 = std::min(std::max(scale0, LayoutConfig::minScale),
197
+ LayoutConfig::maxScale);
198
+ scale = (static_cast<double>(scale0)) / 100.0;
199
+ bb = root->getBoundingBox();
200
+ int w =
201
+ static_cast<int>((bb.right-bb.left+Layout::extent)*scale);
202
+ int h =
203
+ static_cast<int>(2*Layout::extent+
204
+ root->getShape()->depth()*Layout::dist_y*scale);
205
+
206
+ sa->horizontalScrollBar()->setRange(0,w-viewport_size.width());
207
+ sa->verticalScrollBar()->setRange(0,h-viewport_size.height());
208
+ sa->horizontalScrollBar()->setPageStep(viewport_size.width());
209
+ sa->verticalScrollBar()->setPageStep(viewport_size.height());
210
+ sa->horizontalScrollBar()->setSingleStep(Layout::extent);
211
+ sa->verticalScrollBar()->setSingleStep(Layout::extent);
212
+
213
+ xoff *= scale;
214
+ yoff *= scale;
215
+
216
+ sa->horizontalScrollBar()->setValue(xoff-zoomx);
217
+ sa->verticalScrollBar()->setValue(yoff-zoomy);
218
+
219
+ emit scaleChanged(scale0);
220
+ QWidget::update();
221
+ }
222
+
223
+ void
224
+ TreeCanvas::update(void) {
225
+ QMutexLocker locker(&mutex);
226
+ layoutMutex.lock();
227
+ if (root != NULL) {
228
+ root->layout(*na);
229
+ BoundingBox bb = root->getBoundingBox();
230
+
231
+ int w = static_cast<int>((bb.right-bb.left+Layout::extent)*scale);
232
+ int h =
233
+ static_cast<int>(2*Layout::extent+
234
+ root->getShape()->depth()*Layout::dist_y*scale);
235
+ xtrans = -bb.left+(Layout::extent / 2);
236
+
237
+ QSize viewport_size = size();
238
+ QAbstractScrollArea* sa =
239
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
240
+ sa->horizontalScrollBar()->setRange(0,w-viewport_size.width());
241
+ sa->verticalScrollBar()->setRange(0,h-viewport_size.height());
242
+ sa->horizontalScrollBar()->setPageStep(viewport_size.width());
243
+ sa->verticalScrollBar()->setPageStep(viewport_size.height());
244
+ sa->horizontalScrollBar()->setSingleStep(Layout::extent);
245
+ sa->verticalScrollBar()->setSingleStep(Layout::extent);
246
+ }
247
+ if (autoZoom)
248
+ zoomToFit();
249
+ layoutMutex.unlock();
250
+ QWidget::update();
251
+ }
252
+
253
+ void
254
+ TreeCanvas::scroll(void) {
255
+ QWidget::update();
256
+ }
257
+
258
+ void
259
+ TreeCanvas::layoutDone(int w, int h, int scale0) {
260
+ targetW = w; targetH = h; targetScale = scale0;
261
+
262
+ QSize viewport_size = size();
263
+ QAbstractScrollArea* sa =
264
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
265
+ sa->horizontalScrollBar()->setRange(0,w-viewport_size.width());
266
+ sa->verticalScrollBar()->setRange(0,h-viewport_size.height());
267
+
268
+ if (layoutDoneTimerId == 0)
269
+ layoutDoneTimerId = startTimer(15);
270
+ }
271
+
272
+ void
273
+ TreeCanvas::statusChanged(bool finished) {
274
+ if (finished) {
275
+ update();
276
+ centerCurrentNode();
277
+ }
278
+ emit statusChanged(currentNode, stats, finished);
279
+ }
280
+
281
+ void
282
+ SearcherThread::search(VisualNode* n, bool all, TreeCanvas* ti) {
283
+ node = n;
284
+
285
+ depth = -1;
286
+ for (VisualNode* p = n; p != NULL; p = p->getParent(*ti->na))
287
+ depth++;
288
+
289
+ a = all;
290
+ t = ti;
291
+ start();
292
+ }
293
+
294
+ void
295
+ SearcherThread::updateCanvas(void) {
296
+ t->layoutMutex.lock();
297
+ if (t->root == NULL)
298
+ return;
299
+
300
+ if (t->autoHideFailed) {
301
+ t->root->hideFailed(*t->na,true);
302
+ }
303
+ for (VisualNode* n = t->currentNode; n != NULL; n=n->getParent(*t->na)) {
304
+ if (n->isHidden()) {
305
+ t->currentNode->setMarked(false);
306
+ t->currentNode = n;
307
+ t->currentNode->setMarked(true);
308
+ break;
309
+ }
310
+ }
311
+
312
+ t->root->layout(*t->na);
313
+ BoundingBox bb = t->root->getBoundingBox();
314
+
315
+ int w = static_cast<int>((bb.right-bb.left+Layout::extent)*t->scale);
316
+ int h = static_cast<int>(2*Layout::extent+
317
+ t->root->getShape()->depth()
318
+ *Layout::dist_y*t->scale);
319
+ t->xtrans = -bb.left+(Layout::extent / 2);
320
+
321
+ int scale0 = static_cast<int>(t->scale*100);
322
+ if (t->autoZoom) {
323
+ QWidget* p = t->parentWidget();
324
+ if (p) {
325
+ double newXScale =
326
+ static_cast<double>(p->width()) / (bb.right - bb.left +
327
+ Layout::extent);
328
+ double newYScale =
329
+ static_cast<double>(p->height()) /
330
+ (t->root->getShape()->depth() * Layout::dist_y + 2*Layout::extent);
331
+
332
+ scale0 = static_cast<int>(std::min(newXScale, newYScale)*100);
333
+ if (scale0<LayoutConfig::minScale)
334
+ scale0 = LayoutConfig::minScale;
335
+ if (scale0>LayoutConfig::maxAutoZoomScale)
336
+ scale0 = LayoutConfig::maxAutoZoomScale;
337
+ double scale = (static_cast<double>(scale0)) / 100.0;
338
+
339
+ w = static_cast<int>((bb.right-bb.left+Layout::extent)*scale);
340
+ h = static_cast<int>(2*Layout::extent+
341
+ t->root->getShape()->depth()*Layout::dist_y*scale);
342
+ }
343
+ }
344
+
345
+ t->layoutMutex.unlock();
346
+ emit update(w,h,scale0);
347
+ }
348
+
349
+ /// A stack item for depth first search
350
+ class SearchItem {
351
+ public:
352
+ /// The node
353
+ VisualNode* n;
354
+ /// The currently explored child
355
+ int i;
356
+ /// The number of children
357
+ int noOfChildren;
358
+ /// Constructor
359
+ SearchItem(VisualNode* n0, int noOfChildren0)
360
+ : n(n0), i(-1), noOfChildren(noOfChildren0) {}
361
+ };
362
+
363
+ void
364
+ SearcherThread::run() {
365
+ {
366
+ if (!node->isOpen())
367
+ return;
368
+ t->mutex.lock();
369
+ emit statusChanged(false);
370
+
371
+ unsigned int kids =
372
+ node->getNumberOfChildNodes(*t->na, t->curBest, t->stats,
373
+ t->c_d, t->a_d);
374
+ if (kids == 0 || node->getStatus() == STOP) {
375
+ t->mutex.unlock();
376
+ updateCanvas();
377
+ emit statusChanged(true);
378
+ return;
379
+ }
380
+
381
+ std::stack<SearchItem> stck;
382
+ stck.push(SearchItem(node,kids));
383
+ t->stats.maxDepth =
384
+ std::max(static_cast<long unsigned int>(t->stats.maxDepth),
385
+ static_cast<long unsigned int>(depth+stck.size()));
386
+
387
+ VisualNode* sol = NULL;
388
+ int nodeCount = 0;
389
+ t->stopSearchFlag = false;
390
+ while (!stck.empty() && !t->stopSearchFlag) {
391
+ if (t->refresh > 0 && nodeCount >= t->refresh) {
392
+ node->dirtyUp(*t->na);
393
+ updateCanvas();
394
+ emit statusChanged(false);
395
+ nodeCount = 0;
396
+ if (t->refreshPause > 0)
397
+ msleep(t->refreshPause);
398
+ }
399
+ SearchItem& si = stck.top();
400
+ si.i++;
401
+ if (si.i == si.noOfChildren) {
402
+ stck.pop();
403
+ } else {
404
+ VisualNode* n = si.n->getChild(*t->na,si.i);
405
+ if (n->isOpen()) {
406
+ if (n->getStatus() == UNDETERMINED)
407
+ nodeCount++;
408
+ kids = n->getNumberOfChildNodes(*t->na, t->curBest, t->stats,
409
+ t->c_d, t->a_d);
410
+ if (kids == 0) {
411
+ if (n->getStatus() == SOLVED) {
412
+ assert(n->hasCopy());
413
+ emit solution(n->getWorkingSpace());
414
+ n->purge(*t->na);
415
+ sol = n;
416
+ if (!a)
417
+ break;
418
+ }
419
+ } else {
420
+ if ( n->getStatus() != STOP )
421
+ stck.push(SearchItem(n,kids));
422
+ else if (!a)
423
+ break;
424
+ t->stats.maxDepth =
425
+ std::max(static_cast<long unsigned int>(t->stats.maxDepth),
426
+ static_cast<long unsigned int>(depth+stck.size()));
427
+ }
428
+ }
429
+ }
430
+ }
431
+ node->dirtyUp(*t->na);
432
+ t->stopSearchFlag = false;
433
+ t->mutex.unlock();
434
+ if (sol != NULL) {
435
+ t->setCurrentNode(sol,false);
436
+ } else {
437
+ t->setCurrentNode(node,false);
438
+ }
439
+ }
440
+ updateCanvas();
441
+ emit statusChanged(true);
442
+ if (t->finishedFlag)
443
+ emit searchFinished();
444
+ }
445
+
446
+ void
447
+ TreeCanvas::searchAll(void) {
448
+ QMutexLocker locker(&mutex);
449
+ searcher.search(currentNode, true, this);
450
+ }
451
+
452
+ void
453
+ TreeCanvas::searchOne(void) {
454
+ QMutexLocker locker(&mutex);
455
+ searcher.search(currentNode, false, this);
456
+ }
457
+
458
+ void
459
+ TreeCanvas::toggleHidden(void) {
460
+ QMutexLocker locker(&mutex);
461
+ currentNode->toggleHidden(*na);
462
+ update();
463
+ centerCurrentNode();
464
+ emit statusChanged(currentNode, stats, true);
465
+ }
466
+
467
+ void
468
+ TreeCanvas::hideFailed(void) {
469
+ QMutexLocker locker(&mutex);
470
+ currentNode->hideFailed(*na);
471
+ update();
472
+ centerCurrentNode();
473
+ emit statusChanged(currentNode, stats, true);
474
+ }
475
+
476
+ void
477
+ TreeCanvas::unhideAll(void) {
478
+ QMutexLocker locker(&mutex);
479
+ QMutexLocker layoutLocker(&layoutMutex);
480
+ currentNode->unhideAll(*na);
481
+ update();
482
+ centerCurrentNode();
483
+ emit statusChanged(currentNode, stats, true);
484
+ }
485
+
486
+ void
487
+ TreeCanvas::toggleStop(void) {
488
+ QMutexLocker locker(&mutex);
489
+ currentNode->toggleStop(*na);
490
+ update();
491
+ centerCurrentNode();
492
+ emit statusChanged(currentNode, stats, true);
493
+ }
494
+
495
+ void
496
+ TreeCanvas::unstopAll(void) {
497
+ QMutexLocker locker(&mutex);
498
+ QMutexLocker layoutLocker(&layoutMutex);
499
+ currentNode->unstopAll(*na);
500
+ update();
501
+ centerCurrentNode();
502
+ emit statusChanged(currentNode, stats, true);
503
+ }
504
+
505
+ void
506
+ TreeCanvas::timerEvent(QTimerEvent* e) {
507
+ if (e->timerId() == layoutDoneTimerId) {
508
+ if (!smoothScrollAndZoom) {
509
+ scaleTree(targetScale);
510
+ } else {
511
+ zoomTimeLine.stop();
512
+ int zoomCurrent = static_cast<int>(scale*100);
513
+ int targetZoom = targetScale;
514
+ targetZoom = std::min(std::max(targetZoom, LayoutConfig::minScale),
515
+ LayoutConfig::maxAutoZoomScale);
516
+ zoomTimeLine.setFrameRange(zoomCurrent,targetZoom);
517
+ zoomTimeLine.start();
518
+ }
519
+ QWidget::update();
520
+ killTimer(layoutDoneTimerId);
521
+ layoutDoneTimerId = 0;
522
+ }
523
+ }
524
+
525
+ void
526
+ TreeCanvas::zoomToFit(void) {
527
+ QMutexLocker locker(&layoutMutex);
528
+ if (root != NULL) {
529
+ BoundingBox bb;
530
+ bb = root->getBoundingBox();
531
+ QWidget* p = parentWidget();
532
+ if (p) {
533
+ double newXScale =
534
+ static_cast<double>(p->width()) / (bb.right - bb.left +
535
+ Layout::extent);
536
+ double newYScale =
537
+ static_cast<double>(p->height()) / (root->getShape()->depth() *
538
+ Layout::dist_y +
539
+ 2*Layout::extent);
540
+ int scale0 = static_cast<int>(std::min(newXScale, newYScale)*100);
541
+ if (scale0<LayoutConfig::minScale)
542
+ scale0 = LayoutConfig::minScale;
543
+ if (scale0>LayoutConfig::maxAutoZoomScale)
544
+ scale0 = LayoutConfig::maxAutoZoomScale;
545
+
546
+ if (!smoothScrollAndZoom) {
547
+ scaleTree(scale0);
548
+ } else {
549
+ zoomTimeLine.stop();
550
+ int zoomCurrent = static_cast<int>(scale*100);
551
+ int targetZoom = scale0;
552
+ targetZoom = std::min(std::max(targetZoom, LayoutConfig::minScale),
553
+ LayoutConfig::maxAutoZoomScale);
554
+ zoomTimeLine.setFrameRange(zoomCurrent,targetZoom);
555
+ zoomTimeLine.start();
556
+ }
557
+ }
558
+ }
559
+ }
560
+
561
+ void
562
+ TreeCanvas::centerCurrentNode(void) {
563
+ QMutexLocker locker(&mutex);
564
+ int x=0;
565
+ int y=0;
566
+
567
+ VisualNode* c = currentNode;
568
+ while (c != NULL) {
569
+ x += c->getOffset();
570
+ y += Layout::dist_y;
571
+ c = c->getParent(*na);
572
+ }
573
+
574
+ x = static_cast<int>((xtrans+x)*scale); y = static_cast<int>(y*scale);
575
+
576
+ QAbstractScrollArea* sa =
577
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
578
+
579
+ x -= sa->viewport()->width() / 2;
580
+ y -= sa->viewport()->height() / 2;
581
+
582
+ sourceX = sa->horizontalScrollBar()->value();
583
+ targetX = std::max(sa->horizontalScrollBar()->minimum(), x);
584
+ targetX = std::min(sa->horizontalScrollBar()->maximum(),
585
+ targetX);
586
+ sourceY = sa->verticalScrollBar()->value();
587
+ targetY = std::max(sa->verticalScrollBar()->minimum(), y);
588
+ targetY = std::min(sa->verticalScrollBar()->maximum(),
589
+ targetY);
590
+ if (!smoothScrollAndZoom) {
591
+ sa->horizontalScrollBar()->setValue(targetX);
592
+ sa->verticalScrollBar()->setValue(targetY);
593
+ } else {
594
+ scrollTimeLine.stop();
595
+ scrollTimeLine.setFrameRange(0,100);
596
+ scrollTimeLine.setDuration(std::max(200,
597
+ std::min(1000,
598
+ std::min(std::abs(sourceX-targetX),
599
+ std::abs(sourceY-targetY)))));
600
+ scrollTimeLine.start();
601
+ }
602
+ }
603
+
604
+ void
605
+ TreeCanvas::scroll(int i) {
606
+ QAbstractScrollArea* sa =
607
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
608
+ double p = static_cast<double>(i)/100.0;
609
+ double xdiff = static_cast<double>(targetX-sourceX)*p;
610
+ double ydiff = static_cast<double>(targetY-sourceY)*p;
611
+ sa->horizontalScrollBar()->setValue(sourceX+static_cast<int>(xdiff));
612
+ sa->verticalScrollBar()->setValue(sourceY+static_cast<int>(ydiff));
613
+ }
614
+
615
+ void
616
+ TreeCanvas::inspectCurrentNode(bool fix, int inspectorNo) {
617
+ QMutexLocker locker(&mutex);
618
+
619
+ if (currentNode->isHidden()) {
620
+ toggleHidden();
621
+ return;
622
+ }
623
+
624
+ int failedInspectorType = -1;
625
+ int failedInspector = -1;
626
+ bool needCentering = false;
627
+ try {
628
+ switch (currentNode->getStatus()) {
629
+ case UNDETERMINED:
630
+ {
631
+ unsigned int kids =
632
+ currentNode->getNumberOfChildNodes(*na,curBest,stats,c_d,a_d);
633
+ int depth = -1;
634
+ for (VisualNode* p = currentNode; p != NULL; p=p->getParent(*na))
635
+ depth++;
636
+ if (kids > 0) {
637
+ needCentering = true;
638
+ depth++;
639
+ }
640
+ stats.maxDepth =
641
+ std::max(stats.maxDepth, depth);
642
+ if (currentNode->getStatus() == SOLVED) {
643
+ assert(currentNode->hasCopy());
644
+ emit solution(currentNode->getWorkingSpace());
645
+ }
646
+ emit statusChanged(currentNode,stats,true);
647
+ for (int i=0; i<moveInspectors.size(); i++) {
648
+ if (moveInspectors[i].second) {
649
+ failedInspectorType = 0;
650
+ failedInspector = i;
651
+ moveInspectors[i].first->
652
+ inspect(*currentNode->getWorkingSpace());
653
+ failedInspectorType = -1;
654
+ }
655
+ }
656
+ if (currentNode->getStatus() == SOLVED) {
657
+ currentNode->purge(*na);
658
+ }
659
+ }
660
+ break;
661
+ case FAILED:
662
+ case STOP:
663
+ case UNSTOP:
664
+ case BRANCH:
665
+ case SOLVED:
666
+ {
667
+ // SizeCursor sc(currentNode);
668
+ // PreorderNodeVisitor<SizeCursor> pnv(sc);
669
+ // int nodes = 1;
670
+ // while (pnv.next()) { nodes++; }
671
+ // std::cout << "sizeof(VisualNode): " << sizeof(VisualNode)
672
+ // << std::endl;
673
+ // std::cout << "Size: " << (pnv.getCursor().s)/1024 << std::endl;
674
+ // std::cout << "Nodes: " << nodes << std::endl;
675
+ // std::cout << "Size / node: " << (pnv.getCursor().s)/nodes
676
+ // << std::endl;
677
+
678
+ Space* curSpace;
679
+
680
+ if (fix) {
681
+ if (currentNode->isRoot() && currentNode->getStatus() == FAILED)
682
+ break;
683
+ curSpace = currentNode->getSpace(*na,curBest,c_d,a_d);
684
+ if (currentNode->getStatus() == SOLVED &&
685
+ curSpace->status() != SS_SOLVED) {
686
+ // in the presence of weakly monotonic propagators, we may have to
687
+ // use search to find the solution here
688
+ Space* dfsSpace = Gecode::dfs(curSpace);
689
+ delete curSpace;
690
+ curSpace = dfsSpace;
691
+ }
692
+ } else {
693
+ if (currentNode->isRoot())
694
+ break;
695
+ VisualNode* p = currentNode->getParent(*na);
696
+ curSpace = p->getSpace(*na,curBest,c_d,a_d);
697
+ switch (curSpace->status()) {
698
+ case SS_SOLVED:
699
+ case SS_FAILED:
700
+ break;
701
+ case SS_BRANCH:
702
+ curSpace->commit(*p->getChoice(),
703
+ currentNode->getAlternative(*na));
704
+ break;
705
+ default:
706
+ GECODE_NEVER;
707
+ }
708
+ }
709
+
710
+ if (inspectorNo==-1) {
711
+ for (int i=0; i<doubleClickInspectors.size(); i++) {
712
+ if (doubleClickInspectors[i].second) {
713
+ failedInspectorType = 1;
714
+ failedInspector = i;
715
+ doubleClickInspectors[i].first->inspect(*curSpace);
716
+ failedInspectorType = -1;
717
+ }
718
+ }
719
+ } else {
720
+ failedInspectorType = 1;
721
+ failedInspector = inspectorNo;
722
+ doubleClickInspectors[inspectorNo].first->inspect(*curSpace);
723
+ failedInspectorType = -1;
724
+ }
725
+ delete curSpace;
726
+ }
727
+ break;
728
+ }
729
+ } catch (Exception e) {
730
+ switch (failedInspectorType) {
731
+ case 0:
732
+ std::cerr << "Exception in move inspector "
733
+ << failedInspector;
734
+ break;
735
+ case 1:
736
+ std::cerr << "Exception in double-click inspector "
737
+ << failedInspector;
738
+ break;
739
+ default:
740
+ std::cerr << "Exception ";
741
+ break;
742
+ }
743
+ std::cerr << ": " << e.what() << "." << std::endl;
744
+ std::cerr << "Stopping..." << std::endl;
745
+ std::exit(EXIT_FAILURE);
746
+ }
747
+
748
+ currentNode->dirtyUp(*na);
749
+ update();
750
+ if (needCentering)
751
+ centerCurrentNode();
752
+ }
753
+
754
+ void
755
+ TreeCanvas::inspectBeforeFP(void) {
756
+ inspectCurrentNode(false);
757
+ }
758
+
759
+ void
760
+ TreeCanvas::inspectSolution(const Space* s) {
761
+ int failedInspectorType = -1;
762
+ int failedInspector = -1;
763
+ try {
764
+ Space* c = NULL;
765
+ for (int i=0; i<solutionInspectors.size(); i++) {
766
+ if (solutionInspectors[i].second) {
767
+ if (c == NULL)
768
+ c = s->clone();
769
+ failedInspectorType = 1;
770
+ failedInspector = i;
771
+ solutionInspectors[i].first->inspect(*c);
772
+ failedInspectorType = -1;
773
+ }
774
+ }
775
+ delete c;
776
+ } catch (Exception e) {
777
+ switch (failedInspectorType) {
778
+ case 0:
779
+ std::cerr << "Exception in move inspector "
780
+ << failedInspector;
781
+ break;
782
+ case 1:
783
+ std::cerr << "Exception in solution inspector "
784
+ << failedInspector;
785
+ break;
786
+ default:
787
+ std::cerr << "Exception ";
788
+ break;
789
+ }
790
+ std::cerr << ": " << e.what() << "." << std::endl;
791
+ std::cerr << "Stopping..." << std::endl;
792
+ std::exit(EXIT_FAILURE);
793
+ }
794
+ }
795
+
796
+ void
797
+ TreeCanvas::stopSearch(void) {
798
+ stopSearchFlag = true;
799
+ layoutDoneTimerId = startTimer(15);
800
+ }
801
+
802
+ void
803
+ TreeCanvas::reset(void) {
804
+ QMutexLocker locker(&mutex);
805
+ Space* rootSpace =
806
+ root->getStatus() == FAILED ? NULL :
807
+ root->getSpace(*na,curBest,c_d,a_d);
808
+ if (curBest != NULL) {
809
+ delete curBest;
810
+ curBest = new BestNode(NULL);
811
+ }
812
+ if (root) {
813
+ DisposeCursor dc(root,*na);
814
+ PreorderNodeVisitor<DisposeCursor>(dc).run();
815
+ }
816
+ delete na;
817
+ na = new Node::NodeAllocator(curBest != NULL);
818
+ int rootIdx = na->allocate(rootSpace);
819
+ assert(rootIdx == 0); (void) rootIdx;
820
+ root = (*na)[0];
821
+ root->setMarked(true);
822
+ currentNode = root;
823
+ pathHead = root;
824
+ scale = 1.0;
825
+ stats = Statistics();
826
+ for (int i=bookmarks.size(); i--;)
827
+ emit removedBookmark(i);
828
+ bookmarks.clear();
829
+ root->layout(*na);
830
+
831
+ emit statusChanged(currentNode, stats, true);
832
+ update();
833
+ }
834
+
835
+ void
836
+ TreeCanvas::bookmarkNode(void) {
837
+ QMutexLocker locker(&mutex);
838
+ if (!currentNode->isBookmarked()) {
839
+ bool ok;
840
+ QString text =
841
+ QInputDialog::getText(this, "Add bookmark", "Name:",
842
+ QLineEdit::Normal,"",&ok);
843
+ if (ok) {
844
+ currentNode->setBookmarked(true);
845
+ bookmarks.append(currentNode);
846
+ if (text == "")
847
+ text = QString("Node ")+QString().setNum(bookmarks.size());
848
+ emit addedBookmark(text);
849
+ }
850
+ } else {
851
+ currentNode->setBookmarked(false);
852
+ int idx = bookmarks.indexOf(currentNode);
853
+ bookmarks.remove(idx);
854
+ emit removedBookmark(idx);
855
+ }
856
+ currentNode->dirtyUp(*na);
857
+ update();
858
+ }
859
+
860
+ void
861
+ TreeCanvas::setPath(void) {
862
+ QMutexLocker locker(&mutex);
863
+ if(currentNode == pathHead)
864
+ return;
865
+
866
+ pathHead->unPathUp(*na);
867
+ pathHead = currentNode;
868
+
869
+ currentNode->pathUp(*na);
870
+ currentNode->dirtyUp(*na);
871
+ update();
872
+ }
873
+
874
+ void
875
+ TreeCanvas::inspectPath(void) {
876
+ QMutexLocker locker(&mutex);
877
+ setCurrentNode(root);
878
+ if (currentNode->isOnPath()) {
879
+ inspectCurrentNode();
880
+ int nextAlt = currentNode->getPathAlternative(*na);
881
+ while (nextAlt >= 0) {
882
+ setCurrentNode(currentNode->getChild(*na,nextAlt));
883
+ inspectCurrentNode();
884
+ nextAlt = currentNode->getPathAlternative(*na);
885
+ }
886
+ }
887
+ update();
888
+ }
889
+
890
+ void
891
+ TreeCanvas::startCompareNodes(void) {
892
+ QMutexLocker locker(&mutex);
893
+ compareNodes = true;
894
+ compareNodesBeforeFP = false;
895
+ setCursor(QCursor(Qt::CrossCursor));
896
+ }
897
+
898
+ void
899
+ TreeCanvas::startCompareNodesBeforeFP(void) {
900
+ QMutexLocker locker(&mutex);
901
+ compareNodes = true;
902
+ compareNodesBeforeFP = true;
903
+ setCursor(QCursor(Qt::CrossCursor));
904
+ }
905
+
906
+ void
907
+ TreeCanvas::emitStatusChanged(void) {
908
+ emit statusChanged(currentNode, stats, true);
909
+ }
910
+
911
+ void
912
+ TreeCanvas::navUp(void) {
913
+ QMutexLocker locker(&mutex);
914
+
915
+ VisualNode* p = currentNode->getParent(*na);
916
+
917
+ setCurrentNode(p);
918
+
919
+ if (p != NULL) {
920
+ centerCurrentNode();
921
+ }
922
+ }
923
+
924
+ void
925
+ TreeCanvas::navDown(void) {
926
+ QMutexLocker locker(&mutex);
927
+ if (!currentNode->isHidden()) {
928
+ switch (currentNode->getStatus()) {
929
+ case STOP:
930
+ case UNSTOP:
931
+ case BRANCH:
932
+ {
933
+ int alt = std::max(0, currentNode->getPathAlternative(*na));
934
+ VisualNode* n = currentNode->getChild(*na,alt);
935
+ setCurrentNode(n);
936
+ centerCurrentNode();
937
+ break;
938
+ }
939
+ case SOLVED:
940
+ case FAILED:
941
+ case UNDETERMINED:
942
+ break;
943
+ }
944
+ }
945
+ }
946
+
947
+ void
948
+ TreeCanvas::navLeft(void) {
949
+ QMutexLocker locker(&mutex);
950
+ VisualNode* p = currentNode->getParent(*na);
951
+ if (p != NULL) {
952
+ int alt = currentNode->getAlternative(*na);
953
+ if (alt > 0) {
954
+ VisualNode* n = p->getChild(*na,alt-1);
955
+ setCurrentNode(n);
956
+ centerCurrentNode();
957
+ }
958
+ }
959
+ }
960
+
961
+ void
962
+ TreeCanvas::navRight(void) {
963
+ QMutexLocker locker(&mutex);
964
+ VisualNode* p = currentNode->getParent(*na);
965
+ if (p != NULL) {
966
+ unsigned int alt = currentNode->getAlternative(*na);
967
+ if (alt + 1 < p->getNumberOfChildren()) {
968
+ VisualNode* n = p->getChild(*na,alt+1);
969
+ setCurrentNode(n);
970
+ centerCurrentNode();
971
+ }
972
+ }
973
+ }
974
+
975
+ void
976
+ TreeCanvas::navRoot(void) {
977
+ QMutexLocker locker(&mutex);
978
+ setCurrentNode(root);
979
+ centerCurrentNode();
980
+ }
981
+
982
+ void
983
+ TreeCanvas::navNextSol(bool back) {
984
+ QMutexLocker locker(&mutex);
985
+ NextSolCursor nsc(currentNode,back,*na);
986
+ PreorderNodeVisitor<NextSolCursor> nsv(nsc);
987
+ nsv.run();
988
+ VisualNode* n = nsv.getCursor().node();
989
+ if (n != root) {
990
+ setCurrentNode(n);
991
+ centerCurrentNode();
992
+ }
993
+ }
994
+
995
+ void
996
+ TreeCanvas::navPrevSol(void) {
997
+ navNextSol(true);
998
+ }
999
+
1000
+ void
1001
+ TreeCanvas::exportNodePDF(VisualNode* n) {
1002
+ #if QT_VERSION >= 0x040400
1003
+ QString filename = QFileDialog::getSaveFileName(this, tr("Export tree as pdf"), "", tr("PDF (*.pdf)"));
1004
+ if (filename != "") {
1005
+ QPrinter printer(QPrinter::ScreenResolution);
1006
+ QMutexLocker locker(&mutex);
1007
+
1008
+ BoundingBox bb = n->getBoundingBox();
1009
+ printer.setFullPage(true);
1010
+ printer.setPaperSize(QSizeF(bb.right-bb.left+Layout::extent,
1011
+ n->getShape()->depth() * Layout::dist_y +
1012
+ Layout::extent), QPrinter::Point);
1013
+ printer.setOutputFileName(filename);
1014
+ QPainter painter(&printer);
1015
+
1016
+ painter.setRenderHint(QPainter::Antialiasing);
1017
+
1018
+ QRect pageRect = printer.pageRect();
1019
+ double newXScale =
1020
+ static_cast<double>(pageRect.width()) / (bb.right - bb.left +
1021
+ Layout::extent);
1022
+ double newYScale =
1023
+ static_cast<double>(pageRect.height()) /
1024
+ (n->getShape()->depth() * Layout::dist_y +
1025
+ Layout::extent);
1026
+ double printScale = std::min(newXScale, newYScale);
1027
+ painter.scale(printScale,printScale);
1028
+
1029
+ int printxtrans = -bb.left+(Layout::extent / 2);
1030
+
1031
+ painter.translate(printxtrans, Layout::dist_y / 2);
1032
+ QRect clip(0,0,0,0);
1033
+ DrawingCursor dc(n, *na, curBest, painter, clip, showCopies);
1034
+ currentNode->setMarked(false);
1035
+ PreorderNodeVisitor<DrawingCursor>(dc).run();
1036
+ currentNode->setMarked(true);
1037
+ }
1038
+ #else
1039
+ (void) n;
1040
+ #endif
1041
+ }
1042
+
1043
+ void
1044
+ TreeCanvas::exportWholeTreePDF(void) {
1045
+ #if QT_VERSION >= 0x040400
1046
+ exportNodePDF(root);
1047
+ #endif
1048
+ }
1049
+
1050
+ void
1051
+ TreeCanvas::exportPDF(void) {
1052
+ #if QT_VERSION >= 0x040400
1053
+ exportNodePDF(currentNode);
1054
+ #endif
1055
+ }
1056
+
1057
+ void
1058
+ TreeCanvas::print(void) {
1059
+ QPrinter printer;
1060
+ if (QPrintDialog(&printer, this).exec() == QDialog::Accepted) {
1061
+ QMutexLocker locker(&mutex);
1062
+
1063
+ BoundingBox bb = root->getBoundingBox();
1064
+ QRect pageRect = printer.pageRect();
1065
+ double newXScale =
1066
+ static_cast<double>(pageRect.width()) / (bb.right - bb.left +
1067
+ Layout::extent);
1068
+ double newYScale =
1069
+ static_cast<double>(pageRect.height()) /
1070
+ (root->getShape()->depth() * Layout::dist_y +
1071
+ 2*Layout::extent);
1072
+ double printScale = std::min(newXScale, newYScale)*100;
1073
+ if (printScale<1.0)
1074
+ printScale = 1.0;
1075
+ if (printScale > 400.0)
1076
+ printScale = 400.0;
1077
+ printScale = printScale / 100.0;
1078
+
1079
+ QPainter painter(&printer);
1080
+ painter.setRenderHint(QPainter::Antialiasing);
1081
+ painter.scale(printScale,printScale);
1082
+ painter.translate(xtrans, 0);
1083
+ QRect clip(0,0,0,0);
1084
+ DrawingCursor dc(root, *na, curBest, painter, clip, showCopies);
1085
+ PreorderNodeVisitor<DrawingCursor>(dc).run();
1086
+ }
1087
+ }
1088
+
1089
+ VisualNode*
1090
+ TreeCanvas::eventNode(QEvent* event) {
1091
+ int x = 0;
1092
+ int y = 0;
1093
+ switch (event->type()) {
1094
+ case QEvent::ToolTip:
1095
+ {
1096
+ QHelpEvent* he = static_cast<QHelpEvent*>(event);
1097
+ x = he->x();
1098
+ y = he->y();
1099
+ break;
1100
+ }
1101
+ case QEvent::MouseButtonDblClick:
1102
+ case QEvent::MouseButtonPress:
1103
+ case QEvent::MouseButtonRelease:
1104
+ case QEvent::MouseMove:
1105
+ {
1106
+ QMouseEvent* me = static_cast<QMouseEvent*>(event);
1107
+ x = me->x();
1108
+ y = me->y();
1109
+ break;
1110
+ }
1111
+ case QEvent::ContextMenu:
1112
+ {
1113
+ QContextMenuEvent* ce = static_cast<QContextMenuEvent*>(event);
1114
+ x = ce->x();
1115
+ y = ce->y();
1116
+ break;
1117
+ }
1118
+ default:
1119
+ return NULL;
1120
+ }
1121
+ QAbstractScrollArea* sa =
1122
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
1123
+ int xoff = sa->horizontalScrollBar()->value()/scale;
1124
+ int yoff = sa->verticalScrollBar()->value()/scale;
1125
+
1126
+ BoundingBox bb = root->getBoundingBox();
1127
+ int w =
1128
+ static_cast<int>((bb.right-bb.left+Layout::extent)*scale);
1129
+ if (w < sa->viewport()->width())
1130
+ xoff -= (sa->viewport()->width()-w)/2;
1131
+
1132
+ VisualNode* n;
1133
+ n = root->findNode(*na,
1134
+ static_cast<int>(x/scale-xtrans+xoff),
1135
+ static_cast<int>((y-30)/scale+yoff));
1136
+ return n;
1137
+ }
1138
+
1139
+ bool
1140
+ TreeCanvas::event(QEvent* event) {
1141
+ if (mutex.tryLock()) {
1142
+ if (event->type() == QEvent::ToolTip) {
1143
+ VisualNode* n = eventNode(event);
1144
+ if (n != NULL && !n->isHidden() &&
1145
+ (n->getStatus() == BRANCH || n->getStatus() == STOP)) {
1146
+ QHelpEvent* he = static_cast<QHelpEvent*>(event);
1147
+ QToolTip::showText(he->globalPos(),
1148
+ QString(n->toolTip(curBest,c_d,a_d).c_str()));
1149
+ } else {
1150
+ QToolTip::hideText();
1151
+ }
1152
+ }
1153
+ mutex.unlock();
1154
+ }
1155
+ return QWidget::event(event);
1156
+ }
1157
+
1158
+ void
1159
+ TreeCanvas::resizeToOuter(void) {
1160
+ if (autoZoom)
1161
+ zoomToFit();
1162
+ }
1163
+
1164
+ void
1165
+ TreeCanvas::paintEvent(QPaintEvent* event) {
1166
+ QMutexLocker locker(&layoutMutex);
1167
+ QPainter painter(this);
1168
+ painter.setRenderHint(QPainter::Antialiasing);
1169
+
1170
+ QAbstractScrollArea* sa =
1171
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
1172
+ int xoff = sa->horizontalScrollBar()->value()/scale;
1173
+ int yoff = sa->verticalScrollBar()->value()/scale;
1174
+
1175
+ BoundingBox bb = root->getBoundingBox();
1176
+ int w =
1177
+ static_cast<int>((bb.right-bb.left+Layout::extent)*scale);
1178
+ if (w < sa->viewport()->width())
1179
+ xoff -= (sa->viewport()->width()-w)/2;
1180
+
1181
+ QRect origClip = event->rect();
1182
+ painter.translate(0, 30);
1183
+ painter.scale(scale,scale);
1184
+ painter.translate(xtrans-xoff, -yoff);
1185
+ QRect clip(static_cast<int>(origClip.x()/scale-xtrans+xoff),
1186
+ static_cast<int>(origClip.y()/scale+yoff),
1187
+ static_cast<int>(origClip.width()/scale),
1188
+ static_cast<int>(origClip.height()/scale));
1189
+ DrawingCursor dc(root, *na, curBest, painter, clip, showCopies);
1190
+ PreorderNodeVisitor<DrawingCursor>(dc).run();
1191
+
1192
+ // int nodesLayouted = 1;
1193
+ // clock_t t0 = clock();
1194
+ // while (v.next()) { nodesLayouted++; }
1195
+ // double t = (static_cast<double>(clock()-t0) / CLOCKS_PER_SEC) * 1000.0;
1196
+ // double nps = static_cast<double>(nodesLayouted) /
1197
+ // (static_cast<double>(clock()-t0) / CLOCKS_PER_SEC);
1198
+ // std::cout << "Drawing done. " << nodesLayouted << " nodes in "
1199
+ // << t << " ms. " << nps << " nodes/s." << std::endl;
1200
+
1201
+ }
1202
+
1203
+ void
1204
+ TreeCanvas::mouseDoubleClickEvent(QMouseEvent* event) {
1205
+ if (mutex.tryLock()) {
1206
+ if(event->button() == Qt::LeftButton) {
1207
+ VisualNode* n = eventNode(event);
1208
+ if(n == currentNode) {
1209
+ inspectCurrentNode();
1210
+ event->accept();
1211
+ mutex.unlock();
1212
+ return;
1213
+ }
1214
+ }
1215
+ mutex.unlock();
1216
+ }
1217
+ event->ignore();
1218
+ }
1219
+
1220
+ void
1221
+ TreeCanvas::contextMenuEvent(QContextMenuEvent* event) {
1222
+ if (mutex.tryLock()) {
1223
+ VisualNode* n = eventNode(event);
1224
+ if (n != NULL) {
1225
+ setCurrentNode(n);
1226
+ emit contextMenu(event);
1227
+ event->accept();
1228
+ mutex.unlock();
1229
+ return;
1230
+ }
1231
+ mutex.unlock();
1232
+ }
1233
+ event->ignore();
1234
+ }
1235
+
1236
+ void
1237
+ TreeCanvas::resizeEvent(QResizeEvent* e) {
1238
+ QAbstractScrollArea* sa =
1239
+ static_cast<QAbstractScrollArea*>(parentWidget()->parentWidget());
1240
+
1241
+ int w = sa->horizontalScrollBar()->maximum()+e->oldSize().width();
1242
+ int h = sa->verticalScrollBar()->maximum()+e->oldSize().height();
1243
+
1244
+ sa->horizontalScrollBar()->setRange(0,w-e->size().width());
1245
+ sa->verticalScrollBar()->setRange(0,h-e->size().height());
1246
+ sa->horizontalScrollBar()->setPageStep(e->size().width());
1247
+ sa->verticalScrollBar()->setPageStep(e->size().height());
1248
+ }
1249
+
1250
+ void
1251
+ TreeCanvas::wheelEvent(QWheelEvent* event) {
1252
+ if (event->modifiers() & Qt::ShiftModifier) {
1253
+ event->accept();
1254
+ if (event->orientation() == Qt::Vertical && !autoZoom)
1255
+ scaleTree(scale*100+ceil(static_cast<double>(event->delta())/4.0),
1256
+ event->x(), event->y());
1257
+ } else {
1258
+ event->ignore();
1259
+ }
1260
+ }
1261
+
1262
+ bool
1263
+ TreeCanvas::finish(void) {
1264
+ if (finishedFlag)
1265
+ return true;
1266
+ stopSearchFlag = true;
1267
+ finishedFlag = true;
1268
+ for (int i=0; i<doubleClickInspectors.size(); i++)
1269
+ doubleClickInspectors[i].first->finalize();
1270
+ for (int i=0; i<solutionInspectors.size(); i++)
1271
+ solutionInspectors[i].first->finalize();
1272
+ for (int i=0; i<moveInspectors.size(); i++)
1273
+ moveInspectors[i].first->finalize();
1274
+ for (int i=0; i<comparators.size(); i++)
1275
+ comparators[i].first->finalize();
1276
+ return !searcher.isRunning();
1277
+ }
1278
+
1279
+ void
1280
+ TreeCanvas::setCurrentNode(VisualNode* n, bool update) {
1281
+ QMutexLocker locker(&mutex);
1282
+ if (update && n != NULL && n != currentNode &&
1283
+ n->getStatus() != UNDETERMINED && !n->isHidden()) {
1284
+ Space* curSpace = NULL;
1285
+ for (int i=0; i<moveInspectors.size(); i++) {
1286
+ if (moveInspectors[i].second) {
1287
+ if (curSpace == NULL)
1288
+ curSpace = n->getSpace(*na,curBest,c_d,a_d);
1289
+ try {
1290
+ moveInspectors[i].first->inspect(*curSpace);
1291
+ } catch (Exception e) {
1292
+ std::cerr << "Exception in move inspector " << i
1293
+ << ": " << e.what() << "." << std::endl;
1294
+ std::cerr << "Stopping..." << std::endl;
1295
+ std::exit(EXIT_FAILURE);
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ if (n != NULL) {
1301
+ currentNode->setMarked(false);
1302
+ currentNode = n;
1303
+ currentNode->setMarked(true);
1304
+ emit statusChanged(currentNode,stats,true);
1305
+ if (update) {
1306
+ compareNodes = false;
1307
+ setCursor(QCursor(Qt::ArrowCursor));
1308
+ QWidget::update();
1309
+ }
1310
+ }
1311
+ }
1312
+
1313
+ void
1314
+ TreeCanvas::mousePressEvent(QMouseEvent* event) {
1315
+ if (mutex.tryLock()) {
1316
+ if (event->button() == Qt::LeftButton) {
1317
+ VisualNode* n = eventNode(event);
1318
+ if (compareNodes) {
1319
+ if (n != NULL && n->getStatus() != UNDETERMINED &&
1320
+ currentNode != NULL &&
1321
+ currentNode->getStatus() != UNDETERMINED) {
1322
+ Space* curSpace = NULL;
1323
+ Space* compareSpace = NULL;
1324
+ for (int i=0; i<comparators.size(); i++) {
1325
+ if (comparators[i].second) {
1326
+ if (curSpace == NULL) {
1327
+ curSpace = currentNode->getSpace(*na,curBest,c_d,a_d);
1328
+
1329
+ if (!compareNodesBeforeFP || n->isRoot()) {
1330
+ compareSpace = n->getSpace(*na,curBest,c_d,a_d);
1331
+ } else {
1332
+ VisualNode* p = n->getParent(*na);
1333
+ compareSpace = p->getSpace(*na,curBest,c_d,a_d);
1334
+ switch (compareSpace->status()) {
1335
+ case SS_SOLVED:
1336
+ case SS_FAILED:
1337
+ break;
1338
+ case SS_BRANCH:
1339
+ compareSpace->commit(*p->getChoice(),
1340
+ n->getAlternative(*na));
1341
+ break;
1342
+ default:
1343
+ GECODE_NEVER;
1344
+ }
1345
+ }
1346
+ }
1347
+ comparators[i].first->compare(*curSpace,*compareSpace);
1348
+ }
1349
+ }
1350
+ }
1351
+ } else {
1352
+ setCurrentNode(n);
1353
+ }
1354
+ compareNodes = false;
1355
+ setCursor(QCursor(Qt::ArrowCursor));
1356
+ if (n != NULL) {
1357
+ event->accept();
1358
+ mutex.unlock();
1359
+ return;
1360
+ }
1361
+ }
1362
+ mutex.unlock();
1363
+ }
1364
+ event->ignore();
1365
+ }
1366
+
1367
+ void
1368
+ TreeCanvas::setRecompDistances(int c_d0, int a_d0) {
1369
+ c_d = c_d0; a_d = a_d0;
1370
+ }
1371
+
1372
+ void
1373
+ TreeCanvas::setAutoHideFailed(bool b) {
1374
+ autoHideFailed = b;
1375
+ }
1376
+
1377
+ void
1378
+ TreeCanvas::setAutoZoom(bool b) {
1379
+ autoZoom = b;
1380
+ if (autoZoom) {
1381
+ zoomToFit();
1382
+ }
1383
+ emit autoZoomChanged(b);
1384
+ scaleBar->setEnabled(!b);
1385
+ }
1386
+
1387
+ void
1388
+ TreeCanvas::setShowCopies(bool b) {
1389
+ showCopies = b;
1390
+ }
1391
+ bool
1392
+ TreeCanvas::getShowCopies(void) {
1393
+ return showCopies;
1394
+ }
1395
+
1396
+ bool
1397
+ TreeCanvas::getAutoHideFailed(void) {
1398
+ return autoHideFailed;
1399
+ }
1400
+
1401
+ bool
1402
+ TreeCanvas::getAutoZoom(void) {
1403
+ return autoZoom;
1404
+ }
1405
+
1406
+ void
1407
+ TreeCanvas::setRefresh(int i) {
1408
+ refresh = i;
1409
+ }
1410
+
1411
+ void
1412
+ TreeCanvas::setRefreshPause(int i) {
1413
+ refreshPause = i;
1414
+ if (refreshPause > 0)
1415
+ refresh = 1;
1416
+ }
1417
+
1418
+ bool
1419
+ TreeCanvas::getSmoothScrollAndZoom(void) {
1420
+ return smoothScrollAndZoom;
1421
+ }
1422
+
1423
+ void
1424
+ TreeCanvas::setSmoothScrollAndZoom(bool b) {
1425
+ smoothScrollAndZoom = b;
1426
+ }
1427
+
1428
+ }}
1429
+
1430
+ // STATISTICS: gist-any