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.
- checksums.yaml +7 -0
- data/.gitignore +26 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +20 -0
- data/dep-selector-libgecode.gemspec +25 -0
- data/ext/libgecode3/Makefile +8 -0
- data/ext/libgecode3/extconf.rb +57 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/LICENSE +25 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.contribs +88 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.dep +11307 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/Makefile.in +1795 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/changelog.in +6132 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/configure +13054 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac +356 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/configure.ac.in +352 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/README +26 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/AbstractWorker.hh +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Doxyfile +263 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Makefile.in.in +162 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.cc +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/OptVar.hh +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.cc +306 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCOPPlus.hh +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.cc +239 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/QCSPPlusUnblockable.hh +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/README +6 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.cc +253 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Strategy.hh +112 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.cc +59 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/StrategyNode.hh +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableBranching.hh +34 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.cc +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/UnblockableViewValBranching.hh +45 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.cc +48 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Work.hh +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkComparators.hh +67 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.cc +376 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/WorkManager.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.cc +285 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/Worker.hh +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/clean +5 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure +2637 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/configure.ac +44 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myDom.cc +59 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.cc +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/myspace.hh +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qecode.hh +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.cc +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_parallel.hh +43 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.cc +268 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcop.hh +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.cc +163 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_qcsp.hh +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.cc +423 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/qsolver_unblockable.hh +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/shortdesc.ac +1 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/contribs/qecode/vartype.hh +31 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.conf.in +1245 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/doxygen/doxygen.hh.in +594 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/all-interval.cpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/alpha.cpp +151 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/bacp.cpp +596 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/bibd.cpp +182 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/bin-packing.cpp +25363 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/black-hole.cpp +413 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/car-sequencing.cpp +653 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/crew.cpp +269 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/crossword.cpp +3954 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/crowded-chess.cpp +424 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/dominating-queens.cpp +170 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/domino.cpp +346 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/donald.cpp +135 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/efpa.cpp +323 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/eq20.cpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/golf.cpp +190 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/golomb-ruler.cpp +157 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/graph-color.cpp +425 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/grocery.cpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/hamming.cpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/ind-set.cpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/kakuro.cpp +627 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/knights.cpp +430 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/langford-number.cpp +218 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-sequence.cpp +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/magic-square.cpp +141 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/minesweeper.cpp +311 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/money.cpp +132 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/nonogram.cpp +1215 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/open-shop.cpp +412 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/ortho-latin.cpp +183 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/partition.cpp +145 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/pentominoes.cpp +952 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/perfect-square.cpp +317 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/photo.cpp +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/queen-armies.cpp +335 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/queens.cpp +214 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/radiotherapy.cpp +943 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/sat.cpp +260 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/schurs-lemma.cpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/scowl.hpp +14149 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/sports-league.cpp +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/steel-mill.cpp +654 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/steiner.cpp +170 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/sudoku.cpp +2294 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/tsp.cpp +339 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/warehouses.cpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/examples/word-square.cpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode.m4 +1272 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver.hh +602 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.cpp +435 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/options.hpp +418 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.cpp +104 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/driver/script.hpp +388 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc.hh +417 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/CHANGES +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/ast.hh +492 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/conexpr.hh +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.cpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.hh +47 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/myplugin.pro +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/exampleplugin/test_myplugin.fzn +1 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/flatzinc.cpp +1056 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.lxx +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/lexer.yy.cpp +2458 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_different_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/all_equal_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/among.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_least_set.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/at_most_set.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing.mzn +44 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_capa.mzn +45 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/bin_packing_load.mzn +45 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/circuit.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/count.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/cumulative.mzn +53 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_bool.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/decreasing_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/diffn.mzn +44 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/disjoint.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/distribute.mzn +46 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_int.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/exactly_set.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/gecode.mzn +98 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality.mzn +43 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_closed.mzn +39 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/global_cardinality_low_up_closed.mzn +40 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_bool.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/increasing_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/int_set_channel.mzn +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/inverse.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_less_int.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/lex_lesseq_int.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/link_set_to_booleans.mzn +47 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/maximum_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_bool.mzn +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/member_int.mzn +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/minimum_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/nvalue.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/partition_set.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/precedence.mzn +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/range.mzn +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/redefinitions.mzn +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/regular.mzn +38 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/roots.mzn +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sort.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/sum_pred.mzn +42 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_bool.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/mznlib/table_int.mzn +37 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/option.hh +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.hh +265 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.cpp +3571 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.tab.hh +164 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/parser.yxx +1604 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/plugin.hh +83 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.cpp +1812 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/registry.hh +71 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/symboltable.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/flatzinc/varspec.hh +163 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist.hh +298 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.cpp +288 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hh +110 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/drawingcursor.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.cpp +673 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gecodelogo.hh +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.cpp +120 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/gist.hpp +207 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hh +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/layoutcursor.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.cpp +341 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/mainwindow.hh +129 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.cpp +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hh +160 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/node.hpp +210 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hh +215 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodecursor.hpp +271 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.cpp +138 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodestats.hh +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodevisitor.hpp +126 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.cpp +90 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/nodewidget.hh +59 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.cpp +190 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/preferences.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.cpp +809 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/qtgist.hh +294 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.cpp +369 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hh +221 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/spacenode.hpp +191 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/mygist.cpp +80 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/standalone-example/standalone_example.pro +18 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.cpp +90 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/stopbrancher.hh +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.cpp +175 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/textoutput.hh +75 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.cpp +1430 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/treecanvas.hh +369 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.cpp +473 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hh +237 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/visualnode.hpp +220 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/gist/zoomToFitIcon.hpp +114 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int.hh +3477 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.cpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic.hh +666 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/abs.hpp +236 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/divmod.hpp +350 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/max.hpp +398 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/mult.hpp +750 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqr.hpp +377 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/arithmetic/sqrt.hpp +217 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array-traits.hpp +147 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.cpp +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/array.hpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.cpp +71 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing.hh +184 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.cpp +388 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bin-packing/propagate.hpp +219 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.cpp +755 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool.hh +581 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/base.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/clause.hpp +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eq.hpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.cpp +104 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/eqv.hpp +202 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/lq.hpp +241 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/bool/or.hpp +850 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.cpp +152 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch.hh +607 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-bool.hpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-val-int.hpp +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.bs +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-bool.cpp +438 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.bs +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/post-view-int.cpp +438 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-val.hpp +229 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-values.hpp +213 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/branch/select-view.hpp +364 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.cpp +172 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel.hh +249 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/base.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/dom.hpp +332 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.cpp +241 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-multi.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.cpp +77 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/link-single.hpp +71 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/channel/val.hpp +256 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.cpp +229 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit.hh +160 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/base.hpp +270 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/dom.hpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/circuit/val.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.cpp +417 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count.hh +410 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-base.hpp +80 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-eq.hpp +143 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-gq.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/int-lq.hpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/rel.hpp +281 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-base.hpp +131 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-eq.hpp +117 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-gq.hpp +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/count/view-lq.hpp +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.cpp +432 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative.hh +745 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/basic.hpp +211 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/edge-finding.hpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/man-prop.hpp +127 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/opt-prop.hpp +171 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/overload.hpp +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task-view.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/task.hpp +256 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulative/tree.hpp +272 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.cpp +187 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives.hh +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/cumulatives/val.hpp +380 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.cpp +97 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct.hh +314 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/bnd.hpp +444 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom-ctrl.hpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/dom.hpp +123 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/graph.hpp +266 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/ter-dom.hpp +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/distinct/val.hpp +185 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.cpp +135 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom.hh +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/range.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/dom/spec.hpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.cpp +190 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element.hh +384 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/int.hpp +443 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.cpp +151 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/pair.hpp +74 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/element/view.hpp +559 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exception.hpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.cpp +83 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec.hh +87 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.cpp +77 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/exec/when.hpp +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.cpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional.hh +508 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/base.hpp +163 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/basic.hpp +148 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.cpp +535 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/dfa.hpp +282 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/incremental.hpp +454 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/layered-graph.hpp +982 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.cpp +222 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/extensional/tuple-set.hpp +184 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.cpp +172 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc.hh +268 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd-sup.hpp +608 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/bnd.hpp +829 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom-sup.hpp +1777 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/dom.hpp +315 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/post.hpp +169 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/val.hpp +299 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/gcc/view.hpp +410 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-1.hpp +249 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set-2.hpp +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/int-set.cpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/limits.hpp +94 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-bool.cpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear-int.cpp +194 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear.hh +1560 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-int.hpp +743 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-post.cpp +602 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-scale.hpp +695 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/bool-view.hpp +319 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-bin.hpp +439 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-dom.hpp +484 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-nary.hpp +864 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-noview.hpp +251 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-post.cpp +561 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/int-ter.hpp +273 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/linear/post.hpp +152 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.cpp +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member.hh +125 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/prop.hpp +175 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/member/re-prop.hpp +178 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.cpp +226 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap.hh +318 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/base.hpp +88 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/box.hpp +198 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/dim.hpp +197 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/man.hpp +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/no-overlap/opt.hpp +153 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.cpp +244 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues.hh +429 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-base.hpp +98 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-eq.hpp +174 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-gq.hpp +149 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/bool-lq.hpp +151 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/graph.hpp +283 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-base.hpp +347 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-eq.hpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-gq.hpp +130 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/int-lq.hpp +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/range-event.hpp +51 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/nvalues/sym-bit-matrix.hpp +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.cpp +73 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede.hh +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/precede/single.hpp +232 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/propagator.hpp +311 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.cpp +381 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel.hh +665 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/eq.hpp +676 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lex.hpp +414 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/lq-le.hpp +537 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/rel/nq.hpp +196 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.cpp +197 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence.hh +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/int.hpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/set-op.hpp +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/view.hpp +499 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sequence/violations.hpp +101 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.cpp +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted.hh +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/matching.hpp +173 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/narrowing.hpp +250 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/order.hpp +213 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/propagate.hpp +646 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/sorted/sortsup.hpp +564 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hh +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/support-values.hpp +187 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task.hh +454 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/array.hpp +179 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/fwd-to-bwd.hpp +102 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/iter.hpp +92 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/man-to-opt.hpp +100 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/prop.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/purge.hpp +74 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/sort.hpp +234 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/task/tree.hpp +189 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.cpp +258 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary.hh +839 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/detectable.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/edge-finding.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/man-prop.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/not-first-not-last.hpp +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/opt-prop.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/overload.hpp +93 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/subsumption.hpp +55 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task-view.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/task.hpp +532 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unary/tree.hpp +229 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/unshare.cpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hh +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/val-set.hpp +186 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp.hpp +710 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.hpp +431 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/bool.vis +75 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/delta.hpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.cpp +361 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.hpp +1029 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var-imp/int.vis +117 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.cpp +53 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/bool.hpp +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.cpp +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/int.hpp +145 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/var/print.hpp +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph.hh +334 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/bi-link.hpp +89 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/comb-ptr-flag.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/edge.hpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/graph.hpp +202 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/iter-prune-val.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view-val-graph/node.hpp +171 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view.hpp +1690 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool-test.hpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/bool.hpp +314 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/cached.hpp +402 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/constint.hpp +324 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/int.hpp +264 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/iter.hpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/minus.hpp +300 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/neg-bool.hpp +177 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/offset.hpp +303 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/print.hpp +162 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/rel-test.hpp +231 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/scale.hpp +368 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/int/view/zero.hpp +305 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter.hh +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-add.hpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-append.hpp +222 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-array.hpp +139 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-cache.hpp +106 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-compl.hpp +220 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-diff.hpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-empty.hpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-inter.hpp +309 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-list.hpp +263 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-map.hpp +260 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minmax.hpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-minus.hpp +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-negative.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-offset.hpp +127 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-operations.hpp +157 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-positive.hpp +139 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-rangelist.hpp +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-scale.hpp +238 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton-append.hpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-singleton.hpp +86 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-size.hpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-union.hpp +361 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/ranges-values.hpp +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-array.hpp +120 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-bitset.hpp +114 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-inter.hpp +130 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-list.hpp +186 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-map.hpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-minus.hpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-negative.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-offset.hpp +113 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-positive.hpp +123 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-ranges.hpp +106 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-singleton.hpp +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-union.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/iter/values-unique.hpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel.hh +194 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/advisor.hpp +102 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/allocators.hpp +476 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.cpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/archive.hpp +298 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/array.hpp +2133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.cpp +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/branch.hpp +254 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-tiebreak.hpp +615 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-val.hpp +126 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher-view.hpp +455 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/brancher.hpp +431 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.cpp +563 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/core.hpp +3668 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/exception.hpp +124 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/global-prop-info.hpp +258 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/macros.hpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-config.hpp +154 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.cpp +53 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/memory-manager.hpp +511 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/modevent.hpp +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/propagator.hpp +699 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/range-list.hpp +184 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.cpp +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/region.hpp +459 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/shared-array.hpp +345 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-imp.hpp +332 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var-type.hpp +767 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/var.hpp +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/view.hpp +715 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/kernel/wait.hh +244 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel.hh +1870 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/arithmetic.cpp +408 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.cpp +522 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/bool-expr.hpp +87 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/exception.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.cpp +594 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-expr.hpp +297 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.cpp +414 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/lin-rel.hpp +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/matrix.hpp +247 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/optimize.hpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.cpp +817 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/reg.hpp +94 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.cpp +704 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-expr.hpp +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.cpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/minimodel/set-rel.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search.hh +458 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.cpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/bab.hpp +91 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.cpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/dfs.hpp +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/options.hpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.cpp +178 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/bab.hh +203 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.cpp +176 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/dfs.hh +195 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.cpp +118 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/engine.hh +418 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/path.hh +477 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.cpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/parallel/restart.hh +73 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.cpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/restart.hpp +88 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/bab.hh +177 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/dfs.hh +176 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/path.hh +411 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/sequential/restart.hh +89 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/statistics.hpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.cpp +83 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/stop.hpp +137 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/support.hh +91 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/search/worker.hh +202 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set.hh +1144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array-traits.hpp +86 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.cpp +219 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/array.hpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.cpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch.hh +438 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-val.hpp +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.bs +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/post-view.cpp +370 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-val.hpp +204 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/branch/select-view.hpp +306 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/cardinality.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.cpp +60 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex.hh +107 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.cpp +97 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/conv.hpp +67 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.cpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/convex/hull.hpp +68 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.cpp +56 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct.hh +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.cpp +162 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/distinct/atmostOne.hpp +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/dom.cpp +300 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.cpp +255 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element.hh +218 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/disjoint.hpp +324 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/inter.hpp +308 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/union.hpp +342 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/element/unionConst.hpp +293 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exception.hpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/exec.cpp +58 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.cpp +191 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int.hh +459 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/card.hpp +93 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-bool.hpp +282 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/channel-int.hpp +158 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/match.hpp +199 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/minmax.hpp +645 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/int/weights.hpp +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/limits.hpp +62 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.cpp +74 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede.hh +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/precede/single.hpp +255 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvc.cpp +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-cvv.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcc.cpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vcv.cpp +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-const-vvc.cpp +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-singleton.cpp +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op-ternary.cpp +60 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.cpp +105 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op.hh +297 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/common.hpp +619 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/inter.hpp +389 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/partition.hpp +164 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvc.cpp +58 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-cvv.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl-vvc.cpp +57 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-compl.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvc.cpp +55 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-cvv.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl-vvc.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post-nocompl.cpp +54 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/post.hpp +266 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/subofunion.hpp +166 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/superofinter.hpp +167 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel-op/union.hpp +319 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.cpp +232 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel.hh +322 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/common.hpp +125 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/eq.hpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/lq.hpp +417 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nosubset.hpp +104 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/nq.hpp +160 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-eq.hpp +152 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-lq.hpp +182 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/re-subset.hpp +146 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/rel/subset.hpp +96 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.cpp +64 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence.hh +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/common.hpp +100 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.cpp +145 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq-u.hpp +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.cpp +76 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/sequence/seq.hpp +69 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp.hpp +634 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/delta.hpp +78 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.cpp +348 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/integerset.hpp +426 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/iter.hpp +63 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.cpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.hpp +531 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var-imp/set.vis +197 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/print.hpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.cpp +111 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/var/set.hpp +254 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view.hpp +1142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/cached.hpp +399 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/complement.hpp +556 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/const.hpp +723 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/print.hpp +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/set.hpp +263 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/set/view/singleton.hpp +402 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support.hh +135 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/auto-link.hpp +73 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset-base.hpp +379 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/bitset.hpp +81 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/block-allocator.hpp +169 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/cast.hpp +52 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/config.hpp.in +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-array.hpp +140 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-queue.hpp +156 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/dynamic-stack.hpp +186 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.cpp +65 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/exception.hpp +102 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.cpp +49 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/heap.hpp +593 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/int-type.hpp +172 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/macros.hpp +103 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/marked-pointer.hpp +79 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/random.hpp +128 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/sort.hpp +268 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/static-stack.hpp +148 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread.hpp +272 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/none.hpp +87 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.cpp +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/pthreads.hpp +142 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/thread.hpp +114 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.cpp +68 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/thread/windows.hpp +108 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/gecode/support/timer.hpp +103 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/install-sh +323 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/allexamples.perl +60 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/back.png +0 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/footer.html +3 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/gecode-logo-100.png +0 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/header.html +66 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/doxygen/stylesheet.css +468 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixautoheader.perl +55 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixmanifest.perl +84 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/fixproperties.sh +98 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/gecode-logo.ico +0 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genbranch.perl +310 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genchangelog.perl +249 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/gencurrentchangelog.perl +191 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlcovmakefile.perl +148 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genlicense.perl +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genrc.perl +236 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genstatistics.perl +178 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/gentxtchangelog.perl +198 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genvarimp.perl +877 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/genxcodeproj.perl +144 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/getrevision.perl +47 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/makedepend.perl +85 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore-root.txt +43 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/misc/svn-ignore.txt +18 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/afc.cpp +143 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/array.cpp +277 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.cpp +278 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign.hh +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/bool.cpp +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/int.cpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/assign/set.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.cpp +504 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch.hh +119 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/bool.cpp +61 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/int.cpp +70 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/branch/set.cpp +72 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int.cpp +655 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hh +353 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int.hpp +314 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/arithmetic.cpp +772 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/basic.cpp +82 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bin-packing.cpp +237 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/bool.cpp +500 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/channel.cpp +234 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/circuit.cpp +359 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/count.cpp +410 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulative.cpp +560 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/cumulatives.cpp +276 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/distinct.cpp +248 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/dom.cpp +174 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/element.cpp +602 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/exec.cpp +150 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/extensional.cpp +571 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/gcc.cpp +320 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/linear.cpp +394 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/member.cpp +138 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-arithmetic.cpp +368 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-bool.cpp +4344 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-count.cpp +295 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-lin.cpp +2179 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/mm-rel.cpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/no-overlap.cpp +259 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/nvalues.cpp +241 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/precede.cpp +115 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/rel.cpp +568 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sequence.cpp +168 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/sorted.cpp +165 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unary.cpp +327 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/int/unshare.cpp +109 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/search.cpp +487 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set.cpp +638 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hh +362 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set.hpp +121 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/construct.cpp +225 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/convex.cpp +139 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/distinct.cpp +116 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/dom.cpp +346 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/element.cpp +397 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/exec.cpp +86 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/int.cpp +532 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/mm-set.cpp +4532 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/precede.cpp +136 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op-const.cpp +368 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel-op.cpp +504 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/rel.cpp +157 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/set/sequence.cpp +133 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/test.cpp +281 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hh +161 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/test/test.hpp +76 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/fz.cpp +93 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.bat.in +41 -0
- data/ext/libgecode3/vendor/gecode-3.7.3/tools/flatzinc/mzn-gecode.in +41 -0
- data/lib/dep-selector-libgecode.rb +15 -0
- data/lib/dep-selector-libgecode/version.rb +3 -0
- 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
|