dep-selector-libgecode 1.0.0.alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,171 @@
|
|
|
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, 2003
|
|
8
|
+
*
|
|
9
|
+
* Last modified:
|
|
10
|
+
* $Date: 2011-09-08 22:34:40 +1000 (Thu, 08 Sep 2011) $ by $Author: schulte $
|
|
11
|
+
* $Revision: 12395 $
|
|
12
|
+
*
|
|
13
|
+
* This file is part of Gecode, the generic constraint
|
|
14
|
+
* development environment:
|
|
15
|
+
* http://www.gecode.org
|
|
16
|
+
*
|
|
17
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
18
|
+
* a copy of this software and associated documentation files (the
|
|
19
|
+
* "Software"), to deal in the Software without restriction, including
|
|
20
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
21
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
22
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
23
|
+
* the following conditions:
|
|
24
|
+
*
|
|
25
|
+
* The above copyright notice and this permission notice shall be
|
|
26
|
+
* included in all copies or substantial portions of the Software.
|
|
27
|
+
*
|
|
28
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
29
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
30
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
31
|
+
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
32
|
+
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
33
|
+
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
34
|
+
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
namespace Gecode { namespace Int { namespace ViewValGraph {
|
|
39
|
+
|
|
40
|
+
/*
|
|
41
|
+
* Nodes
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
template<class View>
|
|
46
|
+
forceinline
|
|
47
|
+
Node<View>::Node(void) : min(0) {
|
|
48
|
+
// Must be initialized such that the node is considered unvisited initially
|
|
49
|
+
}
|
|
50
|
+
template<class View>
|
|
51
|
+
forceinline Edge<View>*
|
|
52
|
+
Node<View>::edge_fst(void) const {
|
|
53
|
+
return static_cast<Edge<View>*>(BiLink::next());
|
|
54
|
+
}
|
|
55
|
+
template<class View>
|
|
56
|
+
forceinline Edge<View>*
|
|
57
|
+
Node<View>::edge_lst(void) const {
|
|
58
|
+
return static_cast<Edge<View>*>(static_cast<BiLink*>(const_cast<Node<View>*>(this)));
|
|
59
|
+
}
|
|
60
|
+
template<class View>
|
|
61
|
+
forceinline void
|
|
62
|
+
Node<View>::operator delete(void*, size_t) {}
|
|
63
|
+
template<class View>
|
|
64
|
+
forceinline void
|
|
65
|
+
Node<View>::operator delete(void*,Space&) {}
|
|
66
|
+
template<class View>
|
|
67
|
+
forceinline void*
|
|
68
|
+
Node<View>::operator new(size_t s, Space& home) {
|
|
69
|
+
return home.ralloc(s);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
* Value nodes
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
template<class View>
|
|
79
|
+
forceinline
|
|
80
|
+
ValNode<View>::ValNode(int v)
|
|
81
|
+
: _val(v), _matching(NULL) {}
|
|
82
|
+
template<class View>
|
|
83
|
+
forceinline
|
|
84
|
+
ValNode<View>::ValNode(int v, ValNode<View>* n)
|
|
85
|
+
: _val(v), _matching(NULL), _next_val(n) {}
|
|
86
|
+
template<class View>
|
|
87
|
+
forceinline int
|
|
88
|
+
ValNode<View>::val(void) const {
|
|
89
|
+
return _val;
|
|
90
|
+
}
|
|
91
|
+
template<class View>
|
|
92
|
+
forceinline void
|
|
93
|
+
ValNode<View>::matching(Edge<View>* m) {
|
|
94
|
+
_matching = m;
|
|
95
|
+
}
|
|
96
|
+
template<class View>
|
|
97
|
+
forceinline Edge<View>*
|
|
98
|
+
ValNode<View>::matching(void) const {
|
|
99
|
+
return _matching;
|
|
100
|
+
}
|
|
101
|
+
template<class View>
|
|
102
|
+
forceinline ValNode<View>**
|
|
103
|
+
ValNode<View>::next_val_ref(void) {
|
|
104
|
+
return &_next_val;
|
|
105
|
+
}
|
|
106
|
+
template<class View>
|
|
107
|
+
forceinline ValNode<View>*
|
|
108
|
+
ValNode<View>::next_val(void) const {
|
|
109
|
+
return _next_val;
|
|
110
|
+
}
|
|
111
|
+
template<class View>
|
|
112
|
+
forceinline void
|
|
113
|
+
ValNode<View>::next_val(ValNode<View>* n) {
|
|
114
|
+
_next_val = n;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/*
|
|
120
|
+
* View nodes
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
template<class View>
|
|
125
|
+
forceinline
|
|
126
|
+
ViewNode<View>::ViewNode(void)
|
|
127
|
+
: _view(View(NULL)) {}
|
|
128
|
+
template<class View>
|
|
129
|
+
forceinline
|
|
130
|
+
ViewNode<View>::ViewNode(View x)
|
|
131
|
+
: _size(x.size()), _view(x) {}
|
|
132
|
+
template<class View>
|
|
133
|
+
forceinline Edge<View>*
|
|
134
|
+
ViewNode<View>::val_edges(void) const {
|
|
135
|
+
return _val_edges;
|
|
136
|
+
}
|
|
137
|
+
template<class View>
|
|
138
|
+
forceinline Edge<View>**
|
|
139
|
+
ViewNode<View>::val_edges_ref(void) {
|
|
140
|
+
return &_val_edges;
|
|
141
|
+
}
|
|
142
|
+
template<class View>
|
|
143
|
+
forceinline bool
|
|
144
|
+
ViewNode<View>::fake(void) const {
|
|
145
|
+
return _view.varimp() == NULL;
|
|
146
|
+
}
|
|
147
|
+
template<class View>
|
|
148
|
+
forceinline View
|
|
149
|
+
ViewNode<View>::view(void) const {
|
|
150
|
+
return _view;
|
|
151
|
+
}
|
|
152
|
+
template<class View>
|
|
153
|
+
forceinline bool
|
|
154
|
+
ViewNode<View>::changed(void) const {
|
|
155
|
+
return _size != _view.size();
|
|
156
|
+
}
|
|
157
|
+
template<class View>
|
|
158
|
+
forceinline void
|
|
159
|
+
ViewNode<View>::update(void) {
|
|
160
|
+
_size = _view.size();
|
|
161
|
+
}
|
|
162
|
+
template<class View>
|
|
163
|
+
forceinline bool
|
|
164
|
+
ViewNode<View>::matched(void) const {
|
|
165
|
+
return Node<View>::edge_fst() != Node<View>::edge_lst();
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
}}}
|
|
169
|
+
|
|
170
|
+
// STATISTICS: int-prop
|
|
171
|
+
|
|
@@ -0,0 +1,1690 @@
|
|
|
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, 2005
|
|
8
|
+
*
|
|
9
|
+
* Last modified:
|
|
10
|
+
* $Date: 2011-09-28 22:50:49 +1000 (Wed, 28 Sep 2011) $ by $Author: tack $
|
|
11
|
+
* $Revision: 12418 $
|
|
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 <iostream>
|
|
39
|
+
|
|
40
|
+
#if (-17 / 7) == -2
|
|
41
|
+
#define GECODE_INT_RND_TWDS_ZERO 1
|
|
42
|
+
#else
|
|
43
|
+
#define GECODE_INT_RND_TWDS_ZERO 0
|
|
44
|
+
#endif
|
|
45
|
+
|
|
46
|
+
namespace Gecode { namespace Int {
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* \brief Range iterator for integer views
|
|
50
|
+
*
|
|
51
|
+
* This class provides (by specialization) a range iterator
|
|
52
|
+
* for all integer views.
|
|
53
|
+
*
|
|
54
|
+
* Note that this template class serves only as a specification
|
|
55
|
+
* of the interface of the various specializations.
|
|
56
|
+
*
|
|
57
|
+
* \ingroup TaskActorInt
|
|
58
|
+
*/
|
|
59
|
+
template<class View>
|
|
60
|
+
class ViewRanges {
|
|
61
|
+
public:
|
|
62
|
+
/// \name Constructors and initialization
|
|
63
|
+
//@{
|
|
64
|
+
/// Default constructor
|
|
65
|
+
ViewRanges(void);
|
|
66
|
+
/// Initialize with ranges for view \a x
|
|
67
|
+
ViewRanges(const View& x);
|
|
68
|
+
/// Initialize with ranges for view \a x
|
|
69
|
+
void init(const View& x);
|
|
70
|
+
//@}
|
|
71
|
+
|
|
72
|
+
/// \name Iteration control
|
|
73
|
+
//@{
|
|
74
|
+
/// Test whether iterator is still at a range or done
|
|
75
|
+
bool operator ()(void) const;
|
|
76
|
+
/// Move iterator to next range (if possible)
|
|
77
|
+
void operator ++(void);
|
|
78
|
+
//@}
|
|
79
|
+
|
|
80
|
+
/// \name Range access
|
|
81
|
+
//@{
|
|
82
|
+
/// Return smallest value of range
|
|
83
|
+
int min(void) const;
|
|
84
|
+
/// Return largest value of range
|
|
85
|
+
int max(void) const;
|
|
86
|
+
/// Return width of range (distance between minimum and maximum)
|
|
87
|
+
unsigned int width(void) const;
|
|
88
|
+
//@}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* \brief Value iterator for integer views
|
|
93
|
+
*
|
|
94
|
+
* This class provides a value iterator for all
|
|
95
|
+
* integer views.
|
|
96
|
+
*
|
|
97
|
+
* \ingroup TaskActorInt
|
|
98
|
+
*/
|
|
99
|
+
template<class View>
|
|
100
|
+
class ViewValues : public Iter::Ranges::ToValues<ViewRanges<View> > {
|
|
101
|
+
public:
|
|
102
|
+
/// \name Constructors and initialization
|
|
103
|
+
//@{
|
|
104
|
+
/// Default constructor
|
|
105
|
+
ViewValues(void);
|
|
106
|
+
/// Initialize with values for \a x
|
|
107
|
+
ViewValues(const View& x);
|
|
108
|
+
/// Initialize with values \a x
|
|
109
|
+
void init(const View& x);
|
|
110
|
+
//@}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
}}
|
|
114
|
+
|
|
115
|
+
#include <gecode/int/view/iter.hpp>
|
|
116
|
+
|
|
117
|
+
namespace Gecode { namespace Int {
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* \defgroup TaskActorIntView Integer views
|
|
121
|
+
*
|
|
122
|
+
* Integer propagators and branchers compute with integer views.
|
|
123
|
+
* Integer views provide views on integer variable implementations,
|
|
124
|
+
* integer constants, and also allow to scale, translate, and negate
|
|
125
|
+
* variables. Additionally, a special Boolean view is provided that
|
|
126
|
+
* offers convenient and efficient operations for Boolean (0/1)
|
|
127
|
+
* views.
|
|
128
|
+
* \ingroup TaskActorInt
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* \brief Integer view for integer variables
|
|
133
|
+
* \ingroup TaskActorIntView
|
|
134
|
+
*/
|
|
135
|
+
class IntView : public VarImpView<IntVar> {
|
|
136
|
+
protected:
|
|
137
|
+
using VarImpView<IntVar>::x;
|
|
138
|
+
public:
|
|
139
|
+
/// \name Constructors and initialization
|
|
140
|
+
//@{
|
|
141
|
+
/// Default constructor
|
|
142
|
+
IntView(void);
|
|
143
|
+
/// Initialize from integer variable \a y
|
|
144
|
+
IntView(const IntVar& y);
|
|
145
|
+
/// Initialize from integer variable \a y
|
|
146
|
+
IntView(IntVarImp* y);
|
|
147
|
+
//@}
|
|
148
|
+
|
|
149
|
+
/// \name Value access
|
|
150
|
+
//@{
|
|
151
|
+
/// Return minimum of domain
|
|
152
|
+
int min(void) const;
|
|
153
|
+
/// Return maximum of domain
|
|
154
|
+
int max(void) const;
|
|
155
|
+
/// Return median of domain (greatest element not greater than the median)
|
|
156
|
+
int med(void) const;
|
|
157
|
+
/// Return assigned value (only if assigned)
|
|
158
|
+
int val(void) const;
|
|
159
|
+
|
|
160
|
+
/// Return size (cardinality) of domain
|
|
161
|
+
unsigned int size(void) const;
|
|
162
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
163
|
+
unsigned int width(void) const;
|
|
164
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
165
|
+
unsigned int regret_min(void) const;
|
|
166
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
167
|
+
unsigned int regret_max(void) const;
|
|
168
|
+
//@}
|
|
169
|
+
|
|
170
|
+
/// \name Domain tests
|
|
171
|
+
//@{
|
|
172
|
+
/// Test whether domain is a range
|
|
173
|
+
bool range(void) const;
|
|
174
|
+
|
|
175
|
+
/// Test whether \a n is contained in domain
|
|
176
|
+
bool in(int n) const;
|
|
177
|
+
/// Test whether \a n is contained in domain
|
|
178
|
+
bool in(double n) const;
|
|
179
|
+
//@}
|
|
180
|
+
|
|
181
|
+
/// \name Domain update by value
|
|
182
|
+
//@{
|
|
183
|
+
/// Restrict domain values to be less or equal than \a n
|
|
184
|
+
ModEvent lq(Space& home, int n);
|
|
185
|
+
/// Restrict domain values to be less or equal than \a n
|
|
186
|
+
ModEvent lq(Space& home, double n);
|
|
187
|
+
|
|
188
|
+
/// Restrict domain values to be less than \a n
|
|
189
|
+
ModEvent le(Space& home, int n);
|
|
190
|
+
/// Restrict domain values to be less than \a n
|
|
191
|
+
ModEvent le(Space& home, double n);
|
|
192
|
+
|
|
193
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
194
|
+
ModEvent gq(Space& home, int n);
|
|
195
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
196
|
+
ModEvent gq(Space& home, double n);
|
|
197
|
+
|
|
198
|
+
/// Restrict domain values to be greater than \a n
|
|
199
|
+
ModEvent gr(Space& home, int n);
|
|
200
|
+
/// Restrict domain values to be greater than \a n
|
|
201
|
+
ModEvent gr(Space& home, double n);
|
|
202
|
+
/// Restrict domain values to be different from \a n
|
|
203
|
+
ModEvent nq(Space& home, int n);
|
|
204
|
+
/// Restrict domain values to be different from \a n
|
|
205
|
+
ModEvent nq(Space& home, double n);
|
|
206
|
+
|
|
207
|
+
/// Restrict domain values to be equal to \a n
|
|
208
|
+
ModEvent eq(Space& home, int n);
|
|
209
|
+
/// Restrict domain values to be equal to \a n
|
|
210
|
+
ModEvent eq(Space& home, double n);
|
|
211
|
+
//@}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* \name Domain update by iterator
|
|
215
|
+
*
|
|
216
|
+
* Views can be both updated by range and value iterators.
|
|
217
|
+
* Value iterators do not need to be strict in that the same value
|
|
218
|
+
* is allowed to occur more than once in the iterated sequence.
|
|
219
|
+
*
|
|
220
|
+
* The argument \a depends must be true, if the iterator
|
|
221
|
+
* passed as argument depends on the view on which the operation
|
|
222
|
+
* is invoked. In this case, the view is only updated after the
|
|
223
|
+
* iterator has been consumed. Otherwise, the domain might be updated
|
|
224
|
+
* concurrently while following the iterator.
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
227
|
+
//@{
|
|
228
|
+
/// Replace domain by ranges described by \a i
|
|
229
|
+
template<class I>
|
|
230
|
+
ModEvent narrow_r(Space& home, I& i, bool depends=true);
|
|
231
|
+
/// Intersect domain with ranges described by \a i
|
|
232
|
+
template<class I>
|
|
233
|
+
ModEvent inter_r(Space& home, I& i, bool depends=true);
|
|
234
|
+
/// Remove from domain the ranges described by \a i
|
|
235
|
+
template<class I>
|
|
236
|
+
ModEvent minus_r(Space& home, I& i, bool depends=true);
|
|
237
|
+
/// Replace domain by values described by \a i
|
|
238
|
+
template<class I>
|
|
239
|
+
ModEvent narrow_v(Space& home, I& i, bool depends=true);
|
|
240
|
+
/// Intersect domain with values described by \a i
|
|
241
|
+
template<class I>
|
|
242
|
+
ModEvent inter_v(Space& home, I& i, bool depends=true);
|
|
243
|
+
/// Remove from domain the values described by \a i
|
|
244
|
+
template<class I>
|
|
245
|
+
ModEvent minus_v(Space& home, I& i, bool depends=true);
|
|
246
|
+
//@}
|
|
247
|
+
|
|
248
|
+
/// \name Delta information for advisors
|
|
249
|
+
//@{
|
|
250
|
+
/// Return minimum value just pruned
|
|
251
|
+
int min(const Delta& d) const;
|
|
252
|
+
/// Return maximum value just pruned
|
|
253
|
+
int max(const Delta& d) const;
|
|
254
|
+
/// Test whether arbitrary values got pruned
|
|
255
|
+
bool any(const Delta& d) const;
|
|
256
|
+
//@}
|
|
257
|
+
|
|
258
|
+
/// \name View-dependent propagator support
|
|
259
|
+
//@{
|
|
260
|
+
/// Translate modification event \a me to modification event delta for view
|
|
261
|
+
static ModEventDelta med(ModEvent me);
|
|
262
|
+
//@}
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* \brief Print integer variable view
|
|
267
|
+
* \relates Gecode::Int::IntView
|
|
268
|
+
*/
|
|
269
|
+
template<class Char, class Traits>
|
|
270
|
+
std::basic_ostream<Char,Traits>&
|
|
271
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const IntView& x);
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* \brief Minus integer view
|
|
276
|
+
*
|
|
277
|
+
* A minus integer view \f$m\f$ for an integer view \f$x\f$ provides
|
|
278
|
+
* operations such that \f$m\f$ behaves as \f$-x\f$.
|
|
279
|
+
* \ingroup TaskActorIntView
|
|
280
|
+
*/
|
|
281
|
+
class MinusView : public DerivedView<IntView> {
|
|
282
|
+
protected:
|
|
283
|
+
using DerivedView<IntView>::x;
|
|
284
|
+
public:
|
|
285
|
+
/// \name Constructors and initialization
|
|
286
|
+
//@{
|
|
287
|
+
/// Default constructor
|
|
288
|
+
MinusView(void);
|
|
289
|
+
/// Initialize with integer view \a y
|
|
290
|
+
explicit MinusView(const IntView& y);
|
|
291
|
+
//@}
|
|
292
|
+
|
|
293
|
+
/// \name Value access
|
|
294
|
+
//@{
|
|
295
|
+
/// Return minimum of domain
|
|
296
|
+
int min(void) const;
|
|
297
|
+
/// Return maximum of domain
|
|
298
|
+
int max(void) const;
|
|
299
|
+
/// Return median of domain
|
|
300
|
+
int med(void) const;
|
|
301
|
+
/// Return assigned value (only if assigned)
|
|
302
|
+
int val(void) const;
|
|
303
|
+
|
|
304
|
+
/// Return size (cardinality) of domain
|
|
305
|
+
unsigned int size(void) const;
|
|
306
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
307
|
+
unsigned int width(void) const;
|
|
308
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
309
|
+
unsigned int regret_min(void) const;
|
|
310
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
311
|
+
unsigned int regret_max(void) const;
|
|
312
|
+
//@}
|
|
313
|
+
|
|
314
|
+
/// \name Domain tests
|
|
315
|
+
//@{
|
|
316
|
+
/// Test whether domain is a range
|
|
317
|
+
bool range(void) const;
|
|
318
|
+
|
|
319
|
+
/// Test whether \a n is contained in domain
|
|
320
|
+
bool in(int n) const;
|
|
321
|
+
/// Test whether \a n is contained in domain
|
|
322
|
+
bool in(double n) const;
|
|
323
|
+
//@}
|
|
324
|
+
|
|
325
|
+
/// \name Domain update by value
|
|
326
|
+
//@{
|
|
327
|
+
/// Restrict domain values to be less or equal than \a n
|
|
328
|
+
ModEvent lq(Space& home, int n);
|
|
329
|
+
/// Restrict domain values to be less or equal than \a n
|
|
330
|
+
ModEvent lq(Space& home, double n);
|
|
331
|
+
/// Restrict domain values to be less than \a n
|
|
332
|
+
ModEvent le(Space& home, int n);
|
|
333
|
+
/// Restrict domain values to be less than \a n
|
|
334
|
+
ModEvent le(Space& home, double n);
|
|
335
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
336
|
+
ModEvent gq(Space& home, int n);
|
|
337
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
338
|
+
ModEvent gq(Space& home, double n);
|
|
339
|
+
/// Restrict domain values to be greater than \a n
|
|
340
|
+
ModEvent gr(Space& home, int n);
|
|
341
|
+
/// Restrict domain values to be greater than \a n
|
|
342
|
+
ModEvent gr(Space& home, double n);
|
|
343
|
+
/// Restrict domain values to be different from \a n
|
|
344
|
+
ModEvent nq(Space& home, int n);
|
|
345
|
+
/// Restrict domain values to be different from \a n
|
|
346
|
+
ModEvent nq(Space& home, double n);
|
|
347
|
+
/// Restrict domain values to be equal to \a n
|
|
348
|
+
ModEvent eq(Space& home, int n);
|
|
349
|
+
/// Restrict domain values to be equal to \a n
|
|
350
|
+
ModEvent eq(Space& home, double n);
|
|
351
|
+
//@}
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* \name Domain update by iterator
|
|
355
|
+
*
|
|
356
|
+
* Views can be both updated by range and value iterators.
|
|
357
|
+
* Value iterators do not need to be strict in that the same value
|
|
358
|
+
* is allowed to occur more than once in the iterated sequence.
|
|
359
|
+
*
|
|
360
|
+
* The argument \a depends must be true, if the iterator
|
|
361
|
+
* passed as argument depends on the view on which the operation
|
|
362
|
+
* is invoked. In this case, the view is only updated after the
|
|
363
|
+
* iterator has been consumed. Otherwise, the domain might be updated
|
|
364
|
+
* concurrently while following the iterator.
|
|
365
|
+
*
|
|
366
|
+
*/
|
|
367
|
+
//@{
|
|
368
|
+
/// Replace domain by ranges described by \a i
|
|
369
|
+
template<class I>
|
|
370
|
+
ModEvent narrow_r(Space& home, I& i, bool depends=true);
|
|
371
|
+
/// Intersect domain with ranges described by \a i
|
|
372
|
+
template<class I>
|
|
373
|
+
ModEvent inter_r(Space& home, I& i, bool depends=true);
|
|
374
|
+
/// Remove from domain the ranges described by \a i
|
|
375
|
+
template<class I>
|
|
376
|
+
ModEvent minus_r(Space& home, I& i, bool depends=true);
|
|
377
|
+
/// Replace domain by values described by \a i
|
|
378
|
+
template<class I>
|
|
379
|
+
ModEvent narrow_v(Space& home, I& i, bool depends=true);
|
|
380
|
+
/// Intersect domain with values described by \a i
|
|
381
|
+
template<class I>
|
|
382
|
+
ModEvent inter_v(Space& home, I& i, bool depends=true);
|
|
383
|
+
/// Remove from domain the values described by \a i
|
|
384
|
+
template<class I>
|
|
385
|
+
ModEvent minus_v(Space& home, I& i, bool depends=true);
|
|
386
|
+
//@}
|
|
387
|
+
|
|
388
|
+
/// \name View-dependent propagator support
|
|
389
|
+
//@{
|
|
390
|
+
/// Translate modification event \a me to modification event delta for view
|
|
391
|
+
static ModEventDelta med(ModEvent me);
|
|
392
|
+
//@}
|
|
393
|
+
|
|
394
|
+
/// \name Delta information for advisors
|
|
395
|
+
//@{
|
|
396
|
+
/// Return minimum value just pruned
|
|
397
|
+
int min(const Delta& d) const;
|
|
398
|
+
/// Return maximum value just pruned
|
|
399
|
+
int max(const Delta& d) const;
|
|
400
|
+
/// Test whether arbitrary values got pruned
|
|
401
|
+
bool any(const Delta& d) const;
|
|
402
|
+
//@}
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* \brief Print integer minus view
|
|
407
|
+
* \relates Gecode::Int::MinusView
|
|
408
|
+
*/
|
|
409
|
+
template<class Char, class Traits>
|
|
410
|
+
std::basic_ostream<Char,Traits>&
|
|
411
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const MinusView& x);
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* \brief Offset integer view
|
|
416
|
+
*
|
|
417
|
+
* An offset integer view \f$o\f$ for an integer view \f$x\f$ and
|
|
418
|
+
* an integer \f$c\f$ provides operations such that \f$o\f$
|
|
419
|
+
* behaves as \f$x+c\f$.
|
|
420
|
+
* \ingroup TaskActorIntView
|
|
421
|
+
*/
|
|
422
|
+
class OffsetView : public DerivedView<IntView> {
|
|
423
|
+
protected:
|
|
424
|
+
/// Offset
|
|
425
|
+
int c;
|
|
426
|
+
using DerivedView<IntView>::x;
|
|
427
|
+
public:
|
|
428
|
+
/// \name Constructors and initialization
|
|
429
|
+
//@{
|
|
430
|
+
/// Default constructor
|
|
431
|
+
OffsetView(void);
|
|
432
|
+
/// Initialize with integer view \a y and offset \a c
|
|
433
|
+
OffsetView(const IntView& y, int c);
|
|
434
|
+
//@}
|
|
435
|
+
|
|
436
|
+
/// \name Value access
|
|
437
|
+
//@{
|
|
438
|
+
/// Return offset
|
|
439
|
+
int offset(void) const;
|
|
440
|
+
/// Change offset to \a n
|
|
441
|
+
void offset(int n);
|
|
442
|
+
/// Return minimum of domain
|
|
443
|
+
int min(void) const;
|
|
444
|
+
/// Return maximum of domain
|
|
445
|
+
int max(void) const;
|
|
446
|
+
/// Return median of domain (greatest element not greater than the median)
|
|
447
|
+
int med(void) const;
|
|
448
|
+
/// Return assigned value (only if assigned)
|
|
449
|
+
int val(void) const;
|
|
450
|
+
|
|
451
|
+
/// Return size (cardinality) of domain
|
|
452
|
+
unsigned int size(void) const;
|
|
453
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
454
|
+
unsigned int width(void) const;
|
|
455
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
456
|
+
unsigned int regret_min(void) const;
|
|
457
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
458
|
+
unsigned int regret_max(void) const;
|
|
459
|
+
//@}
|
|
460
|
+
|
|
461
|
+
/// \name Domain tests
|
|
462
|
+
//@{
|
|
463
|
+
/// Test whether domain is a range
|
|
464
|
+
bool range(void) const;
|
|
465
|
+
|
|
466
|
+
/// Test whether \a n is contained in domain
|
|
467
|
+
bool in(int n) const;
|
|
468
|
+
/// Test whether \a n is contained in domain
|
|
469
|
+
bool in(double n) const;
|
|
470
|
+
//@}
|
|
471
|
+
|
|
472
|
+
/// \name Domain update by value
|
|
473
|
+
//@{
|
|
474
|
+
/// Restrict domain values to be less or equal than \a n
|
|
475
|
+
ModEvent lq(Space& home, int n);
|
|
476
|
+
/// Restrict domain values to be less or equal than \a n
|
|
477
|
+
ModEvent lq(Space& home, double n);
|
|
478
|
+
/// Restrict domain values to be less than \a n
|
|
479
|
+
ModEvent le(Space& home, int n);
|
|
480
|
+
/// Restrict domain values to be less than \a n
|
|
481
|
+
ModEvent le(Space& home, double n);
|
|
482
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
483
|
+
ModEvent gq(Space& home, int n);
|
|
484
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
485
|
+
ModEvent gq(Space& home, double n);
|
|
486
|
+
/// Restrict domain values to be greater than \a n
|
|
487
|
+
ModEvent gr(Space& home, int n);
|
|
488
|
+
/// Restrict domain values to be greater than \a n
|
|
489
|
+
ModEvent gr(Space& home, double n);
|
|
490
|
+
/// Restrict domain values to be different from \a n
|
|
491
|
+
ModEvent nq(Space& home, int n);
|
|
492
|
+
/// Restrict domain values to be different from \a n
|
|
493
|
+
ModEvent nq(Space& home, double n);
|
|
494
|
+
/// Restrict domain values to be equal to \a n
|
|
495
|
+
ModEvent eq(Space& home, int n);
|
|
496
|
+
/// Restrict domain values to be equal to \a n
|
|
497
|
+
ModEvent eq(Space& home, double n);
|
|
498
|
+
//@}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* \name Domain update by iterator
|
|
502
|
+
*
|
|
503
|
+
* Views can be both updated by range and value iterators.
|
|
504
|
+
* Value iterators do not need to be strict in that the same value
|
|
505
|
+
* is allowed to occur more than once in the iterated sequence.
|
|
506
|
+
*
|
|
507
|
+
* The argument \a depends must be true, if the iterator
|
|
508
|
+
* passed as argument depends on the view on which the operation
|
|
509
|
+
* is invoked. In this case, the view is only updated after the
|
|
510
|
+
* iterator has been consumed. Otherwise, the domain might be updated
|
|
511
|
+
* concurrently while following the iterator.
|
|
512
|
+
*
|
|
513
|
+
*/
|
|
514
|
+
//@{
|
|
515
|
+
/// Replace domain by ranges described by \a i
|
|
516
|
+
template<class I>
|
|
517
|
+
ModEvent narrow_r(Space& home, I& i, bool depends=true);
|
|
518
|
+
/// Intersect domain with ranges described by \a i
|
|
519
|
+
template<class I>
|
|
520
|
+
ModEvent inter_r(Space& home, I& i, bool depends=true);
|
|
521
|
+
/// Remove from domain the ranges described by \a i
|
|
522
|
+
template<class I>
|
|
523
|
+
ModEvent minus_r(Space& home, I& i, bool depends=true);
|
|
524
|
+
/// Replace domain by values described by \a i
|
|
525
|
+
template<class I>
|
|
526
|
+
ModEvent narrow_v(Space& home, I& i, bool depends=true);
|
|
527
|
+
/// Intersect domain with values described by \a i
|
|
528
|
+
template<class I>
|
|
529
|
+
ModEvent inter_v(Space& home, I& i, bool depends=true);
|
|
530
|
+
/// Remove from domain the values described by \a i
|
|
531
|
+
template<class I>
|
|
532
|
+
ModEvent minus_v(Space& home, I& i, bool depends=true);
|
|
533
|
+
//@}
|
|
534
|
+
|
|
535
|
+
/// \name View-dependent propagator support
|
|
536
|
+
//@{
|
|
537
|
+
/// Translate modification event \a me to modification event delta for view
|
|
538
|
+
static ModEventDelta med(ModEvent me);
|
|
539
|
+
//@}
|
|
540
|
+
|
|
541
|
+
/// \name Delta information for advisors
|
|
542
|
+
//@{
|
|
543
|
+
/// Return minimum value just pruned
|
|
544
|
+
int min(const Delta& d) const;
|
|
545
|
+
/// Return maximum value just pruned
|
|
546
|
+
int max(const Delta& d) const;
|
|
547
|
+
/// Test whether arbitrary values got pruned
|
|
548
|
+
bool any(const Delta& d) const;
|
|
549
|
+
//@}
|
|
550
|
+
|
|
551
|
+
/// \name Cloning
|
|
552
|
+
//@{
|
|
553
|
+
/// Update this view to be a clone of view \a y
|
|
554
|
+
void update(Space& home, bool share, OffsetView& y);
|
|
555
|
+
//@}
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* \brief Print integer offset view
|
|
560
|
+
* \relates Gecode::Int::OffsetView
|
|
561
|
+
*/
|
|
562
|
+
template<class Char, class Traits>
|
|
563
|
+
std::basic_ostream<Char,Traits>&
|
|
564
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const OffsetView& x);
|
|
565
|
+
|
|
566
|
+
/** \name View comparison
|
|
567
|
+
* \relates Gecode::Int::OffsetView
|
|
568
|
+
*/
|
|
569
|
+
//@{
|
|
570
|
+
/// Test whether views \a x and \a y are the same
|
|
571
|
+
bool same(const OffsetView& x, const OffsetView& y);
|
|
572
|
+
/// Test whether view \a x comes before \a y (arbitrary order)
|
|
573
|
+
bool before(const OffsetView& x, const OffsetView& y);
|
|
574
|
+
//@}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* \brief Converter without offsets
|
|
578
|
+
*/
|
|
579
|
+
template<class View>
|
|
580
|
+
class NoOffset {
|
|
581
|
+
public:
|
|
582
|
+
/// The view type
|
|
583
|
+
typedef View ViewType;
|
|
584
|
+
/// Pass through \a x
|
|
585
|
+
View& operator ()(View& x);
|
|
586
|
+
/// Update during cloning
|
|
587
|
+
void update(const NoOffset&);
|
|
588
|
+
/// Access offset
|
|
589
|
+
int offset(void) const;
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
template<class View>
|
|
593
|
+
forceinline View&
|
|
594
|
+
NoOffset<View>::operator ()(View& x) {
|
|
595
|
+
return x;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
template<class View>
|
|
599
|
+
forceinline void
|
|
600
|
+
NoOffset<View>::update(const NoOffset&) {}
|
|
601
|
+
|
|
602
|
+
template<class View>
|
|
603
|
+
forceinline int
|
|
604
|
+
NoOffset<View>::offset(void) const {
|
|
605
|
+
return 0;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* \brief Converter with fixed offset
|
|
611
|
+
*/
|
|
612
|
+
class Offset {
|
|
613
|
+
public:
|
|
614
|
+
/// The view type
|
|
615
|
+
typedef OffsetView ViewType;
|
|
616
|
+
/// The offset
|
|
617
|
+
int c;
|
|
618
|
+
/// Constructor with offset \a off
|
|
619
|
+
Offset(int off = 0);
|
|
620
|
+
/// Return OffsetRefView for \a x
|
|
621
|
+
OffsetView operator()(IntView& x);
|
|
622
|
+
/// Update during cloning
|
|
623
|
+
void update(const Offset& o);
|
|
624
|
+
/// Access offset
|
|
625
|
+
int offset(void) const;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
forceinline
|
|
629
|
+
Offset::Offset(int off) : c(off) {}
|
|
630
|
+
|
|
631
|
+
forceinline void
|
|
632
|
+
Offset::update(const Offset& o) { c = o.c; }
|
|
633
|
+
|
|
634
|
+
forceinline int
|
|
635
|
+
Offset::offset(void) const { return c; }
|
|
636
|
+
|
|
637
|
+
forceinline OffsetView
|
|
638
|
+
Offset::operator ()(IntView& x) {
|
|
639
|
+
return OffsetView(x,c);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* \brief Scale integer view (template)
|
|
644
|
+
*
|
|
645
|
+
* A scale integer view \f$s\f$ for an integer view \f$x\f$ and
|
|
646
|
+
* a non-negative integer \f$a\f$ provides operations such that \f$s\f$
|
|
647
|
+
* behaves as \f$a\cdot x\f$.
|
|
648
|
+
*
|
|
649
|
+
* The precision of a scale integer view is defined by the value types
|
|
650
|
+
* \a Val and \a UnsVal. \a Val can be either \c int or \c double where
|
|
651
|
+
* \a UnsVal must be the unsigned variant of \a Val (that is, if \a Val
|
|
652
|
+
* is \c int, then \a UnsVal must be \c unsigned \c int; if \a Val is
|
|
653
|
+
* \c double, then \a UnsVal must be \c double as well). The range which is
|
|
654
|
+
* allowed for the two types is defined by the values in
|
|
655
|
+
* Gecode::Limits.
|
|
656
|
+
*
|
|
657
|
+
* Note that scale integer views currently do not provide operations
|
|
658
|
+
* for updating domains by range iterators.
|
|
659
|
+
*
|
|
660
|
+
* The template is not to be used directly (as it is very clumsy). Use
|
|
661
|
+
* the following instead:
|
|
662
|
+
* - IntScaleView for scale views with integer precision
|
|
663
|
+
* - DoubleScaleView for scale views with double precision
|
|
664
|
+
*
|
|
665
|
+
* \ingroup TaskActorIntView
|
|
666
|
+
*/
|
|
667
|
+
template<class Val, class UnsVal>
|
|
668
|
+
class ScaleView : public DerivedView<IntView> {
|
|
669
|
+
protected:
|
|
670
|
+
using DerivedView<IntView>::x;
|
|
671
|
+
/// Scale factor
|
|
672
|
+
int a;
|
|
673
|
+
/// \name Support functions for division
|
|
674
|
+
//@{
|
|
675
|
+
/// Return \f$\lfloor y/a\rfloor\f$
|
|
676
|
+
Val floor_div(double y) const;
|
|
677
|
+
/// Return \f$\lceil y/a\rceil\f$
|
|
678
|
+
Val ceil_div(double y) const;
|
|
679
|
+
/// Return \f$y/a\f$ and set \a exact to true if \a y is multiple of \a a
|
|
680
|
+
Val exact_div(double y, bool& exact) const;
|
|
681
|
+
#if GECODE_INT_RND_TWDS_ZERO
|
|
682
|
+
/// Return \f$\lfloor y/a\rfloor\f$
|
|
683
|
+
int floor_div(int y) const;
|
|
684
|
+
/// Return \f$\lceil y/a\rceil\f$
|
|
685
|
+
int ceil_div(int y) const;
|
|
686
|
+
/// Return \f$y/a\f$ and set \a exact to true if \a y is multiple of \a a
|
|
687
|
+
int exact_div(int y, bool& exact) const;
|
|
688
|
+
#endif
|
|
689
|
+
//@}
|
|
690
|
+
|
|
691
|
+
public:
|
|
692
|
+
/// \name Constructors and initialization
|
|
693
|
+
//@{
|
|
694
|
+
/// Default constructor
|
|
695
|
+
ScaleView(void);
|
|
696
|
+
/// Initialize as \f$b\cdot y\f$
|
|
697
|
+
ScaleView(int b, const IntView& y);
|
|
698
|
+
//@}
|
|
699
|
+
|
|
700
|
+
/// \name Value access
|
|
701
|
+
//@{
|
|
702
|
+
/// Return scale factor of scale view
|
|
703
|
+
int scale(void) const;
|
|
704
|
+
/// Return minimum of domain
|
|
705
|
+
Val min(void) const;
|
|
706
|
+
/// Return maximum of domain
|
|
707
|
+
Val max(void) const;
|
|
708
|
+
/// Return median of domain (greatest element not greater than the median)
|
|
709
|
+
Val med(void) const;
|
|
710
|
+
/// Return assigned value (only if assigned)
|
|
711
|
+
Val val(void) const;
|
|
712
|
+
|
|
713
|
+
/// Return size (cardinality) of domain
|
|
714
|
+
UnsVal size(void) const;
|
|
715
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
716
|
+
UnsVal width(void) const;
|
|
717
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
718
|
+
UnsVal regret_min(void) const;
|
|
719
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
720
|
+
UnsVal regret_max(void) const;
|
|
721
|
+
//@}
|
|
722
|
+
|
|
723
|
+
/// \name Domain tests
|
|
724
|
+
//@{
|
|
725
|
+
/// Test whether domain is a range
|
|
726
|
+
bool range(void) const;
|
|
727
|
+
/// Test whether \a n is contained in domain
|
|
728
|
+
bool in(Val n) const;
|
|
729
|
+
//@}
|
|
730
|
+
|
|
731
|
+
/// \name Domain update by value
|
|
732
|
+
//@{
|
|
733
|
+
/// Restrict domain values to be less or equal than \a n
|
|
734
|
+
ModEvent lq(Space& home, Val n);
|
|
735
|
+
/// Restrict domain values to be less than \a n
|
|
736
|
+
ModEvent le(Space& home, Val n);
|
|
737
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
738
|
+
ModEvent gq(Space& home, Val n);
|
|
739
|
+
/// Restrict domain values to be greater than \a n
|
|
740
|
+
ModEvent gr(Space& home, Val n);
|
|
741
|
+
/// Restrict domain values to be different from \a n
|
|
742
|
+
ModEvent nq(Space& home, Val n);
|
|
743
|
+
/// Restrict domain values to be equal to \a n
|
|
744
|
+
ModEvent eq(Space& home, Val n);
|
|
745
|
+
//@}
|
|
746
|
+
|
|
747
|
+
/// \name View-dependent propagator support
|
|
748
|
+
//@{
|
|
749
|
+
/// Translate modification event \a me to modification event delta for view
|
|
750
|
+
static ModEventDelta med(ModEvent me);
|
|
751
|
+
//@}
|
|
752
|
+
|
|
753
|
+
/// \name Delta information for advisors
|
|
754
|
+
//@{
|
|
755
|
+
/// Return minimum value just pruned
|
|
756
|
+
Val min(const Delta& d) const;
|
|
757
|
+
/// Return maximum value just pruned
|
|
758
|
+
Val max(const Delta& d) const;
|
|
759
|
+
/// Test whether arbitrary values got pruned
|
|
760
|
+
bool any(const Delta& d) const;
|
|
761
|
+
//@}
|
|
762
|
+
|
|
763
|
+
/// \name Cloning
|
|
764
|
+
//@{
|
|
765
|
+
/// Update this view to be a clone of view \a y
|
|
766
|
+
void update(Space& home, bool share, ScaleView<Val,UnsVal>& y);
|
|
767
|
+
//@}
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* \brief Integer-precision integer scale view
|
|
772
|
+
* \ingroup TaskActorIntView
|
|
773
|
+
*/
|
|
774
|
+
typedef ScaleView<int,unsigned int> IntScaleView;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* \brief Double-precision integer scale view
|
|
778
|
+
* \ingroup TaskActorIntView
|
|
779
|
+
*/
|
|
780
|
+
typedef ScaleView<double,double> DoubleScaleView;
|
|
781
|
+
|
|
782
|
+
/**
|
|
783
|
+
* \brief Print integer-precision integer scale view
|
|
784
|
+
* \relates Gecode::Int::ScaleView
|
|
785
|
+
*/
|
|
786
|
+
template<class Char, class Traits>
|
|
787
|
+
std::basic_ostream<Char,Traits>&
|
|
788
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const IntScaleView& x);
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* \brief Print double-precision integer scale view
|
|
792
|
+
* \relates Gecode::Int::ScaleView
|
|
793
|
+
*/
|
|
794
|
+
template<class Char, class Traits>
|
|
795
|
+
std::basic_ostream<Char,Traits>&
|
|
796
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const DoubleScaleView& x);
|
|
797
|
+
|
|
798
|
+
/** \name View comparison
|
|
799
|
+
* \relates Gecode::Int::ScaleView
|
|
800
|
+
*/
|
|
801
|
+
//@{
|
|
802
|
+
/// Test whether views \a x and \a y are the same
|
|
803
|
+
template<class Val, class UnsVal>
|
|
804
|
+
bool same(const ScaleView<Val,UnsVal>& x, const ScaleView<Val,UnsVal>& y);
|
|
805
|
+
/// Test whether view \a x comes before \a y (arbitrary order)
|
|
806
|
+
template<class Val, class UnsVal>
|
|
807
|
+
bool before(const ScaleView<Val,UnsVal>& x, const ScaleView<Val,UnsVal>& y);
|
|
808
|
+
//@}
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
/**
|
|
813
|
+
* \brief Constant integer view
|
|
814
|
+
*
|
|
815
|
+
* A constant integer view \f$x\f$ for an integer \f$c\f$ provides
|
|
816
|
+
* operations such that \f$x\f$ behaves as a view assigned to \f$c\f$.
|
|
817
|
+
* \ingroup TaskActorIntView
|
|
818
|
+
*/
|
|
819
|
+
class ConstIntView : public ConstView<IntView> {
|
|
820
|
+
protected:
|
|
821
|
+
int x;
|
|
822
|
+
public:
|
|
823
|
+
/// \name Constructors and initialization
|
|
824
|
+
//@{
|
|
825
|
+
/// Default constructor
|
|
826
|
+
ConstIntView(void);
|
|
827
|
+
/// Initialize with integer value \a n
|
|
828
|
+
ConstIntView(int n);
|
|
829
|
+
//@}
|
|
830
|
+
|
|
831
|
+
/// \name Value access
|
|
832
|
+
//@{
|
|
833
|
+
/// Return minimum of domain
|
|
834
|
+
int min(void) const;
|
|
835
|
+
/// Return maximum of domain
|
|
836
|
+
int max(void) const;
|
|
837
|
+
/// Return median of domain (greatest element not greater than the median)
|
|
838
|
+
int med(void) const;
|
|
839
|
+
/// Return assigned value (only if assigned)
|
|
840
|
+
int val(void) const;
|
|
841
|
+
|
|
842
|
+
/// Return size (cardinality) of domain
|
|
843
|
+
unsigned int size(void) const;
|
|
844
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
845
|
+
unsigned int width(void) const;
|
|
846
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
847
|
+
unsigned int regret_min(void) const;
|
|
848
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
849
|
+
unsigned int regret_max(void) const;
|
|
850
|
+
//@}
|
|
851
|
+
|
|
852
|
+
/// \name Domain tests
|
|
853
|
+
//@{
|
|
854
|
+
/// Test whether domain is a range
|
|
855
|
+
bool range(void) const;
|
|
856
|
+
/// Test whether \a n is contained in domain
|
|
857
|
+
bool in(int n) const;
|
|
858
|
+
/// Test whether \a n is contained in domain
|
|
859
|
+
bool in(double n) const;
|
|
860
|
+
//@}
|
|
861
|
+
|
|
862
|
+
/// \name Domain update by value
|
|
863
|
+
//@{
|
|
864
|
+
/// Restrict domain values to be less or equal than \a n
|
|
865
|
+
ModEvent lq(Space& home, int n);
|
|
866
|
+
/// Restrict domain values to be less or equal than \a n
|
|
867
|
+
ModEvent lq(Space& home, double n);
|
|
868
|
+
/// Restrict domain values to be less than \a n
|
|
869
|
+
ModEvent le(Space& home, int n);
|
|
870
|
+
/// Restrict domain values to be less than \a n
|
|
871
|
+
ModEvent le(Space& home, double n);
|
|
872
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
873
|
+
ModEvent gq(Space& home, int n);
|
|
874
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
875
|
+
ModEvent gq(Space& home, double n);
|
|
876
|
+
/// Restrict domain values to be greater than \a n
|
|
877
|
+
ModEvent gr(Space& home, int n);
|
|
878
|
+
/// Restrict domain values to be greater than \a n
|
|
879
|
+
ModEvent gr(Space& home, double n);
|
|
880
|
+
/// Restrict domain values to be different from \a n
|
|
881
|
+
ModEvent nq(Space& home, int n);
|
|
882
|
+
/// Restrict domain values to be different from \a n
|
|
883
|
+
ModEvent nq(Space& home, double n);
|
|
884
|
+
/// Restrict domain values to be equal to \a n
|
|
885
|
+
ModEvent eq(Space& home, int n);
|
|
886
|
+
/// Restrict domain values to be equal to \a n
|
|
887
|
+
ModEvent eq(Space& home, double n);
|
|
888
|
+
//@}
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* \name Domain update by iterator
|
|
892
|
+
*
|
|
893
|
+
* Views can be both updated by range and value iterators.
|
|
894
|
+
* Value iterators do not need to be strict in that the same value
|
|
895
|
+
* is allowed to occur more than once in the iterated sequence.
|
|
896
|
+
*
|
|
897
|
+
* The argument \a depends must be true, if the iterator
|
|
898
|
+
* passed as argument depends on the view on which the operation
|
|
899
|
+
* is invoked. In this case, the view is only updated after the
|
|
900
|
+
* iterator has been consumed. Otherwise, the domain might be updated
|
|
901
|
+
* concurrently while following the iterator.
|
|
902
|
+
*
|
|
903
|
+
*/
|
|
904
|
+
//@{
|
|
905
|
+
/// Replace domain by ranges described by \a i
|
|
906
|
+
template<class I>
|
|
907
|
+
ModEvent narrow_r(Space& home, I& i, bool depends=true);
|
|
908
|
+
/// Intersect domain with ranges described by \a i
|
|
909
|
+
template<class I>
|
|
910
|
+
ModEvent inter_r(Space& home, I& i, bool depends=true);
|
|
911
|
+
/// Remove from domain the ranges described by \a i
|
|
912
|
+
template<class I>
|
|
913
|
+
ModEvent minus_r(Space& home, I& i, bool depends=true);
|
|
914
|
+
/// Replace domain by values described by \a i
|
|
915
|
+
template<class I>
|
|
916
|
+
ModEvent narrow_v(Space& home, I& i, bool depends=true);
|
|
917
|
+
/// Intersect domain with values described by \a i
|
|
918
|
+
template<class I>
|
|
919
|
+
ModEvent inter_v(Space& home, I& i, bool depends=true);
|
|
920
|
+
/// Remove from domain the values described by \a i
|
|
921
|
+
template<class I>
|
|
922
|
+
ModEvent minus_v(Space& home, I& i, bool depends=true);
|
|
923
|
+
//@}
|
|
924
|
+
|
|
925
|
+
/// \name Delta information for advisors
|
|
926
|
+
//@{
|
|
927
|
+
/// Return minimum value just pruned
|
|
928
|
+
int min(const Delta& d) const;
|
|
929
|
+
/// Return maximum value just pruned
|
|
930
|
+
int max(const Delta& d) const;
|
|
931
|
+
/// Test whether arbitrary values got pruned
|
|
932
|
+
bool any(const Delta& d) const;
|
|
933
|
+
//@}
|
|
934
|
+
|
|
935
|
+
/// \name Cloning
|
|
936
|
+
//@{
|
|
937
|
+
/// Update this view to be a clone of view \a y
|
|
938
|
+
void update(Space& home, bool share, ConstIntView& y);
|
|
939
|
+
//@}
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* \brief Print integer constant integer view
|
|
944
|
+
* \relates Gecode::Int::ConstIntView
|
|
945
|
+
*/
|
|
946
|
+
template<class Char, class Traits>
|
|
947
|
+
std::basic_ostream<Char,Traits>&
|
|
948
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const ConstIntView& x);
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* \name View comparison
|
|
952
|
+
* \relates Gecode::Int::ConstIntView
|
|
953
|
+
*/
|
|
954
|
+
//@{
|
|
955
|
+
/// Test whether views \a x and \a y are the same
|
|
956
|
+
bool same(const ConstIntView& x, const ConstIntView& y);
|
|
957
|
+
/// Test whether view \a x is before \a y (arbitrary order)
|
|
958
|
+
bool before(const ConstIntView& x, const ConstIntView& y);
|
|
959
|
+
//@}
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* \brief Zero integer view
|
|
964
|
+
*
|
|
965
|
+
* A zero integer view \f$x\f$ for provides
|
|
966
|
+
* operations such that \f$x\f$ behaves as a view assigned to \f$0\f$.
|
|
967
|
+
* \ingroup TaskActorIntView
|
|
968
|
+
*/
|
|
969
|
+
class ZeroIntView : public ConstView<IntView> {
|
|
970
|
+
public:
|
|
971
|
+
/// \name Constructors and initialization
|
|
972
|
+
//@{
|
|
973
|
+
/// Default constructor
|
|
974
|
+
ZeroIntView(void);
|
|
975
|
+
//@}
|
|
976
|
+
|
|
977
|
+
/// \name Value access
|
|
978
|
+
//@{
|
|
979
|
+
/// Return minimum of domain
|
|
980
|
+
int min(void) const;
|
|
981
|
+
/// Return maximum of domain
|
|
982
|
+
int max(void) const;
|
|
983
|
+
/// Return median of domain (greatest element not greater than the median)
|
|
984
|
+
int med(void) const;
|
|
985
|
+
/// Return assigned value (only if assigned)
|
|
986
|
+
int val(void) const;
|
|
987
|
+
|
|
988
|
+
/// Return size (cardinality) of domain
|
|
989
|
+
unsigned int size(void) const;
|
|
990
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
991
|
+
unsigned int width(void) const;
|
|
992
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
993
|
+
unsigned int regret_min(void) const;
|
|
994
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
995
|
+
unsigned int regret_max(void) const;
|
|
996
|
+
//@}
|
|
997
|
+
|
|
998
|
+
/// \name Domain tests
|
|
999
|
+
//@{
|
|
1000
|
+
/// Test whether domain is a range
|
|
1001
|
+
bool range(void) const;
|
|
1002
|
+
/// Test whether \a n is contained in domain
|
|
1003
|
+
bool in(int n) const;
|
|
1004
|
+
/// Test whether \a n is contained in domain
|
|
1005
|
+
bool in(double n) const;
|
|
1006
|
+
//@}
|
|
1007
|
+
|
|
1008
|
+
/// \name Domain update by value
|
|
1009
|
+
//@{
|
|
1010
|
+
/// Restrict domain values to be less or equal than \a n
|
|
1011
|
+
ModEvent lq(Space& home, int n);
|
|
1012
|
+
/// Restrict domain values to be less or equal than \a n
|
|
1013
|
+
ModEvent lq(Space& home, double n);
|
|
1014
|
+
/// Restrict domain values to be less than \a n
|
|
1015
|
+
ModEvent le(Space& home, int n);
|
|
1016
|
+
/// Restrict domain values to be less than \a n
|
|
1017
|
+
ModEvent le(Space& home, double n);
|
|
1018
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
1019
|
+
ModEvent gq(Space& home, int n);
|
|
1020
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
1021
|
+
ModEvent gq(Space& home, double n);
|
|
1022
|
+
/// Restrict domain values to be greater than \a n
|
|
1023
|
+
ModEvent gr(Space& home, int n);
|
|
1024
|
+
/// Restrict domain values to be greater than \a n
|
|
1025
|
+
ModEvent gr(Space& home, double n);
|
|
1026
|
+
/// Restrict domain values to be different from \a n
|
|
1027
|
+
ModEvent nq(Space& home, int n);
|
|
1028
|
+
/// Restrict domain values to be different from \a n
|
|
1029
|
+
ModEvent nq(Space& home, double n);
|
|
1030
|
+
/// Restrict domain values to be equal to \a n
|
|
1031
|
+
ModEvent eq(Space& home, int n);
|
|
1032
|
+
/// Restrict domain values to be equal to \a n
|
|
1033
|
+
ModEvent eq(Space& home, double n);
|
|
1034
|
+
//@}
|
|
1035
|
+
|
|
1036
|
+
/**
|
|
1037
|
+
* \name Domain update by iterator
|
|
1038
|
+
*
|
|
1039
|
+
* Views can be both updated by range and value iterators.
|
|
1040
|
+
* Value iterators do not need to be strict in that the same value
|
|
1041
|
+
* is allowed to occur more than once in the iterated sequence.
|
|
1042
|
+
*
|
|
1043
|
+
* The argument \a depends must be true, if the iterator
|
|
1044
|
+
* passed as argument depends on the view on which the operation
|
|
1045
|
+
* is invoked. In this case, the view is only updated after the
|
|
1046
|
+
* iterator has been consumed. Otherwise, the domain might be updated
|
|
1047
|
+
* concurrently while following the iterator.
|
|
1048
|
+
*
|
|
1049
|
+
*/
|
|
1050
|
+
//@{
|
|
1051
|
+
/// Replace domain by ranges described by \a i
|
|
1052
|
+
template<class I>
|
|
1053
|
+
ModEvent narrow_r(Space& home, I& i, bool depends=true);
|
|
1054
|
+
/// Intersect domain with ranges described by \a i
|
|
1055
|
+
template<class I>
|
|
1056
|
+
ModEvent inter_r(Space& home, I& i, bool depends=true);
|
|
1057
|
+
/// Remove from domain the ranges described by \a i
|
|
1058
|
+
template<class I>
|
|
1059
|
+
ModEvent minus_r(Space& home, I& i, bool depends=true);
|
|
1060
|
+
/// Replace domain by values described by \a i
|
|
1061
|
+
template<class I>
|
|
1062
|
+
ModEvent narrow_v(Space& home, I& i, bool depends=true);
|
|
1063
|
+
/// Intersect domain with values described by \a i
|
|
1064
|
+
template<class I>
|
|
1065
|
+
ModEvent inter_v(Space& home, I& i, bool depends=true);
|
|
1066
|
+
/// Remove from domain the values described by \a i
|
|
1067
|
+
template<class I>
|
|
1068
|
+
ModEvent minus_v(Space& home, I& i, bool depends=true);
|
|
1069
|
+
//@}
|
|
1070
|
+
|
|
1071
|
+
/// \name Delta information for advisors
|
|
1072
|
+
//@{
|
|
1073
|
+
/// Return minimum value just pruned
|
|
1074
|
+
int min(const Delta& d) const;
|
|
1075
|
+
/// Return maximum value just pruned
|
|
1076
|
+
int max(const Delta& d) const;
|
|
1077
|
+
/// Test whether arbitrary values got pruned
|
|
1078
|
+
bool any(const Delta& d) const;
|
|
1079
|
+
//@}
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* \brief Print integer zero view
|
|
1084
|
+
* \relates Gecode::Int::ZeroView
|
|
1085
|
+
*/
|
|
1086
|
+
template<class Char, class Traits>
|
|
1087
|
+
std::basic_ostream<Char,Traits>&
|
|
1088
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const ZeroIntView& x);
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* \name View comparison
|
|
1092
|
+
* \relates Gecode::Int::ZeroIntView
|
|
1093
|
+
*/
|
|
1094
|
+
//@{
|
|
1095
|
+
/// Test whether views \a x and \a y are the same
|
|
1096
|
+
bool same(const ZeroIntView& x, const ZeroIntView& y);
|
|
1097
|
+
//@}
|
|
1098
|
+
|
|
1099
|
+
template<class View> class ViewDiffRanges;
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* \brief Cached integer view
|
|
1103
|
+
*
|
|
1104
|
+
* A cached integer view \f$c\f$ for an integer view \f$x\f$ adds operations
|
|
1105
|
+
* for cacheing the current domain of \f$x\f$ and comparing the current
|
|
1106
|
+
* domain to the cached domain. Cached views make it easy to implement
|
|
1107
|
+
* incremental propagation algorithms.
|
|
1108
|
+
*
|
|
1109
|
+
* \ingroup TaskActorIntView
|
|
1110
|
+
*/
|
|
1111
|
+
template<class View>
|
|
1112
|
+
class CachedView : public DerivedView<View> {
|
|
1113
|
+
friend class ViewDiffRanges<View>;
|
|
1114
|
+
protected:
|
|
1115
|
+
using DerivedView<View>::x;
|
|
1116
|
+
/// First cached range
|
|
1117
|
+
RangeList* _firstRange;
|
|
1118
|
+
/// Last cached range
|
|
1119
|
+
RangeList* _lastRange;
|
|
1120
|
+
/// Size of cached domain
|
|
1121
|
+
unsigned int _size;
|
|
1122
|
+
public:
|
|
1123
|
+
/// \name Constructors and initialization
|
|
1124
|
+
//@{
|
|
1125
|
+
/// Default constructor
|
|
1126
|
+
CachedView(void);
|
|
1127
|
+
/// Initialize with integer view \a y
|
|
1128
|
+
explicit CachedView(const View& y);
|
|
1129
|
+
//@}
|
|
1130
|
+
|
|
1131
|
+
/// \name Value access
|
|
1132
|
+
//@{
|
|
1133
|
+
/// Return minimum of domain
|
|
1134
|
+
int min(void) const;
|
|
1135
|
+
/// Return maximum of domain
|
|
1136
|
+
int max(void) const;
|
|
1137
|
+
/// Return median of domain (greatest element not greater than the median)
|
|
1138
|
+
int med(void) const;
|
|
1139
|
+
/// Return assigned value (only if assigned)
|
|
1140
|
+
int val(void) const;
|
|
1141
|
+
|
|
1142
|
+
/// Return size (cardinality) of domain
|
|
1143
|
+
unsigned int size(void) const;
|
|
1144
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
1145
|
+
unsigned int width(void) const;
|
|
1146
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
1147
|
+
unsigned int regret_min(void) const;
|
|
1148
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
1149
|
+
unsigned int regret_max(void) const;
|
|
1150
|
+
//@}
|
|
1151
|
+
|
|
1152
|
+
/// \name Domain tests
|
|
1153
|
+
//@{
|
|
1154
|
+
/// Test whether domain is a range
|
|
1155
|
+
bool range(void) const;
|
|
1156
|
+
|
|
1157
|
+
/// Test whether \a n is contained in domain
|
|
1158
|
+
bool in(int n) const;
|
|
1159
|
+
/// Test whether \a n is contained in domain
|
|
1160
|
+
bool in(double n) const;
|
|
1161
|
+
//@}
|
|
1162
|
+
|
|
1163
|
+
/// \name Domain update by value
|
|
1164
|
+
//@{
|
|
1165
|
+
/// Restrict domain values to be less or equal than \a n
|
|
1166
|
+
ModEvent lq(Space& home, int n);
|
|
1167
|
+
/// Restrict domain values to be less or equal than \a n
|
|
1168
|
+
ModEvent lq(Space& home, double n);
|
|
1169
|
+
/// Restrict domain values to be less than \a n
|
|
1170
|
+
ModEvent le(Space& home, int n);
|
|
1171
|
+
/// Restrict domain values to be less than \a n
|
|
1172
|
+
ModEvent le(Space& home, double n);
|
|
1173
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
1174
|
+
ModEvent gq(Space& home, int n);
|
|
1175
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
1176
|
+
ModEvent gq(Space& home, double n);
|
|
1177
|
+
/// Restrict domain values to be greater than \a n
|
|
1178
|
+
ModEvent gr(Space& home, int n);
|
|
1179
|
+
/// Restrict domain values to be greater than \a n
|
|
1180
|
+
ModEvent gr(Space& home, double n);
|
|
1181
|
+
/// Restrict domain values to be different from \a n
|
|
1182
|
+
ModEvent nq(Space& home, int n);
|
|
1183
|
+
/// Restrict domain values to be different from \a n
|
|
1184
|
+
ModEvent nq(Space& home, double n);
|
|
1185
|
+
/// Restrict domain values to be equal to \a n
|
|
1186
|
+
ModEvent eq(Space& home, int n);
|
|
1187
|
+
/// Restrict domain values to be equal to \a n
|
|
1188
|
+
ModEvent eq(Space& home, double n);
|
|
1189
|
+
//@}
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* \name Domain update by iterator
|
|
1193
|
+
*
|
|
1194
|
+
* Views can be both updated by range and value iterators.
|
|
1195
|
+
* Value iterators do not need to be strict in that the same value
|
|
1196
|
+
* is allowed to occur more than once in the iterated sequence.
|
|
1197
|
+
*
|
|
1198
|
+
* The argument \a depends must be true, if the iterator
|
|
1199
|
+
* passed as argument depends on the view on which the operation
|
|
1200
|
+
* is invoked. In this case, the view is only updated after the
|
|
1201
|
+
* iterator has been consumed. Otherwise, the domain might be updated
|
|
1202
|
+
* concurrently while following the iterator.
|
|
1203
|
+
*
|
|
1204
|
+
*/
|
|
1205
|
+
//@{
|
|
1206
|
+
/// Replace domain by ranges described by \a i
|
|
1207
|
+
template<class I>
|
|
1208
|
+
ModEvent narrow_r(Space& home, I& i, bool depends=true);
|
|
1209
|
+
/// Intersect domain with ranges described by \a i
|
|
1210
|
+
template<class I>
|
|
1211
|
+
ModEvent inter_r(Space& home, I& i, bool depends=true);
|
|
1212
|
+
/// Remove from domain the ranges described by \a i
|
|
1213
|
+
template<class I>
|
|
1214
|
+
ModEvent minus_r(Space& home, I& i, bool depends=true);
|
|
1215
|
+
/// Replace domain by values described by \a i
|
|
1216
|
+
template<class I>
|
|
1217
|
+
ModEvent narrow_v(Space& home, I& i, bool depends=true);
|
|
1218
|
+
/// Intersect domain with values described by \a i
|
|
1219
|
+
template<class I>
|
|
1220
|
+
ModEvent inter_v(Space& home, I& i, bool depends=true);
|
|
1221
|
+
/// Remove from domain the values described by \a i
|
|
1222
|
+
template<class I>
|
|
1223
|
+
ModEvent minus_v(Space& home, I& i, bool depends=true);
|
|
1224
|
+
//@}
|
|
1225
|
+
|
|
1226
|
+
/// \name View-dependent propagator support
|
|
1227
|
+
//@{
|
|
1228
|
+
/// Translate modification event \a me to modification event delta for view
|
|
1229
|
+
static ModEventDelta med(ModEvent me);
|
|
1230
|
+
//@}
|
|
1231
|
+
|
|
1232
|
+
/// \name Delta information for advisors
|
|
1233
|
+
//@{
|
|
1234
|
+
/// Return minimum value just pruned
|
|
1235
|
+
int min(const Delta& d) const;
|
|
1236
|
+
/// Return maximum value just pruned
|
|
1237
|
+
int max(const Delta& d) const;
|
|
1238
|
+
/// Test whether arbitrary values got pruned
|
|
1239
|
+
bool any(const Delta& d) const;
|
|
1240
|
+
//@}
|
|
1241
|
+
|
|
1242
|
+
/// \name Domain cache operations
|
|
1243
|
+
//@{
|
|
1244
|
+
/// Initialize cache to set \a s
|
|
1245
|
+
void initCache(Space& home, const IntSet& s);
|
|
1246
|
+
/// Update cache to current domain
|
|
1247
|
+
void cache(Space& home);
|
|
1248
|
+
/// Check whether cache differs from current domain
|
|
1249
|
+
bool modified(void) const;
|
|
1250
|
+
//@}
|
|
1251
|
+
|
|
1252
|
+
/// \name Cloning
|
|
1253
|
+
//@{
|
|
1254
|
+
/// Update this view to be a clone of view \a y
|
|
1255
|
+
void update(Space& home, bool share, CachedView<View>& y);
|
|
1256
|
+
//@}
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* \brief Print integer offset view
|
|
1261
|
+
* \relates Gecode::Int::CachedView
|
|
1262
|
+
*/
|
|
1263
|
+
template<class Char, class Traits, class View>
|
|
1264
|
+
std::basic_ostream<Char,Traits>&
|
|
1265
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const CachedView<View>& x);
|
|
1266
|
+
|
|
1267
|
+
/** \name View comparison
|
|
1268
|
+
* \relates Gecode::Int::CachedView
|
|
1269
|
+
*/
|
|
1270
|
+
//@{
|
|
1271
|
+
/// Test whether views \a x and \a y are the same
|
|
1272
|
+
template<class View>
|
|
1273
|
+
bool same(const CachedView<View>& x, const CachedView<View>& y);
|
|
1274
|
+
/// Test whether view \a x comes before \a y (arbitrary order)
|
|
1275
|
+
template<class View>
|
|
1276
|
+
bool before(const CachedView<View>& x, const CachedView<View>& y);
|
|
1277
|
+
//@}
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* \brief %Range iterator for cached integer views
|
|
1281
|
+
*
|
|
1282
|
+
* This iterator iterates the difference between the cached domain
|
|
1283
|
+
* and the current domain of an integer view.
|
|
1284
|
+
*
|
|
1285
|
+
* \ingroup TaskActorInt
|
|
1286
|
+
*/
|
|
1287
|
+
template<class View>
|
|
1288
|
+
class ViewDiffRanges
|
|
1289
|
+
: public Iter::Ranges::Diff<Iter::Ranges::RangeList,ViewRanges<View> > {
|
|
1290
|
+
typedef Iter::Ranges::Diff<Iter::Ranges::RangeList,ViewRanges<View> >
|
|
1291
|
+
Super;
|
|
1292
|
+
protected:
|
|
1293
|
+
/// Cached domain iterator
|
|
1294
|
+
Iter::Ranges::RangeList cr;
|
|
1295
|
+
/// Current domain iterator
|
|
1296
|
+
ViewRanges<View> dr;
|
|
1297
|
+
public:
|
|
1298
|
+
/// \name Constructors and initialization
|
|
1299
|
+
//@{
|
|
1300
|
+
/// Default constructor
|
|
1301
|
+
ViewDiffRanges(void);
|
|
1302
|
+
/// Initialize with ranges for view \a x
|
|
1303
|
+
ViewDiffRanges(const CachedView<View>& x);
|
|
1304
|
+
/// Initialize with ranges for view \a x
|
|
1305
|
+
void init(const CachedView<View>& x);
|
|
1306
|
+
//@}
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* \brief Boolean view for Boolean variables
|
|
1311
|
+
*
|
|
1312
|
+
* Provides convenient and efficient operations for Boolean views.
|
|
1313
|
+
* \ingroup TaskActorIntView
|
|
1314
|
+
*/
|
|
1315
|
+
class BoolView : public VarImpView<BoolVar> {
|
|
1316
|
+
protected:
|
|
1317
|
+
using VarImpView<BoolVar>::x;
|
|
1318
|
+
public:
|
|
1319
|
+
/// \name Constructors and initialization
|
|
1320
|
+
//@{
|
|
1321
|
+
/// Default constructor
|
|
1322
|
+
BoolView(void);
|
|
1323
|
+
/// Initialize from Boolean variable \a y
|
|
1324
|
+
BoolView(const BoolVar& y);
|
|
1325
|
+
/// Initialize from Boolean variable implementation \a y
|
|
1326
|
+
BoolView(BoolVarImp* y);
|
|
1327
|
+
//@}
|
|
1328
|
+
|
|
1329
|
+
/// \name Domain status access
|
|
1330
|
+
//@{
|
|
1331
|
+
/// How many bits does the status have
|
|
1332
|
+
static const int BITS = BoolVarImp::BITS;
|
|
1333
|
+
/// Status of domain assigned to zero
|
|
1334
|
+
static const BoolStatus ZERO = BoolVarImp::ZERO;
|
|
1335
|
+
/// Status of domain assigned to one
|
|
1336
|
+
static const BoolStatus ONE = BoolVarImp::ONE;
|
|
1337
|
+
/// Status of domain not yet assigned
|
|
1338
|
+
static const BoolStatus NONE = BoolVarImp::NONE;
|
|
1339
|
+
/// Return current domain status
|
|
1340
|
+
BoolStatus status(void) const;
|
|
1341
|
+
//@}
|
|
1342
|
+
|
|
1343
|
+
/// \name Value access
|
|
1344
|
+
//@{
|
|
1345
|
+
/// Return minimum of domain
|
|
1346
|
+
int min(void) const;
|
|
1347
|
+
/// Return maximum of domain
|
|
1348
|
+
int max(void) const;
|
|
1349
|
+
/// Return median of domain (greatest element not greater than the median)
|
|
1350
|
+
int med(void) const;
|
|
1351
|
+
/// Return assigned value (only if assigned)
|
|
1352
|
+
int val(void) const;
|
|
1353
|
+
|
|
1354
|
+
/// Return size (cardinality) of domain
|
|
1355
|
+
unsigned int size(void) const;
|
|
1356
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
1357
|
+
unsigned int width(void) const;
|
|
1358
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
1359
|
+
unsigned int regret_min(void) const;
|
|
1360
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
1361
|
+
unsigned int regret_max(void) const;
|
|
1362
|
+
//@}
|
|
1363
|
+
|
|
1364
|
+
/// \name Domain tests
|
|
1365
|
+
//@{
|
|
1366
|
+
/// Test whether domain is a range
|
|
1367
|
+
bool range(void) const;
|
|
1368
|
+
/// Test whether \a n is contained in domain
|
|
1369
|
+
bool in(int n) const;
|
|
1370
|
+
/// Test whether \a n is contained in domain
|
|
1371
|
+
bool in(double n) const;
|
|
1372
|
+
//@}
|
|
1373
|
+
|
|
1374
|
+
/// \name Boolean domain tests
|
|
1375
|
+
//@{
|
|
1376
|
+
/// Test whether view is assigned to be zero
|
|
1377
|
+
bool zero(void) const;
|
|
1378
|
+
/// Test whether view is assigned to be one
|
|
1379
|
+
bool one(void) const;
|
|
1380
|
+
/// Test whether view is not yet assigned
|
|
1381
|
+
bool none(void) const;
|
|
1382
|
+
//@}
|
|
1383
|
+
|
|
1384
|
+
/// \name Boolean assignment operations
|
|
1385
|
+
//@{
|
|
1386
|
+
/// Try to assign view to one
|
|
1387
|
+
ModEvent one(Space& home);
|
|
1388
|
+
/// Try to assign view to zero
|
|
1389
|
+
ModEvent zero(Space& home);
|
|
1390
|
+
/// Assign not yet assigned view to one
|
|
1391
|
+
ModEvent one_none(Space& home);
|
|
1392
|
+
/// Assign not yet assigned view to zero
|
|
1393
|
+
ModEvent zero_none(Space& home);
|
|
1394
|
+
//@}
|
|
1395
|
+
|
|
1396
|
+
/// \name Domain update by value
|
|
1397
|
+
//@{
|
|
1398
|
+
/// Restrict domain values to be less or equal than \a n
|
|
1399
|
+
ModEvent lq(Space& home, int n);
|
|
1400
|
+
/// Restrict domain values to be less or equal than \a n
|
|
1401
|
+
ModEvent lq(Space& home, double n);
|
|
1402
|
+
|
|
1403
|
+
/// Restrict domain values to be less than \a n
|
|
1404
|
+
ModEvent le(Space& home, int n);
|
|
1405
|
+
/// Restrict domain values to be less than \a n
|
|
1406
|
+
ModEvent le(Space& home, double n);
|
|
1407
|
+
|
|
1408
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
1409
|
+
ModEvent gq(Space& home, int n);
|
|
1410
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
1411
|
+
ModEvent gq(Space& home, double n);
|
|
1412
|
+
|
|
1413
|
+
/// Restrict domain values to be greater than \a n
|
|
1414
|
+
ModEvent gr(Space& home, int n);
|
|
1415
|
+
/// Restrict domain values to be greater than \a n
|
|
1416
|
+
ModEvent gr(Space& home, double n);
|
|
1417
|
+
|
|
1418
|
+
/// Restrict domain values to be different from \a n
|
|
1419
|
+
ModEvent nq(Space& home, int n);
|
|
1420
|
+
/// Restrict domain values to be different from \a n
|
|
1421
|
+
ModEvent nq(Space& home, double n);
|
|
1422
|
+
|
|
1423
|
+
/// Restrict domain values to be equal to \a n
|
|
1424
|
+
ModEvent eq(Space& home, int n);
|
|
1425
|
+
/// Restrict domain values to be equal to \a n
|
|
1426
|
+
ModEvent eq(Space& home, double n);
|
|
1427
|
+
//@}
|
|
1428
|
+
|
|
1429
|
+
/**
|
|
1430
|
+
* \name Domain update by iterator
|
|
1431
|
+
*
|
|
1432
|
+
* Views can be both updated by range and value iterators.
|
|
1433
|
+
* Value iterators do not need to be strict in that the same value
|
|
1434
|
+
* is allowed to occur more than once in the iterated sequence.
|
|
1435
|
+
*
|
|
1436
|
+
* The argument \a depends must be true, if the iterator
|
|
1437
|
+
* passed as argument depends on the view on which the operation
|
|
1438
|
+
* is invoked. In this case, the view is only updated after the
|
|
1439
|
+
* iterator has been consumed. Otherwise, the domain might be updated
|
|
1440
|
+
* concurrently while following the iterator.
|
|
1441
|
+
*
|
|
1442
|
+
*/
|
|
1443
|
+
//@{
|
|
1444
|
+
/// Replace domain by ranges described by \a i
|
|
1445
|
+
template<class I>
|
|
1446
|
+
ModEvent narrow_r(Space& home, I& i, bool depends=true);
|
|
1447
|
+
/// Intersect domain with ranges described by \a i
|
|
1448
|
+
template<class I>
|
|
1449
|
+
ModEvent inter_r(Space& home, I& i, bool depends=true);
|
|
1450
|
+
/// Remove from domain the ranges described by \a i
|
|
1451
|
+
template<class I>
|
|
1452
|
+
ModEvent minus_r(Space& home, I& i, bool depends=true);
|
|
1453
|
+
/// Replace domain by values described by \a i
|
|
1454
|
+
template<class I>
|
|
1455
|
+
ModEvent narrow_v(Space& home, I& i, bool depends=true);
|
|
1456
|
+
/// Intersect domain with values described by \a i
|
|
1457
|
+
template<class I>
|
|
1458
|
+
ModEvent inter_v(Space& home, I& i, bool depends=true);
|
|
1459
|
+
/// Remove from domain the values described by \a i
|
|
1460
|
+
template<class I>
|
|
1461
|
+
ModEvent minus_v(Space& home, I& i, bool depends=true);
|
|
1462
|
+
//@}
|
|
1463
|
+
|
|
1464
|
+
/// \name Delta information for advisors
|
|
1465
|
+
//@{
|
|
1466
|
+
/// Return minimum value just pruned
|
|
1467
|
+
int min(const Delta& d) const;
|
|
1468
|
+
/// Return maximum value just pruned
|
|
1469
|
+
int max(const Delta& d) const;
|
|
1470
|
+
/// Test whether arbitrary values got pruned
|
|
1471
|
+
bool any(const Delta& d) const;
|
|
1472
|
+
/// Test whether a view has been assigned to zero
|
|
1473
|
+
static bool zero(const Delta& d);
|
|
1474
|
+
/// Test whether a view has been assigned to one
|
|
1475
|
+
static bool one(const Delta& d);
|
|
1476
|
+
//@}
|
|
1477
|
+
|
|
1478
|
+
/// \name View-dependent propagator support
|
|
1479
|
+
//@{
|
|
1480
|
+
/// Translate modification event \a me to modification event delta for view
|
|
1481
|
+
static ModEventDelta med(ModEvent me);
|
|
1482
|
+
//@}
|
|
1483
|
+
};
|
|
1484
|
+
|
|
1485
|
+
/**
|
|
1486
|
+
* \brief Print Boolean view
|
|
1487
|
+
* \relates Gecode::Int::BoolView
|
|
1488
|
+
*/
|
|
1489
|
+
template<class Char, class Traits>
|
|
1490
|
+
std::basic_ostream<Char,Traits>&
|
|
1491
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const BoolView& x);
|
|
1492
|
+
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
/**
|
|
1496
|
+
* \brief Negated Boolean view
|
|
1497
|
+
*
|
|
1498
|
+
* A negated Boolean view \f$n\f$ for a Boolean view \f$b\f$
|
|
1499
|
+
* provides operations such that \f$n\f$
|
|
1500
|
+
* behaves as \f$\neg b\f$.
|
|
1501
|
+
* \ingroup TaskActorIntView
|
|
1502
|
+
*/
|
|
1503
|
+
class NegBoolView : public DerivedView<BoolView> {
|
|
1504
|
+
protected:
|
|
1505
|
+
using DerivedView<BoolView>::x;
|
|
1506
|
+
public:
|
|
1507
|
+
/// \name Constructors and initialization
|
|
1508
|
+
//@{
|
|
1509
|
+
/// Default constructor
|
|
1510
|
+
NegBoolView(void);
|
|
1511
|
+
/// Initialize with Boolean view \a y
|
|
1512
|
+
explicit NegBoolView(const BoolView& y);
|
|
1513
|
+
//@}
|
|
1514
|
+
|
|
1515
|
+
/// \name Domain status access
|
|
1516
|
+
//@{
|
|
1517
|
+
/// How many bits does the status have
|
|
1518
|
+
static const int BITS = BoolView::BITS;
|
|
1519
|
+
/// Status of domain assigned to zero
|
|
1520
|
+
static const BoolStatus ZERO = BoolView::ONE;
|
|
1521
|
+
/// Status of domain assigned to one
|
|
1522
|
+
static const BoolStatus ONE = BoolView::ZERO;
|
|
1523
|
+
/// Status of domain not yet assigned
|
|
1524
|
+
static const BoolStatus NONE = BoolView::NONE;
|
|
1525
|
+
/// Return current domain status
|
|
1526
|
+
BoolStatus status(void) const;
|
|
1527
|
+
//@}
|
|
1528
|
+
|
|
1529
|
+
/// \name Boolean domain tests
|
|
1530
|
+
//@{
|
|
1531
|
+
/// Test whether view is assigned to be zero
|
|
1532
|
+
bool zero(void) const;
|
|
1533
|
+
/// Test whether view is assigned to be one
|
|
1534
|
+
bool one(void) const;
|
|
1535
|
+
/// Test whether view is not yet assigned
|
|
1536
|
+
bool none(void) const;
|
|
1537
|
+
//@}
|
|
1538
|
+
|
|
1539
|
+
/// \name Boolean assignment operations
|
|
1540
|
+
//@{
|
|
1541
|
+
/// Try to assign view to one
|
|
1542
|
+
ModEvent one(Space& home);
|
|
1543
|
+
/// Try to assign view to zero
|
|
1544
|
+
ModEvent zero(Space& home);
|
|
1545
|
+
/// Assign not yet assigned view to one
|
|
1546
|
+
ModEvent one_none(Space& home);
|
|
1547
|
+
/// Assign not yet assigned view to zero
|
|
1548
|
+
ModEvent zero_none(Space& home);
|
|
1549
|
+
//@}
|
|
1550
|
+
|
|
1551
|
+
/// \name Value access
|
|
1552
|
+
//@{
|
|
1553
|
+
/// Return minimum of domain
|
|
1554
|
+
int min(void) const;
|
|
1555
|
+
/// Return maximum of domain
|
|
1556
|
+
int max(void) const;
|
|
1557
|
+
/// Return assigned value (only if assigned)
|
|
1558
|
+
int val(void) const;
|
|
1559
|
+
//@}
|
|
1560
|
+
|
|
1561
|
+
/// \name Delta information for advisors
|
|
1562
|
+
//@{
|
|
1563
|
+
/// Return minimum value just pruned
|
|
1564
|
+
int min(const Delta& d) const;
|
|
1565
|
+
/// Return maximum value just pruned
|
|
1566
|
+
int max(const Delta& d) const;
|
|
1567
|
+
/// Test whether arbitrary values got pruned
|
|
1568
|
+
bool any(const Delta& d) const;
|
|
1569
|
+
/// Test whether a view has been assigned to zero
|
|
1570
|
+
static bool zero(const Delta& d);
|
|
1571
|
+
/// Test whether a view has been assigned to one
|
|
1572
|
+
static bool one(const Delta& d);
|
|
1573
|
+
//@}
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
/**
|
|
1577
|
+
* \brief Print negated Boolean view
|
|
1578
|
+
* \relates Gecode::Int::NegBoolView
|
|
1579
|
+
*/
|
|
1580
|
+
template<class Char, class Traits>
|
|
1581
|
+
std::basic_ostream<Char,Traits>&
|
|
1582
|
+
operator <<(std::basic_ostream<Char,Traits>& os, const NegBoolView& x);
|
|
1583
|
+
|
|
1584
|
+
}}
|
|
1585
|
+
|
|
1586
|
+
#include <gecode/int/var/int.hpp>
|
|
1587
|
+
#include <gecode/int/var/bool.hpp>
|
|
1588
|
+
|
|
1589
|
+
#include <gecode/int/view/int.hpp>
|
|
1590
|
+
|
|
1591
|
+
#include <gecode/int/view/constint.hpp>
|
|
1592
|
+
#include <gecode/int/view/zero.hpp>
|
|
1593
|
+
#include <gecode/int/view/minus.hpp>
|
|
1594
|
+
#include <gecode/int/view/offset.hpp>
|
|
1595
|
+
#include <gecode/int/view/scale.hpp>
|
|
1596
|
+
#include <gecode/int/view/cached.hpp>
|
|
1597
|
+
|
|
1598
|
+
#include <gecode/int/view/bool.hpp>
|
|
1599
|
+
|
|
1600
|
+
#include <gecode/int/view/neg-bool.hpp>
|
|
1601
|
+
|
|
1602
|
+
#include <gecode/int/view/print.hpp>
|
|
1603
|
+
#include <gecode/int/var/print.hpp>
|
|
1604
|
+
|
|
1605
|
+
namespace Gecode { namespace Int {
|
|
1606
|
+
|
|
1607
|
+
/**
|
|
1608
|
+
* \defgroup TaskActorIntTest Testing relations between integer views
|
|
1609
|
+
* \ingroup TaskActorInt
|
|
1610
|
+
*/
|
|
1611
|
+
|
|
1612
|
+
//@{
|
|
1613
|
+
/// Result of testing relation
|
|
1614
|
+
enum RelTest {
|
|
1615
|
+
RT_FALSE = 0, ///< Relation does not hold
|
|
1616
|
+
RT_MAYBE = 1, ///< Relation may hold or not
|
|
1617
|
+
RT_TRUE = 2 ///< Relation does hold
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
/// Test whether views \a x and \a y are equal (use bounds information)
|
|
1621
|
+
template<class View> RelTest rtest_eq_bnd(View x, View y);
|
|
1622
|
+
/// Test whether views \a x and \a y are equal (use full domain information)
|
|
1623
|
+
template<class View> RelTest rtest_eq_dom(View x, View y);
|
|
1624
|
+
/// Test whether view \a x and integer \a n are equal (use bounds information)
|
|
1625
|
+
template<class View> RelTest rtest_eq_bnd(View x, int n);
|
|
1626
|
+
/// Test whether view \a x and integer \a n are equal (use full domain information)
|
|
1627
|
+
template<class View> RelTest rtest_eq_dom(View x, int n);
|
|
1628
|
+
|
|
1629
|
+
/// Test whether views \a x and \a y are different (use bounds information)
|
|
1630
|
+
template<class View> RelTest rtest_nq_bnd(View x, View y);
|
|
1631
|
+
/// Test whether views \a x and \a y are different (use full domain information)
|
|
1632
|
+
template<class View> RelTest rtest_nq_dom(View x, View y);
|
|
1633
|
+
/// Test whether view \a x and integer \a n are different (use bounds information)
|
|
1634
|
+
template<class View> RelTest rtest_nq_bnd(View x, int n);
|
|
1635
|
+
/// Test whether view \a x and integer \a n are different (use full domain information)
|
|
1636
|
+
template<class View> RelTest rtest_nq_dom(View x, int n);
|
|
1637
|
+
|
|
1638
|
+
/// Test whether view \a x is less or equal than view \a y
|
|
1639
|
+
template<class View> RelTest rtest_lq(View x, View y);
|
|
1640
|
+
/// Test whether view \a x is less or equal than integer \a n
|
|
1641
|
+
template<class View> RelTest rtest_lq(View x, int n);
|
|
1642
|
+
|
|
1643
|
+
/// Test whether view \a x is less than view \a y
|
|
1644
|
+
template<class View> RelTest rtest_le(View x, View y);
|
|
1645
|
+
/// Test whether view \a x is less than integer \a n
|
|
1646
|
+
template<class View> RelTest rtest_le(View x, int n);
|
|
1647
|
+
|
|
1648
|
+
/// Test whether view \a x is greater or equal than view \a y
|
|
1649
|
+
template<class View> RelTest rtest_gq(View x, View y);
|
|
1650
|
+
/// Test whether view \a x is greater or equal than integer \a n
|
|
1651
|
+
template<class View> RelTest rtest_gq(View x, int n);
|
|
1652
|
+
|
|
1653
|
+
/// Test whether view \a x is greater than view \a y
|
|
1654
|
+
template<class View> RelTest rtest_gr(View x, View y);
|
|
1655
|
+
/// Test whether view \a x is greater than integer \a n
|
|
1656
|
+
template<class View> RelTest rtest_gr(View x, int n);
|
|
1657
|
+
//@}
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* \brief Boolean tests
|
|
1662
|
+
*
|
|
1663
|
+
*/
|
|
1664
|
+
enum BoolTest {
|
|
1665
|
+
BT_NONE, ///< No sharing
|
|
1666
|
+
BT_SAME, ///< Same variable
|
|
1667
|
+
BT_COMP ///< Same variable but complement
|
|
1668
|
+
};
|
|
1669
|
+
|
|
1670
|
+
/**
|
|
1671
|
+
* \name Test sharing between Boolean and negated Boolean views
|
|
1672
|
+
* \relates BoolView NegBoolView
|
|
1673
|
+
*/
|
|
1674
|
+
//@{
|
|
1675
|
+
/// Test whether views \a b0 and \a b1 are the same
|
|
1676
|
+
BoolTest bool_test(const BoolView& b0, const BoolView& b1);
|
|
1677
|
+
/// Test whether views \a b0 and \a b1 are complementary
|
|
1678
|
+
BoolTest bool_test(const BoolView& b0, const NegBoolView& b1);
|
|
1679
|
+
/// Test whether views \a b0 and \a b1 are complementary
|
|
1680
|
+
BoolTest bool_test(const NegBoolView& b0, const BoolView& b1);
|
|
1681
|
+
/// Test whether views \a b0 and \a b1 are the same
|
|
1682
|
+
BoolTest bool_test(const NegBoolView& b0, const NegBoolView& b1);
|
|
1683
|
+
//@}
|
|
1684
|
+
|
|
1685
|
+
}}
|
|
1686
|
+
|
|
1687
|
+
#include <gecode/int/view/rel-test.hpp>
|
|
1688
|
+
#include <gecode/int/view/bool-test.hpp>
|
|
1689
|
+
|
|
1690
|
+
// STATISTICS: int-var
|