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,398 @@
|
|
1
|
+
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Main authors:
|
4
|
+
* Christian Schulte <schulte@gecode.org>
|
5
|
+
*
|
6
|
+
* Copyright:
|
7
|
+
* Christian Schulte, 2004
|
8
|
+
*
|
9
|
+
* Last modified:
|
10
|
+
* $Date: 2011-08-09 02:04:53 +1000 (Tue, 09 Aug 2011) $ by $Author: schulte $
|
11
|
+
* $Revision: 12253 $
|
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/int/rel.hh>
|
39
|
+
|
40
|
+
namespace Gecode { namespace Int { namespace Arithmetic {
|
41
|
+
|
42
|
+
/*
|
43
|
+
* Ternary bounds consistent maximum
|
44
|
+
*
|
45
|
+
*/
|
46
|
+
|
47
|
+
template<class View>
|
48
|
+
forceinline ExecStatus
|
49
|
+
prop_max_bnd(Space& home, View x0, View x1, View x2) {
|
50
|
+
bool mod = false;
|
51
|
+
do {
|
52
|
+
mod = false;
|
53
|
+
{
|
54
|
+
ModEvent me = x2.lq(home,std::max(x0.max(),x1.max()));
|
55
|
+
if (me_failed(me)) return ES_FAILED;
|
56
|
+
mod |= me_modified(me);
|
57
|
+
}
|
58
|
+
{
|
59
|
+
ModEvent me = x2.gq(home,std::max(x0.min(),x1.min()));
|
60
|
+
if (me_failed(me)) return ES_FAILED;
|
61
|
+
mod |= me_modified(me);
|
62
|
+
}
|
63
|
+
{
|
64
|
+
ModEvent me = x0.lq(home,x2.max());
|
65
|
+
if (me_failed(me)) return ES_FAILED;
|
66
|
+
mod |= me_modified(me);
|
67
|
+
}
|
68
|
+
{
|
69
|
+
ModEvent me = x1.lq(home,x2.max());
|
70
|
+
if (me_failed(me)) return ES_FAILED;
|
71
|
+
mod |= me_modified(me);
|
72
|
+
}
|
73
|
+
} while (mod);
|
74
|
+
return ES_OK;
|
75
|
+
}
|
76
|
+
|
77
|
+
template<class View>
|
78
|
+
forceinline
|
79
|
+
MaxBnd<View>::MaxBnd(Home home, View x0, View x1, View x2)
|
80
|
+
: TernaryPropagator<View,PC_INT_BND>(home,x0,x1,x2) {}
|
81
|
+
|
82
|
+
template<class View>
|
83
|
+
ExecStatus
|
84
|
+
MaxBnd<View>::post(Home home, View x0, View x1, View x2) {
|
85
|
+
GECODE_ME_CHECK(x2.gq(home,std::max(x0.min(),x1.min())));
|
86
|
+
GECODE_ME_CHECK(x2.lq(home,std::max(x0.max(),x1.max())));
|
87
|
+
if (same(x0,x1))
|
88
|
+
return Rel::EqBnd<View,View>::post(home,x0,x2);
|
89
|
+
if (same(x0,x2))
|
90
|
+
return Rel::Lq<View>::post(home,x1,x2);
|
91
|
+
if (same(x1,x2))
|
92
|
+
return Rel::Lq<View>::post(home,x0,x2);
|
93
|
+
(void) new (home) MaxBnd<View>(home,x0,x1,x2);
|
94
|
+
return ES_OK;
|
95
|
+
}
|
96
|
+
|
97
|
+
template<class View>
|
98
|
+
forceinline
|
99
|
+
MaxBnd<View>::MaxBnd(Space& home, bool share, MaxBnd<View>& p)
|
100
|
+
: TernaryPropagator<View,PC_INT_BND>(home,share,p) {}
|
101
|
+
|
102
|
+
template<class View>
|
103
|
+
forceinline
|
104
|
+
MaxBnd<View>::MaxBnd(Space& home, bool share, Propagator& p,
|
105
|
+
View x0, View x1, View x2)
|
106
|
+
: TernaryPropagator<View,PC_INT_BND>(home,share,p,x0,x1,x2) {}
|
107
|
+
|
108
|
+
template<class View>
|
109
|
+
Actor*
|
110
|
+
MaxBnd<View>::copy(Space& home, bool share) {
|
111
|
+
return new (home) MaxBnd<View>(home,share,*this);
|
112
|
+
}
|
113
|
+
|
114
|
+
template<class View>
|
115
|
+
ExecStatus
|
116
|
+
MaxBnd<View>::propagate(Space& home, const ModEventDelta&) {
|
117
|
+
GECODE_ES_CHECK(prop_max_bnd(home,x0,x1,x2));
|
118
|
+
if ((x0.max() <= x1.min()) || (x0.max() < x2.min()))
|
119
|
+
GECODE_REWRITE(*this,(Rel::EqBnd<View,View>::post(home(*this),x1,x2)));
|
120
|
+
if ((x1.max() <= x0.min()) || (x1.max() < x2.min()))
|
121
|
+
GECODE_REWRITE(*this,(Rel::EqBnd<View,View>::post(home(*this),x0,x2)));
|
122
|
+
return x0.assigned() && x1.assigned() && x2.assigned() ?
|
123
|
+
home.ES_SUBSUMED(*this) : ES_FIX;
|
124
|
+
}
|
125
|
+
|
126
|
+
/*
|
127
|
+
* Nary bounds consistent maximum
|
128
|
+
*
|
129
|
+
*/
|
130
|
+
|
131
|
+
template<class View>
|
132
|
+
forceinline
|
133
|
+
NaryMaxBnd<View>::NaryMaxBnd(Home home, ViewArray<View>& x, View y)
|
134
|
+
: NaryOnePropagator<View,PC_INT_BND>(home,x,y) {}
|
135
|
+
|
136
|
+
template<class View>
|
137
|
+
ExecStatus
|
138
|
+
NaryMaxBnd<View>::post(Home home, ViewArray<View>& x, View y) {
|
139
|
+
assert(x.size() > 0);
|
140
|
+
x.unique(home);
|
141
|
+
if (x.size() == 1)
|
142
|
+
return Rel::EqBnd<View,View>::post(home,x[0],y);
|
143
|
+
if (x.size() == 2)
|
144
|
+
return MaxBnd<View>::post(home,x[0],x[1],y);
|
145
|
+
int l = Int::Limits::min;
|
146
|
+
int u = Int::Limits::min;
|
147
|
+
for (int i=x.size(); i--; ) {
|
148
|
+
l = std::max(l,x[i].min());
|
149
|
+
u = std::max(u,x[i].max());
|
150
|
+
}
|
151
|
+
GECODE_ME_CHECK(y.gq(home,l));
|
152
|
+
GECODE_ME_CHECK(y.lq(home,u));
|
153
|
+
if (x.same(home,y)) {
|
154
|
+
// Check whether y occurs in x
|
155
|
+
for (int i=x.size(); i--; )
|
156
|
+
GECODE_ES_CHECK(Rel::Lq<View>::post(home,x[i],y));
|
157
|
+
} else {
|
158
|
+
(void) new (home) NaryMaxBnd<View>(home,x,y);
|
159
|
+
}
|
160
|
+
return ES_OK;
|
161
|
+
}
|
162
|
+
|
163
|
+
template<class View>
|
164
|
+
forceinline
|
165
|
+
NaryMaxBnd<View>::NaryMaxBnd(Space& home, bool share, NaryMaxBnd<View>& p)
|
166
|
+
: NaryOnePropagator<View,PC_INT_BND>(home,share,p) {}
|
167
|
+
|
168
|
+
template<class View>
|
169
|
+
Actor*
|
170
|
+
NaryMaxBnd<View>::copy(Space& home, bool share) {
|
171
|
+
if (x.size() == 1)
|
172
|
+
return new (home) Rel::EqBnd<View,View>(home,share,*this,x[0],y);
|
173
|
+
if (x.size() == 2)
|
174
|
+
return new (home) MaxBnd<View>(home,share,*this,x[0],x[1],y);
|
175
|
+
return new (home) NaryMaxBnd<View>(home,share,*this);
|
176
|
+
}
|
177
|
+
|
178
|
+
/// Status of propagation for nary max
|
179
|
+
enum MaxPropStatus {
|
180
|
+
MPS_ASSIGNED = 1<<0, ///< All views are assigned
|
181
|
+
MPS_REMOVED = 1<<1, ///< A view is removed
|
182
|
+
MPS_NEW_BOUND = 1<<2 ///< Telling has found a new upper bound
|
183
|
+
};
|
184
|
+
|
185
|
+
template<class View>
|
186
|
+
forceinline ExecStatus
|
187
|
+
prop_nary_max_bnd(Space& home, Propagator& p,
|
188
|
+
ViewArray<View>& x, View y, PropCond pc) {
|
189
|
+
rerun:
|
190
|
+
assert(x.size() > 0);
|
191
|
+
int maxmax = x[x.size()-1].max();
|
192
|
+
int maxmin = x[x.size()-1].min();
|
193
|
+
for (int i = x.size()-1; i--; ) {
|
194
|
+
maxmax = std::max(x[i].max(),maxmax);
|
195
|
+
maxmin = std::max(x[i].min(),maxmin);
|
196
|
+
}
|
197
|
+
GECODE_ME_CHECK(y.lq(home,maxmax));
|
198
|
+
GECODE_ME_CHECK(y.gq(home,maxmin));
|
199
|
+
maxmin = y.min();
|
200
|
+
maxmax = y.max();
|
201
|
+
int status = MPS_ASSIGNED;
|
202
|
+
for (int i = x.size(); i--; ) {
|
203
|
+
ModEvent me = x[i].lq(home,maxmax);
|
204
|
+
if (me == ME_INT_FAILED)
|
205
|
+
return ES_FAILED;
|
206
|
+
if (me_modified(me) && (x[i].max() != maxmax))
|
207
|
+
status |= MPS_NEW_BOUND;
|
208
|
+
if (x[i].max() < maxmin) {
|
209
|
+
x.move_lst(i,home,p,pc);
|
210
|
+
status |= MPS_REMOVED;
|
211
|
+
} else if (!x[i].assigned())
|
212
|
+
status &= ~MPS_ASSIGNED;
|
213
|
+
}
|
214
|
+
if (x.size() == 0)
|
215
|
+
return ES_FAILED;
|
216
|
+
if ((status & MPS_REMOVED) != 0)
|
217
|
+
goto rerun;
|
218
|
+
if (((status & MPS_ASSIGNED) != 0) && y.assigned())
|
219
|
+
return home.ES_SUBSUMED(p);
|
220
|
+
return ((status & MPS_NEW_BOUND) != 0) ? ES_NOFIX : ES_FIX;
|
221
|
+
}
|
222
|
+
|
223
|
+
template<class View>
|
224
|
+
ExecStatus
|
225
|
+
NaryMaxBnd<View>::propagate(Space& home, const ModEventDelta&) {
|
226
|
+
return prop_nary_max_bnd(home,*this,x,y,PC_INT_BND);
|
227
|
+
}
|
228
|
+
|
229
|
+
|
230
|
+
/*
|
231
|
+
* Ternary domain consistent maximum
|
232
|
+
*
|
233
|
+
*/
|
234
|
+
|
235
|
+
template<class View>
|
236
|
+
forceinline
|
237
|
+
MaxDom<View>::MaxDom(Home home, View x0, View x1, View x2)
|
238
|
+
: TernaryPropagator<View,PC_INT_DOM>(home,x0,x1,x2) {}
|
239
|
+
|
240
|
+
template<class View>
|
241
|
+
ExecStatus
|
242
|
+
MaxDom<View>::post(Home home, View x0, View x1, View x2) {
|
243
|
+
GECODE_ME_CHECK(x2.gq(home,std::max(x0.min(),x1.min())));
|
244
|
+
GECODE_ME_CHECK(x2.lq(home,std::max(x0.max(),x1.max())));
|
245
|
+
if (same(x0,x1))
|
246
|
+
return Rel::EqDom<View,View>::post(home,x0,x2);
|
247
|
+
if (same(x0,x2))
|
248
|
+
return Rel::Lq<View>::post(home,x1,x2);
|
249
|
+
if (same(x1,x2))
|
250
|
+
return Rel::Lq<View>::post(home,x0,x2);
|
251
|
+
(void) new (home) MaxDom<View>(home,x0,x1,x2);
|
252
|
+
return ES_OK;
|
253
|
+
}
|
254
|
+
|
255
|
+
template<class View>
|
256
|
+
forceinline
|
257
|
+
MaxDom<View>::MaxDom(Space& home, bool share, MaxDom<View>& p)
|
258
|
+
: TernaryPropagator<View,PC_INT_DOM>(home,share,p) {}
|
259
|
+
|
260
|
+
template<class View>
|
261
|
+
forceinline
|
262
|
+
MaxDom<View>::MaxDom(Space& home, bool share, Propagator& p,
|
263
|
+
View x0, View x1, View x2)
|
264
|
+
: TernaryPropagator<View,PC_INT_DOM>(home,share,p,x0,x1,x2) {}
|
265
|
+
|
266
|
+
template<class View>
|
267
|
+
Actor*
|
268
|
+
MaxDom<View>::copy(Space& home, bool share) {
|
269
|
+
return new (home) MaxDom<View>(home,share,*this);
|
270
|
+
}
|
271
|
+
|
272
|
+
template<class View>
|
273
|
+
PropCost
|
274
|
+
MaxDom<View>::cost(const Space&, const ModEventDelta& med) const {
|
275
|
+
return PropCost::ternary((View::me(med) == ME_INT_DOM) ?
|
276
|
+
PropCost::HI : PropCost::LO);
|
277
|
+
}
|
278
|
+
|
279
|
+
template<class View>
|
280
|
+
ExecStatus
|
281
|
+
MaxDom<View>::propagate(Space& home, const ModEventDelta& med) {
|
282
|
+
if (View::me(med) != ME_INT_DOM) {
|
283
|
+
GECODE_ES_CHECK(prop_max_bnd(home,x0,x1,x2));
|
284
|
+
if ((x0.max() <= x1.min()) || (x0.max() < x2.min()))
|
285
|
+
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x1,x2)));
|
286
|
+
if ((x1.max() <= x0.min()) || (x1.max() < x2.min()))
|
287
|
+
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x0,x2)));
|
288
|
+
return x0.assigned() && x1.assigned() && x2.assigned() ?
|
289
|
+
home.ES_SUBSUMED(*this) :
|
290
|
+
home.ES_NOFIX_PARTIAL(*this,View::med(ME_INT_DOM));
|
291
|
+
}
|
292
|
+
ViewRanges<View> r0(x0), r1(x1);
|
293
|
+
Iter::Ranges::Union<ViewRanges<View>,ViewRanges<View> > u(r0,r1);
|
294
|
+
GECODE_ME_CHECK(x2.inter_r(home,u,false));
|
295
|
+
if (rtest_nq_dom(x0,x2) == RT_TRUE) {
|
296
|
+
GECODE_ES_CHECK(Rel::Lq<View>::post(home,x0,x2));
|
297
|
+
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x1,x2)));
|
298
|
+
}
|
299
|
+
if (rtest_nq_dom(x1,x2) == RT_TRUE) {
|
300
|
+
GECODE_ES_CHECK(Rel::Lq<View>::post(home,x1,x2));
|
301
|
+
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x0,x2)));
|
302
|
+
}
|
303
|
+
return ES_FIX;
|
304
|
+
}
|
305
|
+
|
306
|
+
/*
|
307
|
+
* Nary domain consistent maximum
|
308
|
+
*
|
309
|
+
*/
|
310
|
+
|
311
|
+
template<class View>
|
312
|
+
forceinline
|
313
|
+
NaryMaxDom<View>::NaryMaxDom(Home home, ViewArray<View>& x, View y)
|
314
|
+
: NaryOnePropagator<View,PC_INT_DOM>(home,x,y) {}
|
315
|
+
|
316
|
+
template<class View>
|
317
|
+
ExecStatus
|
318
|
+
NaryMaxDom<View>::post(Home home, ViewArray<View>& x, View y) {
|
319
|
+
assert(x.size() > 0);
|
320
|
+
x.unique(home);
|
321
|
+
if (x.size() == 1)
|
322
|
+
return Rel::EqDom<View,View>::post(home,x[0],y);
|
323
|
+
if (x.size() == 2)
|
324
|
+
return MaxDom<View>::post(home,x[0],x[1],y);
|
325
|
+
int l = Int::Limits::min;
|
326
|
+
int u = Int::Limits::min;
|
327
|
+
for (int i=x.size(); i--; ) {
|
328
|
+
l = std::max(l,x[i].min());
|
329
|
+
u = std::max(u,x[i].max());
|
330
|
+
}
|
331
|
+
GECODE_ME_CHECK(y.gq(home,l));
|
332
|
+
GECODE_ME_CHECK(y.lq(home,u));
|
333
|
+
if (x.same(home,y)) {
|
334
|
+
// Check whether y occurs in x
|
335
|
+
for (int i=x.size(); i--; )
|
336
|
+
GECODE_ES_CHECK(Rel::Lq<View>::post(home,x[i],y));
|
337
|
+
} else {
|
338
|
+
(void) new (home) NaryMaxDom<View>(home,x,y);
|
339
|
+
}
|
340
|
+
return ES_OK;
|
341
|
+
}
|
342
|
+
|
343
|
+
template<class View>
|
344
|
+
forceinline
|
345
|
+
NaryMaxDom<View>::NaryMaxDom(Space& home, bool share, NaryMaxDom<View>& p)
|
346
|
+
: NaryOnePropagator<View,PC_INT_DOM>(home,share,p) {}
|
347
|
+
|
348
|
+
template<class View>
|
349
|
+
Actor*
|
350
|
+
NaryMaxDom<View>::copy(Space& home, bool share) {
|
351
|
+
if (x.size() == 1)
|
352
|
+
return new (home) Rel::EqDom<View,View>(home,share,*this,x[0],y);
|
353
|
+
if (x.size() == 2)
|
354
|
+
return new (home) MaxDom<View>(home,share,*this,x[0],x[1],y);
|
355
|
+
return new (home) NaryMaxDom<View>(home,share,*this);
|
356
|
+
}
|
357
|
+
|
358
|
+
template<class View>
|
359
|
+
PropCost
|
360
|
+
NaryMaxDom<View>::cost(const Space&, const ModEventDelta& med) const {
|
361
|
+
if (View::me(med) == ME_INT_DOM)
|
362
|
+
return PropCost::linear(PropCost::HI, y.size());
|
363
|
+
else
|
364
|
+
return PropCost::linear(PropCost::LO, x.size());
|
365
|
+
}
|
366
|
+
|
367
|
+
template<class View>
|
368
|
+
ExecStatus
|
369
|
+
NaryMaxDom<View>::propagate(Space& home, const ModEventDelta& med) {
|
370
|
+
if (View::me(med) != ME_INT_DOM) {
|
371
|
+
ExecStatus es = prop_nary_max_bnd(home,*this,x,y,PC_INT_DOM);
|
372
|
+
GECODE_ES_CHECK(es);
|
373
|
+
return (es == ES_FIX) ?
|
374
|
+
home.ES_FIX_PARTIAL(*this,View::med(ME_INT_DOM)) :
|
375
|
+
home.ES_NOFIX_PARTIAL(*this,View::med(ME_INT_DOM));
|
376
|
+
}
|
377
|
+
Region r(home);
|
378
|
+
ViewRanges<View>* i_x = r.alloc<ViewRanges<View> >(x.size());
|
379
|
+
for (int i = x.size(); i--; ) {
|
380
|
+
ViewRanges<View> i_xi(x[i]); i_x[i]=i_xi;
|
381
|
+
}
|
382
|
+
Iter::Ranges::NaryUnion u(r, i_x, x.size());
|
383
|
+
GECODE_ME_CHECK(y.inter_r(home,u,false));
|
384
|
+
for (int i = x.size(); i--; )
|
385
|
+
if (rtest_nq_dom(x[i],y) == RT_TRUE) {
|
386
|
+
GECODE_ES_CHECK(Rel::Lq<View>::post(home,x[i],y));
|
387
|
+
x.move_lst(i,home,*this,PC_INT_DOM);
|
388
|
+
}
|
389
|
+
assert(x.size() > 0);
|
390
|
+
if (x.size() == 1)
|
391
|
+
GECODE_REWRITE(*this,(Rel::EqDom<View,View>::post(home(*this),x[0],y)));
|
392
|
+
return ES_FIX;
|
393
|
+
}
|
394
|
+
|
395
|
+
}}}
|
396
|
+
|
397
|
+
// STATISTICS: int-prop
|
398
|
+
|
@@ -0,0 +1,750 @@
|
|
1
|
+
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
2
|
+
/*
|
3
|
+
* Main authors:
|
4
|
+
* Christian Schulte <schulte@gecode.org>
|
5
|
+
*
|
6
|
+
* Copyright:
|
7
|
+
* Christian Schulte, 2004
|
8
|
+
*
|
9
|
+
* Last modified:
|
10
|
+
* $Date: 2010-06-03 21:46:55 +1000 (Thu, 03 Jun 2010) $ by $Author: schulte $
|
11
|
+
* $Revision: 11014 $
|
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 <cmath>
|
39
|
+
#include <climits>
|
40
|
+
|
41
|
+
#include <gecode/int/support-values.hh>
|
42
|
+
|
43
|
+
namespace Gecode { namespace Int { namespace Arithmetic {
|
44
|
+
|
45
|
+
/*
|
46
|
+
* Arithmetic help functions
|
47
|
+
*
|
48
|
+
*/
|
49
|
+
|
50
|
+
/// Multiply \a x and \a y as type \a Val
|
51
|
+
template<class Val>
|
52
|
+
Val m(int x, int y);
|
53
|
+
|
54
|
+
/// Multiply \a x and \a y as type \a Val
|
55
|
+
template<class Val>
|
56
|
+
Val m(int x, double y);
|
57
|
+
|
58
|
+
template<>
|
59
|
+
forceinline double
|
60
|
+
m(int x, int y) {
|
61
|
+
return static_cast<double>(x)*static_cast<double>(y);
|
62
|
+
}
|
63
|
+
|
64
|
+
template<>
|
65
|
+
forceinline double
|
66
|
+
m(int x, double y) {
|
67
|
+
return static_cast<double>(x)*y;
|
68
|
+
}
|
69
|
+
|
70
|
+
template<>
|
71
|
+
forceinline int
|
72
|
+
m(int x, int y) {
|
73
|
+
return x*y;
|
74
|
+
}
|
75
|
+
|
76
|
+
/// Compute \f$\lceil x/y\rceil\f$ where \a x and \a y are non-negative
|
77
|
+
template<class Val>
|
78
|
+
int c_d_p(int x, Val y);
|
79
|
+
/// Compute \f$\lfloor x/y\rfloor\f$ where \a x and \a y are non-negative
|
80
|
+
template<class Val>
|
81
|
+
int f_d_p(int x, Val y);
|
82
|
+
|
83
|
+
template<>
|
84
|
+
forceinline int
|
85
|
+
c_d_p<int>(int x, int y) {
|
86
|
+
assert((x >= 0) && (y >= 0));
|
87
|
+
return (x+y-1)/y;
|
88
|
+
}
|
89
|
+
template<>
|
90
|
+
forceinline int
|
91
|
+
c_d_p<double>(int x, double y) {
|
92
|
+
assert((x >= 0) && (y >= 0));
|
93
|
+
return static_cast<int>(ceil(static_cast<double>(x) / y));
|
94
|
+
}
|
95
|
+
template<>
|
96
|
+
forceinline int
|
97
|
+
f_d_p<int>(int x, int y) {
|
98
|
+
assert((x >= 0) && (y >= 0));
|
99
|
+
return x/y;
|
100
|
+
}
|
101
|
+
template<>
|
102
|
+
forceinline int
|
103
|
+
f_d_p<double>(int x, double y) {
|
104
|
+
assert((x >= 0) && (y >= 0));
|
105
|
+
return static_cast<int>(floor(static_cast<double>(x) / y));
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
/// Compute \f$\lfloor x/y\rfloor\f$
|
110
|
+
forceinline int
|
111
|
+
f_d(int x, int y) {
|
112
|
+
return static_cast<int>(floor(static_cast<double>(x) /
|
113
|
+
static_cast<double>(y)));
|
114
|
+
}
|
115
|
+
|
116
|
+
/// Compute \f$\lceil x/y\rceil\f$
|
117
|
+
forceinline int
|
118
|
+
c_d(int x, int y) {
|
119
|
+
return static_cast<int>(ceil(static_cast<double>(x) /
|
120
|
+
static_cast<double>(y)));
|
121
|
+
}
|
122
|
+
|
123
|
+
/// Test whether \a x is postive
|
124
|
+
template<class View>
|
125
|
+
forceinline bool
|
126
|
+
pos(const View& x) {
|
127
|
+
return x.min() > 0;
|
128
|
+
}
|
129
|
+
/// Test whether \a x is negative
|
130
|
+
template<class View>
|
131
|
+
forceinline bool
|
132
|
+
neg(const View& x) {
|
133
|
+
return x.max() < 0;
|
134
|
+
}
|
135
|
+
/// Test whether \a x is neither positive nor negative
|
136
|
+
template<class View>
|
137
|
+
forceinline bool
|
138
|
+
any(const View& x) {
|
139
|
+
return (x.min() <= 0) && (x.max() >= 0);
|
140
|
+
}
|
141
|
+
|
142
|
+
|
143
|
+
/*
|
144
|
+
* Propagator for x * y = x
|
145
|
+
*
|
146
|
+
*/
|
147
|
+
|
148
|
+
template<class View, PropCond pc>
|
149
|
+
forceinline
|
150
|
+
MultZeroOne<View,pc>::MultZeroOne(Home home, View x0, View x1)
|
151
|
+
: BinaryPropagator<View,pc>(home,x0,x1) {}
|
152
|
+
|
153
|
+
template<class View, PropCond pc>
|
154
|
+
forceinline RelTest
|
155
|
+
MultZeroOne<View,pc>::equal(View x, int n) {
|
156
|
+
if (pc == PC_INT_DOM) {
|
157
|
+
return rtest_eq_dom(x,n);
|
158
|
+
} else {
|
159
|
+
return rtest_eq_bnd(x,n);
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
template<class View, PropCond pc>
|
164
|
+
forceinline ExecStatus
|
165
|
+
MultZeroOne<View,pc>::post(Home home, View x0, View x1) {
|
166
|
+
switch (equal(x0,0)) {
|
167
|
+
case RT_FALSE:
|
168
|
+
GECODE_ME_CHECK(x1.eq(home,1));
|
169
|
+
break;
|
170
|
+
case RT_TRUE:
|
171
|
+
break;
|
172
|
+
case RT_MAYBE:
|
173
|
+
switch (equal(x1,1)) {
|
174
|
+
case RT_FALSE:
|
175
|
+
GECODE_ME_CHECK(x0.eq(home,0));
|
176
|
+
break;
|
177
|
+
case RT_TRUE:
|
178
|
+
break;
|
179
|
+
case RT_MAYBE:
|
180
|
+
(void) new (home) MultZeroOne<View,pc>(home,x0,x1);
|
181
|
+
break;
|
182
|
+
default: GECODE_NEVER;
|
183
|
+
}
|
184
|
+
break;
|
185
|
+
default: GECODE_NEVER;
|
186
|
+
}
|
187
|
+
return ES_OK;
|
188
|
+
}
|
189
|
+
|
190
|
+
template<class View, PropCond pc>
|
191
|
+
forceinline
|
192
|
+
MultZeroOne<View,pc>::MultZeroOne(Space& home, bool share,
|
193
|
+
MultZeroOne<View,pc>& p)
|
194
|
+
: BinaryPropagator<View,pc>(home,share,p) {}
|
195
|
+
|
196
|
+
template<class View, PropCond pc>
|
197
|
+
Actor*
|
198
|
+
MultZeroOne<View,pc>::copy(Space& home, bool share) {
|
199
|
+
return new (home) MultZeroOne<View,pc>(home,share,*this);
|
200
|
+
}
|
201
|
+
|
202
|
+
template<class View, PropCond pc>
|
203
|
+
ExecStatus
|
204
|
+
MultZeroOne<View,pc>::propagate(Space& home, const ModEventDelta&) {
|
205
|
+
switch (equal(x0,0)) {
|
206
|
+
case RT_FALSE:
|
207
|
+
GECODE_ME_CHECK(x1.eq(home,1));
|
208
|
+
break;
|
209
|
+
case RT_TRUE:
|
210
|
+
break;
|
211
|
+
case RT_MAYBE:
|
212
|
+
switch (equal(x1,1)) {
|
213
|
+
case RT_FALSE:
|
214
|
+
GECODE_ME_CHECK(x0.eq(home,0));
|
215
|
+
break;
|
216
|
+
case RT_TRUE:
|
217
|
+
break;
|
218
|
+
case RT_MAYBE:
|
219
|
+
return ES_FIX;
|
220
|
+
default: GECODE_NEVER;
|
221
|
+
}
|
222
|
+
break;
|
223
|
+
default: GECODE_NEVER;
|
224
|
+
}
|
225
|
+
return home.ES_SUBSUMED(*this);
|
226
|
+
}
|
227
|
+
|
228
|
+
|
229
|
+
/*
|
230
|
+
* Positive bounds consistent multiplication
|
231
|
+
*
|
232
|
+
*/
|
233
|
+
template<class Val, class VA, class VB, class VC>
|
234
|
+
forceinline ExecStatus
|
235
|
+
prop_mult_plus_bnd(Space& home, Propagator& p, VA x0, VB x1, VC x2) {
|
236
|
+
assert(pos(x0) && pos(x1) && pos(x2));
|
237
|
+
bool mod;
|
238
|
+
do {
|
239
|
+
mod = false;
|
240
|
+
{
|
241
|
+
ModEvent me = x2.lq(home,m<Val>(x0.max(),x1.max()));
|
242
|
+
if (me_failed(me)) return ES_FAILED;
|
243
|
+
mod |= me_modified(me);
|
244
|
+
}
|
245
|
+
{
|
246
|
+
ModEvent me = x2.gq(home,m<Val>(x0.min(),x1.min()));
|
247
|
+
if (me_failed(me)) return ES_FAILED;
|
248
|
+
mod |= me_modified(me);
|
249
|
+
}
|
250
|
+
{
|
251
|
+
ModEvent me = x0.lq(home,f_d_p<Val>(x2.max(),x1.min()));
|
252
|
+
if (me_failed(me)) return ES_FAILED;
|
253
|
+
mod |= me_modified(me);
|
254
|
+
}
|
255
|
+
{
|
256
|
+
ModEvent me = x0.gq(home,c_d_p<Val>(x2.min(),x1.max()));
|
257
|
+
if (me_failed(me)) return ES_FAILED;
|
258
|
+
mod |= me_modified(me);
|
259
|
+
}
|
260
|
+
{
|
261
|
+
ModEvent me = x1.lq(home,f_d_p<Val>(x2.max(),x0.min()));
|
262
|
+
if (me_failed(me)) return ES_FAILED;
|
263
|
+
mod |= me_modified(me);
|
264
|
+
}
|
265
|
+
{
|
266
|
+
ModEvent me = x1.gq(home,c_d_p<Val>(x2.min(),x0.max()));
|
267
|
+
if (me_failed(me)) return ES_FAILED;
|
268
|
+
mod |= me_modified(me);
|
269
|
+
}
|
270
|
+
} while (mod);
|
271
|
+
return x0.assigned() && x1.assigned() ?
|
272
|
+
home.ES_SUBSUMED(p) : ES_FIX;
|
273
|
+
}
|
274
|
+
|
275
|
+
template<class Val, class VA, class VB, class VC>
|
276
|
+
forceinline
|
277
|
+
MultPlusBnd<Val,VA,VB,VC>::MultPlusBnd(Home home, VA x0, VB x1, VC x2)
|
278
|
+
: MixTernaryPropagator<VA,PC_INT_BND,VB,PC_INT_BND,VC,PC_INT_BND>
|
279
|
+
(home,x0,x1,x2) {}
|
280
|
+
|
281
|
+
template<class Val, class VA, class VB, class VC>
|
282
|
+
forceinline
|
283
|
+
MultPlusBnd<Val,VA,VB,VC>::MultPlusBnd(Space& home, bool share,
|
284
|
+
MultPlusBnd<Val,VA,VB,VC>& p)
|
285
|
+
: MixTernaryPropagator<VA,PC_INT_BND,VB,PC_INT_BND,VC,PC_INT_BND>
|
286
|
+
(home,share,p) {}
|
287
|
+
|
288
|
+
template<class Val, class VA, class VB, class VC>
|
289
|
+
Actor*
|
290
|
+
MultPlusBnd<Val,VA,VB,VC>::copy(Space& home, bool share) {
|
291
|
+
return new (home) MultPlusBnd<Val,VA,VB,VC>(home,share,*this);
|
292
|
+
}
|
293
|
+
|
294
|
+
template<class Val, class VA, class VB, class VC>
|
295
|
+
ExecStatus
|
296
|
+
MultPlusBnd<Val,VA,VB,VC>::propagate(Space& home, const ModEventDelta&) {
|
297
|
+
return prop_mult_plus_bnd<Val,VA,VB,VC>(home,*this,x0,x1,x2);
|
298
|
+
}
|
299
|
+
|
300
|
+
template<class Val, class VA, class VB, class VC>
|
301
|
+
forceinline ExecStatus
|
302
|
+
MultPlusBnd<Val,VA,VB,VC>::post(Home home, VA x0, VB x1, VC x2) {
|
303
|
+
GECODE_ME_CHECK(x0.gr(home,0));
|
304
|
+
GECODE_ME_CHECK(x1.gr(home,0));
|
305
|
+
GECODE_ME_CHECK(x2.gq(home,(static_cast<double>(x0.min()) *
|
306
|
+
static_cast<double>(x1.min()))));
|
307
|
+
double u = static_cast<double>(x0.max()) * static_cast<double>(x1.max());
|
308
|
+
if (u > INT_MAX) {
|
309
|
+
(void) new (home) MultPlusBnd<double,VA,VB,VC>(home,x0,x1,x2);
|
310
|
+
} else {
|
311
|
+
GECODE_ME_CHECK(x2.lq(home,u));
|
312
|
+
(void) new (home) MultPlusBnd<int,VA,VB,VC>(home,x0,x1,x2);
|
313
|
+
}
|
314
|
+
return ES_OK;
|
315
|
+
}
|
316
|
+
|
317
|
+
|
318
|
+
/*
|
319
|
+
* Bounds consistent multiplication
|
320
|
+
*
|
321
|
+
*/
|
322
|
+
template<class View>
|
323
|
+
forceinline
|
324
|
+
MultBnd<View>::MultBnd(Home home, View x0, View x1, View x2)
|
325
|
+
: TernaryPropagator<View,PC_INT_BND>(home,x0,x1,x2) {}
|
326
|
+
|
327
|
+
template<class View>
|
328
|
+
forceinline
|
329
|
+
MultBnd<View>::MultBnd(Space& home, bool share, MultBnd<View>& p)
|
330
|
+
: TernaryPropagator<View,PC_INT_BND>(home,share,p) {}
|
331
|
+
|
332
|
+
template<class View>
|
333
|
+
Actor*
|
334
|
+
MultBnd<View>::copy(Space& home, bool share) {
|
335
|
+
return new (home) MultBnd<View>(home,share,*this);
|
336
|
+
}
|
337
|
+
|
338
|
+
template<class View>
|
339
|
+
ExecStatus
|
340
|
+
MultBnd<View>::propagate(Space& home, const ModEventDelta&) {
|
341
|
+
if (pos(x0)) {
|
342
|
+
if (pos(x1) || pos(x2)) goto rewrite_ppp;
|
343
|
+
if (neg(x1) || neg(x2)) goto rewrite_pnn;
|
344
|
+
goto prop_pxx;
|
345
|
+
}
|
346
|
+
if (neg(x0)) {
|
347
|
+
if (neg(x1) || pos(x2)) goto rewrite_nnp;
|
348
|
+
if (pos(x1) || neg(x2)) goto rewrite_npn;
|
349
|
+
goto prop_nxx;
|
350
|
+
}
|
351
|
+
if (pos(x1)) {
|
352
|
+
if (pos(x2)) goto rewrite_ppp;
|
353
|
+
if (neg(x2)) goto rewrite_npn;
|
354
|
+
goto prop_xpx;
|
355
|
+
}
|
356
|
+
if (neg(x1)) {
|
357
|
+
if (pos(x2)) goto rewrite_nnp;
|
358
|
+
if (neg(x2)) goto rewrite_pnn;
|
359
|
+
goto prop_xnx;
|
360
|
+
}
|
361
|
+
|
362
|
+
assert(any(x0) && any(x1));
|
363
|
+
GECODE_ME_CHECK(x2.lq(home,std::max(m<double>(x0.max(),x1.max()),
|
364
|
+
m<double>(x0.min(),x1.min()))));
|
365
|
+
GECODE_ME_CHECK(x2.gq(home,std::min(m<double>(x0.min(),x1.max()),
|
366
|
+
m<double>(x0.max(),x1.min()))));
|
367
|
+
|
368
|
+
if (x0.assigned()) {
|
369
|
+
assert((x0.val() == 0) && (x2.val() == 0));
|
370
|
+
return home.ES_SUBSUMED(*this);
|
371
|
+
}
|
372
|
+
|
373
|
+
if (x1.assigned()) {
|
374
|
+
assert((x1.val() == 0) && (x2.val() == 0));
|
375
|
+
return home.ES_SUBSUMED(*this);
|
376
|
+
}
|
377
|
+
|
378
|
+
return ES_NOFIX;
|
379
|
+
|
380
|
+
prop_xpx:
|
381
|
+
std::swap(x0,x1);
|
382
|
+
prop_pxx:
|
383
|
+
assert(pos(x0) && any(x1) && any(x2));
|
384
|
+
|
385
|
+
GECODE_ME_CHECK(x2.lq(home,m<double>(x0.max(),x1.max())));
|
386
|
+
GECODE_ME_CHECK(x2.gq(home,m<double>(x0.max(),x1.min())));
|
387
|
+
|
388
|
+
if (pos(x2)) goto rewrite_ppp;
|
389
|
+
if (neg(x2)) goto rewrite_pnn;
|
390
|
+
|
391
|
+
GECODE_ME_CHECK(x1.lq(home,f_d(x2.max(),x0.min())));
|
392
|
+
GECODE_ME_CHECK(x1.gq(home,c_d(x2.min(),x0.min())));
|
393
|
+
|
394
|
+
if (x0.assigned() && x1.assigned()) {
|
395
|
+
GECODE_ME_CHECK(x2.eq(home,m<double>(x0.val(),x1.val())));
|
396
|
+
return home.ES_SUBSUMED(*this);
|
397
|
+
}
|
398
|
+
|
399
|
+
return ES_NOFIX;
|
400
|
+
|
401
|
+
prop_xnx:
|
402
|
+
std::swap(x0,x1);
|
403
|
+
prop_nxx:
|
404
|
+
assert(neg(x0) && any(x1) && any(x2));
|
405
|
+
|
406
|
+
GECODE_ME_CHECK(x2.lq(home,m<double>(x0.min(),x1.min())));
|
407
|
+
GECODE_ME_CHECK(x2.gq(home,m<double>(x0.min(),x1.max())));
|
408
|
+
|
409
|
+
if (pos(x2)) goto rewrite_nnp;
|
410
|
+
if (neg(x2)) goto rewrite_npn;
|
411
|
+
|
412
|
+
GECODE_ME_CHECK(x1.lq(home,f_d(x2.min(),x0.max())));
|
413
|
+
GECODE_ME_CHECK(x1.gq(home,c_d(x2.max(),x0.max())));
|
414
|
+
|
415
|
+
if (x0.assigned() && x1.assigned()) {
|
416
|
+
GECODE_ME_CHECK(x2.eq(home,m<double>(x0.val(),x1.val())));
|
417
|
+
return home.ES_SUBSUMED(*this);
|
418
|
+
}
|
419
|
+
|
420
|
+
return ES_NOFIX;
|
421
|
+
|
422
|
+
rewrite_ppp:
|
423
|
+
GECODE_REWRITE(*this,(MultPlusBnd<double,IntView,IntView,IntView>
|
424
|
+
::post(home(*this),x0,x1,x2)));
|
425
|
+
rewrite_nnp:
|
426
|
+
GECODE_REWRITE(*this,(MultPlusBnd<double,MinusView,MinusView,IntView>
|
427
|
+
::post(home(*this),MinusView(x0),MinusView(x1),x2)));
|
428
|
+
rewrite_pnn:
|
429
|
+
std::swap(x0,x1);
|
430
|
+
rewrite_npn:
|
431
|
+
GECODE_REWRITE(*this,(MultPlusBnd<double,MinusView,IntView,MinusView>
|
432
|
+
::post(home(*this),MinusView(x0),x1,MinusView(x2))));
|
433
|
+
}
|
434
|
+
|
435
|
+
template<class View>
|
436
|
+
ExecStatus
|
437
|
+
MultBnd<View>::post(Home home, View x0, View x1, View x2) {
|
438
|
+
if (same(x0,x1))
|
439
|
+
return SqrBnd<View>::post(home,x0,x2);
|
440
|
+
if (same(x0,x2))
|
441
|
+
return MultZeroOne<View,PC_INT_BND>::post(home,x0,x1);
|
442
|
+
if (same(x1,x2))
|
443
|
+
return MultZeroOne<View,PC_INT_BND>::post(home,x1,x0);
|
444
|
+
if (pos(x0)) {
|
445
|
+
if (pos(x1) || pos(x2)) goto post_ppp;
|
446
|
+
if (neg(x1) || neg(x2)) goto post_pnn;
|
447
|
+
} else if (neg(x0)) {
|
448
|
+
if (neg(x1) || pos(x2)) goto post_nnp;
|
449
|
+
if (pos(x1) || neg(x2)) goto post_npn;
|
450
|
+
} else if (pos(x1)) {
|
451
|
+
if (pos(x2)) goto post_ppp;
|
452
|
+
if (neg(x2)) goto post_npn;
|
453
|
+
} else if (neg(x1)) {
|
454
|
+
if (pos(x2)) goto post_nnp;
|
455
|
+
if (neg(x2)) goto post_pnn;
|
456
|
+
}
|
457
|
+
{
|
458
|
+
double a =
|
459
|
+
static_cast<double>(x0.min()) * static_cast<double>(x1.min());
|
460
|
+
double b =
|
461
|
+
static_cast<double>(x0.min()) * static_cast<double>(x1.max());
|
462
|
+
double c =
|
463
|
+
static_cast<double>(x0.max()) * static_cast<double>(x1.min());
|
464
|
+
double d =
|
465
|
+
static_cast<double>(x0.max()) * static_cast<double>(x1.max());
|
466
|
+
GECODE_ME_CHECK(x2.gq(home,std::min(std::min(a,b),std::min(c,d))));
|
467
|
+
GECODE_ME_CHECK(x2.lq(home,std::max(std::max(a,b),std::max(c,d))));
|
468
|
+
(void) new (home) MultBnd<View>(home,x0,x1,x2);
|
469
|
+
}
|
470
|
+
return ES_OK;
|
471
|
+
|
472
|
+
post_ppp:
|
473
|
+
return MultPlusBnd<double,IntView,IntView,IntView>::post(home,x0,x1,x2);
|
474
|
+
post_nnp:
|
475
|
+
return MultPlusBnd<double,MinusView,MinusView,IntView>::post(home,
|
476
|
+
MinusView(x0),MinusView(x1),x2);
|
477
|
+
post_pnn:
|
478
|
+
std::swap(x0,x1);
|
479
|
+
post_npn:
|
480
|
+
return MultPlusBnd<double,MinusView,IntView,MinusView>::post(home,
|
481
|
+
MinusView(x0),x1,MinusView(x2));
|
482
|
+
}
|
483
|
+
|
484
|
+
|
485
|
+
/*
|
486
|
+
* Positive domain consistent multiplication
|
487
|
+
*
|
488
|
+
*/
|
489
|
+
template<class Val, class View>
|
490
|
+
forceinline ExecStatus
|
491
|
+
prop_mult_dom(Space& home, Propagator& p, View x0, View x1, View x2) {
|
492
|
+
Region r(home);
|
493
|
+
SupportValues<View,Region> s0(r,x0), s1(r,x1), s2(r,x2);
|
494
|
+
while (s0()) {
|
495
|
+
while (s1()) {
|
496
|
+
if (s2.support(m<Val>(s0.val(),s1.val()))) {
|
497
|
+
s0.support(); s1.support();
|
498
|
+
}
|
499
|
+
++s1;
|
500
|
+
}
|
501
|
+
s1.reset(); ++s0;
|
502
|
+
}
|
503
|
+
GECODE_ME_CHECK(s0.tell(home));
|
504
|
+
GECODE_ME_CHECK(s1.tell(home));
|
505
|
+
GECODE_ME_CHECK(s2.tell(home));
|
506
|
+
return x0.assigned() && x1.assigned() ? home.ES_SUBSUMED(p) : ES_FIX;
|
507
|
+
}
|
508
|
+
|
509
|
+
template<class Val, class VA, class VB, class VC>
|
510
|
+
forceinline
|
511
|
+
MultPlusDom<Val,VA,VB,VC>::MultPlusDom(Home home, VA x0, VB x1, VC x2)
|
512
|
+
: MixTernaryPropagator<VA,PC_INT_DOM,VB,PC_INT_DOM,VC,PC_INT_DOM>
|
513
|
+
(home,x0,x1,x2) {}
|
514
|
+
|
515
|
+
template<class Val, class VA, class VB, class VC>
|
516
|
+
forceinline
|
517
|
+
MultPlusDom<Val,VA,VB,VC>::MultPlusDom(Space& home, bool share,
|
518
|
+
MultPlusDom<Val,VA,VB,VC>& p)
|
519
|
+
: MixTernaryPropagator<VA,PC_INT_DOM,VB,PC_INT_DOM,VC,PC_INT_DOM>
|
520
|
+
(home,share,p) {}
|
521
|
+
|
522
|
+
template<class Val, class VA, class VB, class VC>
|
523
|
+
Actor*
|
524
|
+
MultPlusDom<Val,VA,VB,VC>::copy(Space& home, bool share) {
|
525
|
+
return new (home) MultPlusDom<Val,VA,VB,VC>(home,share,*this);
|
526
|
+
}
|
527
|
+
|
528
|
+
template<class Val, class VA, class VB, class VC>
|
529
|
+
PropCost
|
530
|
+
MultPlusDom<Val,VA,VB,VC>::cost(const Space&,
|
531
|
+
const ModEventDelta& med) const {
|
532
|
+
if (VA::me(med) == ME_INT_DOM)
|
533
|
+
return PropCost::ternary(PropCost::HI);
|
534
|
+
else
|
535
|
+
return PropCost::ternary(PropCost::LO);
|
536
|
+
}
|
537
|
+
|
538
|
+
template<class Val, class VA, class VB, class VC>
|
539
|
+
ExecStatus
|
540
|
+
MultPlusDom<Val,VA,VB,VC>::propagate(Space& home, const ModEventDelta& med) {
|
541
|
+
if (VA::me(med) != ME_INT_DOM) {
|
542
|
+
GECODE_ES_CHECK((prop_mult_plus_bnd<Val,VA,VB,VC>(home,*this,x0,x1,x2)));
|
543
|
+
return home.ES_FIX_PARTIAL(*this,VA::med(ME_INT_DOM));
|
544
|
+
}
|
545
|
+
IntView y0(x0.varimp()), y1(x1.varimp()), y2(x2.varimp());
|
546
|
+
return prop_mult_dom<Val,IntView>(home,*this,y0,y1,y2);
|
547
|
+
}
|
548
|
+
|
549
|
+
template<class Val, class VA, class VB, class VC>
|
550
|
+
forceinline ExecStatus
|
551
|
+
MultPlusDom<Val,VA,VB,VC>::post(Home home, VA x0, VB x1, VC x2) {
|
552
|
+
GECODE_ME_CHECK(x0.gr(home,0));
|
553
|
+
GECODE_ME_CHECK(x1.gr(home,0));
|
554
|
+
GECODE_ME_CHECK(x2.gq(home,(static_cast<double>(x0.min()) *
|
555
|
+
static_cast<double>(x1.min()))));
|
556
|
+
double u = static_cast<double>(x0.max()) * static_cast<double>(x1.max());
|
557
|
+
if (u > INT_MAX) {
|
558
|
+
(void) new (home) MultPlusDom<double,VA,VB,VC>(home,x0,x1,x2);
|
559
|
+
} else {
|
560
|
+
GECODE_ME_CHECK(x2.lq(home,u));
|
561
|
+
(void) new (home) MultPlusDom<int,VA,VB,VC>(home,x0,x1,x2);
|
562
|
+
}
|
563
|
+
return ES_OK;
|
564
|
+
}
|
565
|
+
|
566
|
+
|
567
|
+
/*
|
568
|
+
* Bounds consistent multiplication
|
569
|
+
*
|
570
|
+
*/
|
571
|
+
template<class View>
|
572
|
+
forceinline
|
573
|
+
MultDom<View>::MultDom(Home home, View x0, View x1, View x2)
|
574
|
+
: TernaryPropagator<View,PC_INT_DOM>(home,x0,x1,x2) {}
|
575
|
+
|
576
|
+
template<class View>
|
577
|
+
forceinline
|
578
|
+
MultDom<View>::MultDom(Space& home, bool share, MultDom<View>& p)
|
579
|
+
: TernaryPropagator<View,PC_INT_DOM>(home,share,p) {}
|
580
|
+
|
581
|
+
template<class View>
|
582
|
+
Actor*
|
583
|
+
MultDom<View>::copy(Space& home, bool share) {
|
584
|
+
return new (home) MultDom<View>(home,share,*this);
|
585
|
+
}
|
586
|
+
|
587
|
+
template<class View>
|
588
|
+
PropCost
|
589
|
+
MultDom<View>::cost(const Space&, const ModEventDelta& med) const {
|
590
|
+
if (View::me(med) == ME_INT_DOM)
|
591
|
+
return PropCost::ternary(PropCost::HI);
|
592
|
+
else
|
593
|
+
return PropCost::ternary(PropCost::LO);
|
594
|
+
}
|
595
|
+
|
596
|
+
template<class View>
|
597
|
+
ExecStatus
|
598
|
+
MultDom<View>::propagate(Space& home, const ModEventDelta& med) {
|
599
|
+
if (View::me(med) != ME_INT_DOM) {
|
600
|
+
if (pos(x0)) {
|
601
|
+
if (pos(x1) || pos(x2)) goto rewrite_ppp;
|
602
|
+
if (neg(x1) || neg(x2)) goto rewrite_pnn;
|
603
|
+
goto prop_pxx;
|
604
|
+
}
|
605
|
+
if (neg(x0)) {
|
606
|
+
if (neg(x1) || pos(x2)) goto rewrite_nnp;
|
607
|
+
if (pos(x1) || neg(x2)) goto rewrite_npn;
|
608
|
+
goto prop_nxx;
|
609
|
+
}
|
610
|
+
if (pos(x1)) {
|
611
|
+
if (pos(x2)) goto rewrite_ppp;
|
612
|
+
if (neg(x2)) goto rewrite_npn;
|
613
|
+
goto prop_xpx;
|
614
|
+
}
|
615
|
+
if (neg(x1)) {
|
616
|
+
if (pos(x2)) goto rewrite_nnp;
|
617
|
+
if (neg(x2)) goto rewrite_pnn;
|
618
|
+
goto prop_xnx;
|
619
|
+
}
|
620
|
+
|
621
|
+
assert(any(x0) && any(x1));
|
622
|
+
GECODE_ME_CHECK(x2.lq(home,std::max(m<double>(x0.max(),x1.max()),
|
623
|
+
m<double>(x0.min(),x1.min()))));
|
624
|
+
GECODE_ME_CHECK(x2.gq(home,std::min(m<double>(x0.min(),x1.max()),
|
625
|
+
m<double>(x0.max(),x1.min()))));
|
626
|
+
|
627
|
+
if (x0.assigned()) {
|
628
|
+
assert((x0.val() == 0) && (x2.val() == 0));
|
629
|
+
return home.ES_SUBSUMED(*this);
|
630
|
+
}
|
631
|
+
|
632
|
+
if (x1.assigned()) {
|
633
|
+
assert((x1.val() == 0) && (x2.val() == 0));
|
634
|
+
return home.ES_SUBSUMED(*this);
|
635
|
+
}
|
636
|
+
|
637
|
+
return home.ES_NOFIX_PARTIAL(*this,View::med(ME_INT_DOM));
|
638
|
+
|
639
|
+
prop_xpx:
|
640
|
+
std::swap(x0,x1);
|
641
|
+
prop_pxx:
|
642
|
+
assert(pos(x0) && any(x1) && any(x2));
|
643
|
+
|
644
|
+
GECODE_ME_CHECK(x2.lq(home,m<double>(x0.max(),x1.max())));
|
645
|
+
GECODE_ME_CHECK(x2.gq(home,m<double>(x0.max(),x1.min())));
|
646
|
+
|
647
|
+
if (pos(x2)) goto rewrite_ppp;
|
648
|
+
if (neg(x2)) goto rewrite_pnn;
|
649
|
+
|
650
|
+
GECODE_ME_CHECK(x1.lq(home,f_d(x2.max(),x0.min())));
|
651
|
+
GECODE_ME_CHECK(x1.gq(home,c_d(x2.min(),x0.min())));
|
652
|
+
|
653
|
+
if (x0.assigned() && x1.assigned()) {
|
654
|
+
GECODE_ME_CHECK(x2.eq(home,m<double>(x0.val(),x1.val())));
|
655
|
+
return home.ES_SUBSUMED(*this);
|
656
|
+
}
|
657
|
+
|
658
|
+
return home.ES_NOFIX_PARTIAL(*this,View::med(ME_INT_DOM));
|
659
|
+
|
660
|
+
prop_xnx:
|
661
|
+
std::swap(x0,x1);
|
662
|
+
prop_nxx:
|
663
|
+
assert(neg(x0) && any(x1) && any(x2));
|
664
|
+
|
665
|
+
GECODE_ME_CHECK(x2.lq(home,m<double>(x0.min(),x1.min())));
|
666
|
+
GECODE_ME_CHECK(x2.gq(home,m<double>(x0.min(),x1.max())));
|
667
|
+
|
668
|
+
if (pos(x2)) goto rewrite_nnp;
|
669
|
+
if (neg(x2)) goto rewrite_npn;
|
670
|
+
|
671
|
+
GECODE_ME_CHECK(x1.lq(home,f_d(x2.min(),x0.max())));
|
672
|
+
GECODE_ME_CHECK(x1.gq(home,c_d(x2.max(),x0.max())));
|
673
|
+
|
674
|
+
if (x0.assigned() && x1.assigned()) {
|
675
|
+
GECODE_ME_CHECK(x2.eq(home,m<double>(x0.val(),x1.val())));
|
676
|
+
return home.ES_SUBSUMED(*this);
|
677
|
+
}
|
678
|
+
|
679
|
+
return home.ES_NOFIX_PARTIAL(*this,View::med(ME_INT_DOM));
|
680
|
+
|
681
|
+
rewrite_ppp:
|
682
|
+
GECODE_REWRITE(*this,(MultPlusDom<double,IntView,IntView,IntView>
|
683
|
+
::post(home(*this),x0,x1,x2)));
|
684
|
+
rewrite_nnp:
|
685
|
+
GECODE_REWRITE(*this,(MultPlusDom<double,MinusView,MinusView,IntView>
|
686
|
+
::post(home(*this),
|
687
|
+
MinusView(x0),MinusView(x1),x2)));
|
688
|
+
rewrite_pnn:
|
689
|
+
std::swap(x0,x1);
|
690
|
+
rewrite_npn:
|
691
|
+
GECODE_REWRITE(*this,(MultPlusDom<double,MinusView,IntView,MinusView>
|
692
|
+
::post(home(*this),
|
693
|
+
MinusView(x0),x1,MinusView(x2))));
|
694
|
+
}
|
695
|
+
return prop_mult_dom<double,View>(home,*this,x0,x1,x2);
|
696
|
+
}
|
697
|
+
|
698
|
+
template<class View>
|
699
|
+
ExecStatus
|
700
|
+
MultDom<View>::post(Home home, View x0, View x1, View x2) {
|
701
|
+
if (same(x0,x1))
|
702
|
+
return SqrDom<View>::post(home,x0,x2);
|
703
|
+
if (same(x0,x2))
|
704
|
+
return MultZeroOne<View,PC_INT_DOM>::post(home,x0,x1);
|
705
|
+
if (same(x1,x2))
|
706
|
+
return MultZeroOne<View,PC_INT_DOM>::post(home,x1,x0);
|
707
|
+
if (pos(x0)) {
|
708
|
+
if (pos(x1) || pos(x2)) goto post_ppp;
|
709
|
+
if (neg(x1) || neg(x2)) goto post_pnn;
|
710
|
+
} else if (neg(x0)) {
|
711
|
+
if (neg(x1) || pos(x2)) goto post_nnp;
|
712
|
+
if (pos(x1) || neg(x2)) goto post_npn;
|
713
|
+
} else if (pos(x1)) {
|
714
|
+
if (pos(x2)) goto post_ppp;
|
715
|
+
if (neg(x2)) goto post_npn;
|
716
|
+
} else if (neg(x1)) {
|
717
|
+
if (pos(x2)) goto post_nnp;
|
718
|
+
if (neg(x2)) goto post_pnn;
|
719
|
+
}
|
720
|
+
{
|
721
|
+
double a =
|
722
|
+
static_cast<double>(x0.min()) * static_cast<double>(x1.min());
|
723
|
+
double b =
|
724
|
+
static_cast<double>(x0.min()) * static_cast<double>(x1.max());
|
725
|
+
double c =
|
726
|
+
static_cast<double>(x0.max()) * static_cast<double>(x1.min());
|
727
|
+
double d =
|
728
|
+
static_cast<double>(x0.max()) * static_cast<double>(x1.max());
|
729
|
+
GECODE_ME_CHECK(x2.gq(home,std::min(std::min(a,b),std::min(c,d))));
|
730
|
+
GECODE_ME_CHECK(x2.lq(home,std::max(std::max(a,b),std::max(c,d))));
|
731
|
+
(void) new (home) MultDom<View>(home,x0,x1,x2);
|
732
|
+
}
|
733
|
+
return ES_OK;
|
734
|
+
|
735
|
+
post_ppp:
|
736
|
+
return MultPlusDom<double,IntView,IntView,IntView>::post(home,x0,x1,x2);
|
737
|
+
post_nnp:
|
738
|
+
return MultPlusDom<double,MinusView,MinusView,IntView>::post(home,
|
739
|
+
MinusView(x0),MinusView(x1),x2);
|
740
|
+
post_pnn:
|
741
|
+
std::swap(x0,x1);
|
742
|
+
post_npn:
|
743
|
+
return MultPlusDom<double,MinusView,IntView,MinusView>::post(home,
|
744
|
+
MinusView(x0),x1,MinusView(x2));
|
745
|
+
}
|
746
|
+
|
747
|
+
}}}
|
748
|
+
|
749
|
+
// STATISTICS: int-prop
|
750
|
+
|