gecoder-with-gecode 0.7.1
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.
- data/CHANGES +81 -0
- data/COPYING +17 -0
- data/LGPL-LICENSE +458 -0
- data/README +45 -0
- data/Rakefile +13 -0
- data/example/example_helper.rb +1 -0
- data/example/magic_sequence.rb +43 -0
- data/example/queens.rb +43 -0
- data/example/raw_bindings.rb +42 -0
- data/example/send_more_money.rb +43 -0
- data/example/send_most_money.rb +58 -0
- data/example/square_tiling.rb +84 -0
- data/example/sudoku-set.rb +110 -0
- data/example/sudoku.rb +61 -0
- data/ext/extconf.rb +29 -0
- data/ext/gecode-1.3.1/LICENSE +34 -0
- data/ext/gecode-1.3.1/Makefile.contribs +71 -0
- data/ext/gecode-1.3.1/Makefile.dep +3928 -0
- data/ext/gecode-1.3.1/Makefile.in +966 -0
- data/ext/gecode-1.3.1/changelog.in +1065 -0
- data/ext/gecode-1.3.1/configure +8590 -0
- data/ext/gecode-1.3.1/configure.ac +179 -0
- data/ext/gecode-1.3.1/configure.ac.in +175 -0
- data/ext/gecode-1.3.1/contribs/README +26 -0
- data/ext/gecode-1.3.1/contribs/graph/INSTALL +53 -0
- data/ext/gecode-1.3.1/contribs/graph/LICENSE +11 -0
- data/ext/gecode-1.3.1/contribs/graph/Makefile +167 -0
- data/ext/gecode-1.3.1/contribs/graph/Makefile.in.in +169 -0
- data/ext/gecode-1.3.1/contribs/graph/TODO +28 -0
- data/ext/gecode-1.3.1/contribs/graph/binarysimple.hh +82 -0
- data/ext/gecode-1.3.1/contribs/graph/binarysimple.icc +186 -0
- data/ext/gecode-1.3.1/contribs/graph/branch/branch.icc +257 -0
- data/ext/gecode-1.3.1/contribs/graph/configure +2160 -0
- data/ext/gecode-1.3.1/contribs/graph/configure.ac +33 -0
- data/ext/gecode-1.3.1/contribs/graph/doxygen.conf +1226 -0
- data/ext/gecode-1.3.1/contribs/graph/doxygen.hh +132 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/cpgraph-basic.cc +94 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/cpgraph-complement.cc +104 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/cpgraph-instUB.cc +105 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/cpgraph-path.cc +92 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/cpgraph-path2.cc +273 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/cpgraph-pathcost.cc +311 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/g1.txt +1 -0
- data/ext/gecode-1.3.1/contribs/graph/examples/g2.txt +1 -0
- data/ext/gecode-1.3.1/contribs/graph/graph.hh +51 -0
- data/ext/gecode-1.3.1/contribs/graph/graphutils.h +46 -0
- data/ext/gecode-1.3.1/contribs/graph/graphutils.icc +140 -0
- data/ext/gecode-1.3.1/contribs/graph/misc/doxygen/footer.html +1 -0
- data/ext/gecode-1.3.1/contribs/graph/path.hh +116 -0
- data/ext/gecode-1.3.1/contribs/graph/path.icc +64 -0
- data/ext/gecode-1.3.1/contribs/graph/path/path.icc +139 -0
- data/ext/gecode-1.3.1/contribs/graph/path/pathdegree.icc +133 -0
- data/ext/gecode-1.3.1/contribs/graph/path/pathgraphs.icc +341 -0
- data/ext/gecode-1.3.1/contribs/graph/shortdesc.ac +1 -0
- data/ext/gecode-1.3.1/contribs/graph/stlutility.icc +105 -0
- data/ext/gecode-1.3.1/contribs/graph/var.icc +106 -0
- data/ext/gecode-1.3.1/contribs/graph/view.icc +373 -0
- data/ext/gecode-1.3.1/contribs/graph/view/arcnode.cc +162 -0
- data/ext/gecode-1.3.1/contribs/graph/view/arcnode.hh +78 -0
- data/ext/gecode-1.3.1/contribs/graph/view/boundsgraphs.icc +349 -0
- data/ext/gecode-1.3.1/contribs/graph/view/constant.icc +148 -0
- data/ext/gecode-1.3.1/contribs/graph/view/iter.icc +337 -0
- data/ext/gecode-1.3.1/contribs/graph/view/nodearcsets.icc +493 -0
- data/ext/gecode-1.3.1/contribs/graph/view/nodeset.icc +60 -0
- data/ext/gecode-1.3.1/contribs/graph/view/outadjsets.icc +600 -0
- data/ext/gecode-1.3.1/contribs/graph/view/prop.icc +135 -0
- data/ext/gecode-1.3.1/contribs/map/COMPILING +68 -0
- data/ext/gecode-1.3.1/contribs/map/LICENSE +11 -0
- data/ext/gecode-1.3.1/contribs/map/Makefile.in.in +173 -0
- data/ext/gecode-1.3.1/contribs/map/configure +2285 -0
- data/ext/gecode-1.3.1/contribs/map/configure.ac +32 -0
- data/ext/gecode-1.3.1/contribs/map/constraints.hh +46 -0
- data/ext/gecode-1.3.1/contribs/map/constraints.icc +84 -0
- data/ext/gecode-1.3.1/contribs/map/doxygen.conf +1229 -0
- data/ext/gecode-1.3.1/contribs/map/doxygen.hh +33 -0
- data/ext/gecode-1.3.1/contribs/map/examples/approximateMatching.cc +199 -0
- data/ext/gecode-1.3.1/contribs/map/examples/g1.txt +1 -0
- data/ext/gecode-1.3.1/contribs/map/examples/g2.txt +1 -0
- data/ext/gecode-1.3.1/contribs/map/examples/graph-examples.tgz +0 -0
- data/ext/gecode-1.3.1/contribs/map/examples/isomorphism.cc +148 -0
- data/ext/gecode-1.3.1/contribs/map/examples/map +0 -0
- data/ext/gecode-1.3.1/contribs/map/examples/map.cc +80 -0
- data/ext/gecode-1.3.1/contribs/map/examples/subgraphmonomorphism.cc +155 -0
- data/ext/gecode-1.3.1/contribs/map/map.hh +65 -0
- data/ext/gecode-1.3.1/contribs/map/matching/mono.hh +235 -0
- data/ext/gecode-1.3.1/contribs/map/matching/mono.icc +771 -0
- data/ext/gecode-1.3.1/contribs/map/shortdesc.ac +2 -0
- data/ext/gecode-1.3.1/contribs/map/var.icc +346 -0
- data/ext/gecode-1.3.1/contribs/map/var/imp.cc +42 -0
- data/ext/gecode-1.3.1/contribs/map/var/imp.icc +436 -0
- data/ext/gecode-1.3.1/doxygen.conf.in +1225 -0
- data/ext/gecode-1.3.1/doxygen.hh.in +877 -0
- data/ext/gecode-1.3.1/examples/all-interval-sort.cc +201 -0
- data/ext/gecode-1.3.1/examples/all-interval.cc +114 -0
- data/ext/gecode-1.3.1/examples/alpha.cc +112 -0
- data/ext/gecode-1.3.1/examples/baseline.cc +71 -0
- data/ext/gecode-1.3.1/examples/bibd.cc +173 -0
- data/ext/gecode-1.3.1/examples/black-hole.cc +281 -0
- data/ext/gecode-1.3.1/examples/cars.cc +165 -0
- data/ext/gecode-1.3.1/examples/crew.cc +220 -0
- data/ext/gecode-1.3.1/examples/crowded-chess.cc +312 -0
- data/ext/gecode-1.3.1/examples/donald.cc +93 -0
- data/ext/gecode-1.3.1/examples/eq20.cc +111 -0
- data/ext/gecode-1.3.1/examples/golf.cc +242 -0
- data/ext/gecode-1.3.1/examples/golomb.cc +141 -0
- data/ext/gecode-1.3.1/examples/graph-color.cc +371 -0
- data/ext/gecode-1.3.1/examples/grocery.cc +107 -0
- data/ext/gecode-1.3.1/examples/hamming.cc +107 -0
- data/ext/gecode-1.3.1/examples/ind-set.cc +130 -0
- data/ext/gecode-1.3.1/examples/knights.cc +146 -0
- data/ext/gecode-1.3.1/examples/langfordnum.cc +244 -0
- data/ext/gecode-1.3.1/examples/magic-sequence-gcc.cc +93 -0
- data/ext/gecode-1.3.1/examples/magic-sequence.cc +108 -0
- data/ext/gecode-1.3.1/examples/magic-square.cc +120 -0
- data/ext/gecode-1.3.1/examples/money.cc +92 -0
- data/ext/gecode-1.3.1/examples/ortho-latin.cc +156 -0
- data/ext/gecode-1.3.1/examples/packing.cc +211 -0
- data/ext/gecode-1.3.1/examples/partition.cc +126 -0
- data/ext/gecode-1.3.1/examples/photo.cc +155 -0
- data/ext/gecode-1.3.1/examples/picture-puzzle.cc +481 -0
- data/ext/gecode-1.3.1/examples/queen-armies.cc +240 -0
- data/ext/gecode-1.3.1/examples/queens.cc +99 -0
- data/ext/gecode-1.3.1/examples/sports-league.cc +454 -0
- data/ext/gecode-1.3.1/examples/steiner.cc +148 -0
- data/ext/gecode-1.3.1/examples/stress-domain.cc +86 -0
- data/ext/gecode-1.3.1/examples/stress-element.cc +95 -0
- data/ext/gecode-1.3.1/examples/stress-exec.cc +74 -0
- data/ext/gecode-1.3.1/examples/stress-min.cc +84 -0
- data/ext/gecode-1.3.1/examples/stress-search.cc +72 -0
- data/ext/gecode-1.3.1/examples/sudoku-mixed.cc +282 -0
- data/ext/gecode-1.3.1/examples/sudoku-set.cc +162 -0
- data/ext/gecode-1.3.1/examples/sudoku.cc +188 -0
- data/ext/gecode-1.3.1/examples/sudoku.icc +703 -0
- data/ext/gecode-1.3.1/examples/support.cc +160 -0
- data/ext/gecode-1.3.1/examples/support.hh +98 -0
- data/ext/gecode-1.3.1/examples/support.icc +187 -0
- data/ext/gecode-1.3.1/examples/timer.cc +47 -0
- data/ext/gecode-1.3.1/examples/timer.hh +72 -0
- data/ext/gecode-1.3.1/examples/warehouses.cc +176 -0
- data/ext/gecode-1.3.1/extconf.rb +8 -0
- data/ext/gecode-1.3.1/gecode.m4 +736 -0
- data/ext/gecode-1.3.1/gecode/config.icc.in +50 -0
- data/ext/gecode-1.3.1/gecode/int.hh +1426 -0
- data/ext/gecode-1.3.1/gecode/int/arithmetic.cc +87 -0
- data/ext/gecode-1.3.1/gecode/int/arithmetic.hh +292 -0
- data/ext/gecode-1.3.1/gecode/int/arithmetic/abs.icc +213 -0
- data/ext/gecode-1.3.1/gecode/int/arithmetic/max.icc +196 -0
- data/ext/gecode-1.3.1/gecode/int/arithmetic/mult.icc +478 -0
- data/ext/gecode-1.3.1/gecode/int/array.cc +61 -0
- data/ext/gecode-1.3.1/gecode/int/array.icc +264 -0
- data/ext/gecode-1.3.1/gecode/int/bool.cc +187 -0
- data/ext/gecode-1.3.1/gecode/int/bool.hh +255 -0
- data/ext/gecode-1.3.1/gecode/int/bool/base.icc +123 -0
- data/ext/gecode-1.3.1/gecode/int/bool/eq.icc +89 -0
- data/ext/gecode-1.3.1/gecode/int/bool/eqv.icc +132 -0
- data/ext/gecode-1.3.1/gecode/int/bool/or.icc +380 -0
- data/ext/gecode-1.3.1/gecode/int/branch.cc +81 -0
- data/ext/gecode-1.3.1/gecode/int/branch.hh +444 -0
- data/ext/gecode-1.3.1/gecode/int/branch/assign.cc +83 -0
- data/ext/gecode-1.3.1/gecode/int/branch/assign.icc +76 -0
- data/ext/gecode-1.3.1/gecode/int/branch/select-val.icc +104 -0
- data/ext/gecode-1.3.1/gecode/int/branch/select-view.icc +219 -0
- data/ext/gecode-1.3.1/gecode/int/channel.cc +62 -0
- data/ext/gecode-1.3.1/gecode/int/channel.hh +144 -0
- data/ext/gecode-1.3.1/gecode/int/channel/base.icc +60 -0
- data/ext/gecode-1.3.1/gecode/int/channel/dom.icc +313 -0
- data/ext/gecode-1.3.1/gecode/int/channel/stack.icc +59 -0
- data/ext/gecode-1.3.1/gecode/int/channel/val.icc +239 -0
- data/ext/gecode-1.3.1/gecode/int/count.cc +174 -0
- data/ext/gecode-1.3.1/gecode/int/count.hh +401 -0
- data/ext/gecode-1.3.1/gecode/int/count/int.icc +495 -0
- data/ext/gecode-1.3.1/gecode/int/count/rel.icc +100 -0
- data/ext/gecode-1.3.1/gecode/int/count/view.icc +332 -0
- data/ext/gecode-1.3.1/gecode/int/cumulatives.cc +210 -0
- data/ext/gecode-1.3.1/gecode/int/cumulatives.hh +118 -0
- data/ext/gecode-1.3.1/gecode/int/cumulatives/val.icc +377 -0
- data/ext/gecode-1.3.1/gecode/int/distinct.cc +77 -0
- data/ext/gecode-1.3.1/gecode/int/distinct.hh +272 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/bilink.icc +73 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/bnd.icc +335 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/combptr.icc +62 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/dom.icc +740 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/edge.icc +96 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/node.icc +107 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/ter-dom.icc +97 -0
- data/ext/gecode-1.3.1/gecode/int/distinct/val.icc +171 -0
- data/ext/gecode-1.3.1/gecode/int/dom.cc +81 -0
- data/ext/gecode-1.3.1/gecode/int/dom.hh +101 -0
- data/ext/gecode-1.3.1/gecode/int/dom/range.icc +85 -0
- data/ext/gecode-1.3.1/gecode/int/dom/spec.icc +85 -0
- data/ext/gecode-1.3.1/gecode/int/element.cc +58 -0
- data/ext/gecode-1.3.1/gecode/int/element.hh +203 -0
- data/ext/gecode-1.3.1/gecode/int/element/int.icc +396 -0
- data/ext/gecode-1.3.1/gecode/int/element/view.icc +443 -0
- data/ext/gecode-1.3.1/gecode/int/exception.icc +137 -0
- data/ext/gecode-1.3.1/gecode/int/gcc.cc +708 -0
- data/ext/gecode-1.3.1/gecode/int/gcc.hh +338 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/bnd.icc +629 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/dom.icc +504 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/gccbndsup.icc +760 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/graphsup.icc +2375 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/lbc.icc +375 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/occur.icc +687 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/ubc.icc +236 -0
- data/ext/gecode-1.3.1/gecode/int/gcc/val.icc +373 -0
- data/ext/gecode-1.3.1/gecode/int/int-set.cc +115 -0
- data/ext/gecode-1.3.1/gecode/int/int-set.icc +151 -0
- data/ext/gecode-1.3.1/gecode/int/linear.cc +247 -0
- data/ext/gecode-1.3.1/gecode/int/linear.hh +1056 -0
- data/ext/gecode-1.3.1/gecode/int/linear/binary.icc +439 -0
- data/ext/gecode-1.3.1/gecode/int/linear/bool-int.icc +422 -0
- data/ext/gecode-1.3.1/gecode/int/linear/bool-view.icc +311 -0
- data/ext/gecode-1.3.1/gecode/int/linear/dom.icc +503 -0
- data/ext/gecode-1.3.1/gecode/int/linear/nary.icc +857 -0
- data/ext/gecode-1.3.1/gecode/int/linear/noview.icc +264 -0
- data/ext/gecode-1.3.1/gecode/int/linear/post.cc +542 -0
- data/ext/gecode-1.3.1/gecode/int/linear/ternary.icc +255 -0
- data/ext/gecode-1.3.1/gecode/int/propagator.icc +194 -0
- data/ext/gecode-1.3.1/gecode/int/regular.cc +40 -0
- data/ext/gecode-1.3.1/gecode/int/regular.hh +83 -0
- data/ext/gecode-1.3.1/gecode/int/regular/dfa.cc +466 -0
- data/ext/gecode-1.3.1/gecode/int/regular/dfa.icc +172 -0
- data/ext/gecode-1.3.1/gecode/int/regular/dom.icc +480 -0
- data/ext/gecode-1.3.1/gecode/int/regular/reg.cc +738 -0
- data/ext/gecode-1.3.1/gecode/int/rel.cc +293 -0
- data/ext/gecode-1.3.1/gecode/int/rel.hh +526 -0
- data/ext/gecode-1.3.1/gecode/int/rel/eq.icc +640 -0
- data/ext/gecode-1.3.1/gecode/int/rel/lex.icc +212 -0
- data/ext/gecode-1.3.1/gecode/int/rel/lq-le.icc +246 -0
- data/ext/gecode-1.3.1/gecode/int/rel/nq.icc +188 -0
- data/ext/gecode-1.3.1/gecode/int/sortedness.cc +124 -0
- data/ext/gecode-1.3.1/gecode/int/sortedness.hh +108 -0
- data/ext/gecode-1.3.1/gecode/int/sortedness/matching.icc +177 -0
- data/ext/gecode-1.3.1/gecode/int/sortedness/narrowing.icc +243 -0
- data/ext/gecode-1.3.1/gecode/int/sortedness/order.icc +232 -0
- data/ext/gecode-1.3.1/gecode/int/sortedness/sortedness.icc +727 -0
- data/ext/gecode-1.3.1/gecode/int/sortedness/sortsup.icc +666 -0
- data/ext/gecode-1.3.1/gecode/int/var-imp.vis +198 -0
- data/ext/gecode-1.3.1/gecode/int/var.icc +590 -0
- data/ext/gecode-1.3.1/gecode/int/var/bool.icc +52 -0
- data/ext/gecode-1.3.1/gecode/int/var/imp-body.icc +65 -0
- data/ext/gecode-1.3.1/gecode/int/var/imp-hdr.icc +191 -0
- data/ext/gecode-1.3.1/gecode/int/var/imp.cc +361 -0
- data/ext/gecode-1.3.1/gecode/int/var/imp.icc +579 -0
- data/ext/gecode-1.3.1/gecode/int/var/int.cc +63 -0
- data/ext/gecode-1.3.1/gecode/int/var/int.icc +135 -0
- data/ext/gecode-1.3.1/gecode/int/view.icc +1219 -0
- data/ext/gecode-1.3.1/gecode/int/view/bool.icc +270 -0
- data/ext/gecode-1.3.1/gecode/int/view/constint.icc +306 -0
- data/ext/gecode-1.3.1/gecode/int/view/int.icc +221 -0
- data/ext/gecode-1.3.1/gecode/int/view/iter.icc +49 -0
- data/ext/gecode-1.3.1/gecode/int/view/minus.icc +285 -0
- data/ext/gecode-1.3.1/gecode/int/view/offset.icc +274 -0
- data/ext/gecode-1.3.1/gecode/int/view/print.cc +109 -0
- data/ext/gecode-1.3.1/gecode/int/view/rtest.icc +215 -0
- data/ext/gecode-1.3.1/gecode/int/view/scale.icc +373 -0
- data/ext/gecode-1.3.1/gecode/iter.hh +65 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-add.icc +130 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-append.icc +208 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-array.icc +123 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-cache.icc +143 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-compl.icc +206 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-diff.icc +127 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-empty.icc +96 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-inter.icc +202 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-minmax.icc +103 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-minus.icc +138 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-offset.icc +112 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-operations.icc +142 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-scale.icc +224 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-singleton.icc +71 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-size.icc +131 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-union.icc +211 -0
- data/ext/gecode-1.3.1/gecode/iter/ranges-values.icc +125 -0
- data/ext/gecode-1.3.1/gecode/iter/values-ranges.icc +91 -0
- data/ext/gecode-1.3.1/gecode/iter/virtual-ranges-compl.icc +247 -0
- data/ext/gecode-1.3.1/gecode/iter/virtual-ranges-inter.icc +227 -0
- data/ext/gecode-1.3.1/gecode/iter/virtual-ranges-union.icc +236 -0
- data/ext/gecode-1.3.1/gecode/iter/virtual-ranges.icc +126 -0
- data/ext/gecode-1.3.1/gecode/kernel.hh +141 -0
- data/ext/gecode-1.3.1/gecode/kernel/array.icc +954 -0
- data/ext/gecode-1.3.1/gecode/kernel/branching.icc +233 -0
- data/ext/gecode-1.3.1/gecode/kernel/core.cc +417 -0
- data/ext/gecode-1.3.1/gecode/kernel/core.icc +1681 -0
- data/ext/gecode-1.3.1/gecode/kernel/exception.cc +49 -0
- data/ext/gecode-1.3.1/gecode/kernel/exception.icc +104 -0
- data/ext/gecode-1.3.1/gecode/kernel/macros.icc +98 -0
- data/ext/gecode-1.3.1/gecode/kernel/memory-manager.cc +41 -0
- data/ext/gecode-1.3.1/gecode/kernel/memory-manager.icc +438 -0
- data/ext/gecode-1.3.1/gecode/kernel/memory.icc +205 -0
- data/ext/gecode-1.3.1/gecode/kernel/modevent.icc +53 -0
- data/ext/gecode-1.3.1/gecode/kernel/propagator.icc +680 -0
- data/ext/gecode-1.3.1/gecode/kernel/view.icc +583 -0
- data/ext/gecode-1.3.1/gecode/limits.hh +87 -0
- data/ext/gecode-1.3.1/gecode/minimodel.hh +942 -0
- data/ext/gecode-1.3.1/gecode/minimodel/arithmetic.cc +137 -0
- data/ext/gecode-1.3.1/gecode/minimodel/bool-expr.cc +207 -0
- data/ext/gecode-1.3.1/gecode/minimodel/bool-expr.icc +191 -0
- data/ext/gecode-1.3.1/gecode/minimodel/bool-rel.icc +66 -0
- data/ext/gecode-1.3.1/gecode/minimodel/exception.icc +59 -0
- data/ext/gecode-1.3.1/gecode/minimodel/lin-expr.cc +103 -0
- data/ext/gecode-1.3.1/gecode/minimodel/lin-expr.icc +192 -0
- data/ext/gecode-1.3.1/gecode/minimodel/lin-rel.icc +200 -0
- data/ext/gecode-1.3.1/gecode/minimodel/matrix.icc +118 -0
- data/ext/gecode-1.3.1/gecode/minimodel/scheduling.cc +241 -0
- data/ext/gecode-1.3.1/gecode/search.hh +745 -0
- data/ext/gecode-1.3.1/gecode/search/bab.cc +153 -0
- data/ext/gecode-1.3.1/gecode/search/bab.icc +101 -0
- data/ext/gecode-1.3.1/gecode/search/dfs.cc +63 -0
- data/ext/gecode-1.3.1/gecode/search/dfs.icc +144 -0
- data/ext/gecode-1.3.1/gecode/search/engine-ctrl.icc +109 -0
- data/ext/gecode-1.3.1/gecode/search/lds.cc +237 -0
- data/ext/gecode-1.3.1/gecode/search/lds.icc +57 -0
- data/ext/gecode-1.3.1/gecode/search/reco-stack.icc +219 -0
- data/ext/gecode-1.3.1/gecode/search/restart.icc +76 -0
- data/ext/gecode-1.3.1/gecode/search/statistics.icc +30 -0
- data/ext/gecode-1.3.1/gecode/search/stop.cc +58 -0
- data/ext/gecode-1.3.1/gecode/search/stop.icc +100 -0
- data/ext/gecode-1.3.1/gecode/set.hh +419 -0
- data/ext/gecode-1.3.1/gecode/set/array.cc +114 -0
- data/ext/gecode-1.3.1/gecode/set/array.icc +134 -0
- data/ext/gecode-1.3.1/gecode/set/branch.cc +57 -0
- data/ext/gecode-1.3.1/gecode/set/branch.hh +176 -0
- data/ext/gecode-1.3.1/gecode/set/branch/select-val.icc +72 -0
- data/ext/gecode-1.3.1/gecode/set/branch/select-view.icc +112 -0
- data/ext/gecode-1.3.1/gecode/set/cardinality.cc +49 -0
- data/ext/gecode-1.3.1/gecode/set/convex.cc +43 -0
- data/ext/gecode-1.3.1/gecode/set/convex.hh +92 -0
- data/ext/gecode-1.3.1/gecode/set/convex/conv.cc +81 -0
- data/ext/gecode-1.3.1/gecode/set/convex/conv.icc +51 -0
- data/ext/gecode-1.3.1/gecode/set/convex/hull.cc +100 -0
- data/ext/gecode-1.3.1/gecode/set/convex/hull.icc +52 -0
- data/ext/gecode-1.3.1/gecode/set/distinct.cc +48 -0
- data/ext/gecode-1.3.1/gecode/set/distinct.hh +97 -0
- data/ext/gecode-1.3.1/gecode/set/distinct/atmostOne.cc +151 -0
- data/ext/gecode-1.3.1/gecode/set/distinct/atmostOne.icc +50 -0
- data/ext/gecode-1.3.1/gecode/set/distinct/binomial.cc +46 -0
- data/ext/gecode-1.3.1/gecode/set/distinct/binomial.icc +157 -0
- data/ext/gecode-1.3.1/gecode/set/distinct/distinct.cc +124 -0
- data/ext/gecode-1.3.1/gecode/set/distinct/distinct.icc +58 -0
- data/ext/gecode-1.3.1/gecode/set/dom.cc +224 -0
- data/ext/gecode-1.3.1/gecode/set/exception.icc +132 -0
- data/ext/gecode-1.3.1/gecode/set/int.cc +139 -0
- data/ext/gecode-1.3.1/gecode/set/int.hh +226 -0
- data/ext/gecode-1.3.1/gecode/set/int/card.cc +61 -0
- data/ext/gecode-1.3.1/gecode/set/int/card.icc +54 -0
- data/ext/gecode-1.3.1/gecode/set/int/channel.cc +100 -0
- data/ext/gecode-1.3.1/gecode/set/int/channel.icc +75 -0
- data/ext/gecode-1.3.1/gecode/set/int/match.cc +148 -0
- data/ext/gecode-1.3.1/gecode/set/int/match.icc +67 -0
- data/ext/gecode-1.3.1/gecode/set/int/minmax.cc +109 -0
- data/ext/gecode-1.3.1/gecode/set/int/minmax.icc +63 -0
- data/ext/gecode-1.3.1/gecode/set/int/weights.cc +182 -0
- data/ext/gecode-1.3.1/gecode/set/int/weights.icc +174 -0
- data/ext/gecode-1.3.1/gecode/set/projectors-compiler.hh +148 -0
- data/ext/gecode-1.3.1/gecode/set/projectors.cc +109 -0
- data/ext/gecode-1.3.1/gecode/set/projectors.hh +319 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/compiler.cc +841 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/projector-set.cc +69 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/projector-set.icc +66 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/projector.cc +125 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/projector.icc +79 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/propagator.hh +127 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/propagator/card.icc +96 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/propagator/nary.icc +106 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/propagator/re-nary.cc +76 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/propagator/re-nary.icc +53 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/set-expr.cc +306 -0
- data/ext/gecode-1.3.1/gecode/set/projectors/set-expr.icc +192 -0
- data/ext/gecode-1.3.1/gecode/set/propagator.icc +96 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op-const.cc +233 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op.cc +96 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op.hh +267 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op/common.icc +528 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op/inter.icc +312 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op/partition.icc +131 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op/post.icc +198 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op/subofunion.icc +150 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op/superofinter.icc +151 -0
- data/ext/gecode-1.3.1/gecode/set/rel-op/union.icc +292 -0
- data/ext/gecode-1.3.1/gecode/set/rel.cc +201 -0
- data/ext/gecode-1.3.1/gecode/set/rel.hh +250 -0
- data/ext/gecode-1.3.1/gecode/set/rel/common.icc +109 -0
- data/ext/gecode-1.3.1/gecode/set/rel/eq.icc +101 -0
- data/ext/gecode-1.3.1/gecode/set/rel/nosubset.icc +88 -0
- data/ext/gecode-1.3.1/gecode/set/rel/nq.icc +132 -0
- data/ext/gecode-1.3.1/gecode/set/rel/re-eq.icc +142 -0
- data/ext/gecode-1.3.1/gecode/set/rel/re-subset.icc +121 -0
- data/ext/gecode-1.3.1/gecode/set/rel/subset.icc +80 -0
- data/ext/gecode-1.3.1/gecode/set/select.cc +88 -0
- data/ext/gecode-1.3.1/gecode/set/select.hh +113 -0
- data/ext/gecode-1.3.1/gecode/set/select/disjoint.cc +267 -0
- data/ext/gecode-1.3.1/gecode/set/select/disjoint.icc +59 -0
- data/ext/gecode-1.3.1/gecode/set/select/idxarray.hh +91 -0
- data/ext/gecode-1.3.1/gecode/set/select/idxarray.icc +112 -0
- data/ext/gecode-1.3.1/gecode/set/select/inter.icc +300 -0
- data/ext/gecode-1.3.1/gecode/set/sequence.cc +48 -0
- data/ext/gecode-1.3.1/gecode/set/sequence.hh +97 -0
- data/ext/gecode-1.3.1/gecode/set/sequence/common.icc +79 -0
- data/ext/gecode-1.3.1/gecode/set/sequence/seq-u.cc +83 -0
- data/ext/gecode-1.3.1/gecode/set/sequence/seq-u.icc +63 -0
- data/ext/gecode-1.3.1/gecode/set/sequence/seq.cc +61 -0
- data/ext/gecode-1.3.1/gecode/set/sequence/seq.icc +53 -0
- data/ext/gecode-1.3.1/gecode/set/var-imp.vis +205 -0
- data/ext/gecode-1.3.1/gecode/set/var.icc +1090 -0
- data/ext/gecode-1.3.1/gecode/set/var/imp-body.icc +192 -0
- data/ext/gecode-1.3.1/gecode/set/var/imp-hdr.icc +235 -0
- data/ext/gecode-1.3.1/gecode/set/var/imp.cc +127 -0
- data/ext/gecode-1.3.1/gecode/set/var/imp.icc +356 -0
- data/ext/gecode-1.3.1/gecode/set/var/integerset.cc +256 -0
- data/ext/gecode-1.3.1/gecode/set/var/integerset.icc +512 -0
- data/ext/gecode-1.3.1/gecode/set/var/iter.icc +47 -0
- data/ext/gecode-1.3.1/gecode/set/var/set.cc +99 -0
- data/ext/gecode-1.3.1/gecode/set/var/set.icc +282 -0
- data/ext/gecode-1.3.1/gecode/set/view.icc +1075 -0
- data/ext/gecode-1.3.1/gecode/set/view/complement.icc +525 -0
- data/ext/gecode-1.3.1/gecode/set/view/const.icc +651 -0
- data/ext/gecode-1.3.1/gecode/set/view/print.cc +120 -0
- data/ext/gecode-1.3.1/gecode/set/view/set.icc +217 -0
- data/ext/gecode-1.3.1/gecode/set/view/singleton.icc +348 -0
- data/ext/gecode-1.3.1/gecode/support/block-allocator.hh +152 -0
- data/ext/gecode-1.3.1/gecode/support/dynamic-array.hh +131 -0
- data/ext/gecode-1.3.1/gecode/support/dynamic-stack.hh +157 -0
- data/ext/gecode-1.3.1/gecode/support/random.hh +100 -0
- data/ext/gecode-1.3.1/gecode/support/shared-array.hh +255 -0
- data/ext/gecode-1.3.1/gecode/support/sort.hh +193 -0
- data/ext/gecode-1.3.1/gecode/support/static-pqueue.hh +240 -0
- data/ext/gecode-1.3.1/gecode/support/static-stack.hh +117 -0
- data/ext/gecode-1.3.1/install-sh +323 -0
- data/ext/gecode-1.3.1/misc/debian/Makefile.am +8 -0
- data/ext/gecode-1.3.1/misc/debian/changelog +6 -0
- data/ext/gecode-1.3.1/misc/debian/control +11 -0
- data/ext/gecode-1.3.1/misc/debian/copyright +44 -0
- data/ext/gecode-1.3.1/misc/debian/gecode.info +9 -0
- data/ext/gecode-1.3.1/misc/debian/gecode.install +2 -0
- data/ext/gecode-1.3.1/misc/debian/gecode.spec +58 -0
- data/ext/gecode-1.3.1/misc/debian/rules +81 -0
- data/ext/gecode-1.3.1/misc/doxygen/back.png +0 -0
- data/ext/gecode-1.3.1/misc/doxygen/footer.html +3 -0
- data/ext/gecode-1.3.1/misc/doxygen/gecode-logo-100.png +0 -0
- data/ext/gecode-1.3.1/misc/doxygen/header.html +46 -0
- data/ext/gecode-1.3.1/misc/doxygen/stylesheet.css +460 -0
- data/ext/gecode-1.3.1/misc/fixproperties.sh +32 -0
- data/ext/gecode-1.3.1/misc/gecode-minimodel.pc.in +12 -0
- data/ext/gecode-1.3.1/misc/gecode-search.pc.in +12 -0
- data/ext/gecode-1.3.1/misc/gecode.pc.in +12 -0
- data/ext/gecode-1.3.1/misc/genchangelog.perl +190 -0
- data/ext/gecode-1.3.1/misc/genlicense.perl +113 -0
- data/ext/gecode-1.3.1/misc/genstatistics.perl +155 -0
- data/ext/gecode-1.3.1/misc/gentxtchangelog.perl +170 -0
- data/ext/gecode-1.3.1/misc/genvarimp.perl +666 -0
- data/ext/gecode-1.3.1/misc/getrevision.perl +32 -0
- data/ext/gecode-1.3.1/misc/makedepend.perl +66 -0
- data/ext/gecode-1.3.1/test/int.cc +497 -0
- data/ext/gecode-1.3.1/test/int.hh +119 -0
- data/ext/gecode-1.3.1/test/int/arithmetic.cc +262 -0
- data/ext/gecode-1.3.1/test/int/basic.cc +42 -0
- data/ext/gecode-1.3.1/test/int/bool.cc +189 -0
- data/ext/gecode-1.3.1/test/int/channel.cc +79 -0
- data/ext/gecode-1.3.1/test/int/count.cc +264 -0
- data/ext/gecode-1.3.1/test/int/distinct.cc +121 -0
- data/ext/gecode-1.3.1/test/int/dom.cc +69 -0
- data/ext/gecode-1.3.1/test/int/element.cc +132 -0
- data/ext/gecode-1.3.1/test/int/gcc.cc +592 -0
- data/ext/gecode-1.3.1/test/int/linear.cc +315 -0
- data/ext/gecode-1.3.1/test/int/minimodel.cc +451 -0
- data/ext/gecode-1.3.1/test/int/regular.cc +105 -0
- data/ext/gecode-1.3.1/test/int/rel.cc +283 -0
- data/ext/gecode-1.3.1/test/int/scheduling.cc +259 -0
- data/ext/gecode-1.3.1/test/int/sortedness.cc +272 -0
- data/ext/gecode-1.3.1/test/intset.cc +40 -0
- data/ext/gecode-1.3.1/test/log.cc +515 -0
- data/ext/gecode-1.3.1/test/log.hh +68 -0
- data/ext/gecode-1.3.1/test/set.cc +542 -0
- data/ext/gecode-1.3.1/test/set.hh +152 -0
- data/ext/gecode-1.3.1/test/set/convex.cc +94 -0
- data/ext/gecode-1.3.1/test/set/distinct.cc +148 -0
- data/ext/gecode-1.3.1/test/set/dom.cc +67 -0
- data/ext/gecode-1.3.1/test/set/int.cc +249 -0
- data/ext/gecode-1.3.1/test/set/projection.cc +333 -0
- data/ext/gecode-1.3.1/test/set/rel-op.cc +662 -0
- data/ext/gecode-1.3.1/test/set/rel.cc +198 -0
- data/ext/gecode-1.3.1/test/set/select.cc +108 -0
- data/ext/gecode-1.3.1/test/set/sequence.cc +83 -0
- data/ext/gecode-1.3.1/test/stress.cc +93 -0
- data/ext/gecode-1.3.1/test/stress.hh +74 -0
- data/ext/gecode-1.3.1/test/stress/distinct.cc +70 -0
- data/ext/gecode-1.3.1/test/stress/domain.cc +69 -0
- data/ext/gecode-1.3.1/test/stress/exec.cc +60 -0
- data/ext/gecode-1.3.1/test/stress/minsort.cc +63 -0
- data/ext/gecode-1.3.1/test/stress/regular.cc +112 -0
- data/ext/gecode-1.3.1/test/test.cc +215 -0
- data/ext/gecode-1.3.1/test/test.hh +107 -0
- data/ext/missing.cpp +328 -0
- data/ext/missing.h +120 -0
- data/ext/vararray.cpp +330 -0
- data/ext/vararray.h +149 -0
- data/lib/gecoder.rb +5 -0
- data/lib/gecoder/bindings.rb +34 -0
- data/lib/gecoder/bindings/bindings.rb +2209 -0
- data/lib/gecoder/interface.rb +8 -0
- data/lib/gecoder/interface/binding_changes.rb +313 -0
- data/lib/gecoder/interface/branch.rb +152 -0
- data/lib/gecoder/interface/constraints.rb +397 -0
- data/lib/gecoder/interface/constraints/bool/boolean.rb +246 -0
- data/lib/gecoder/interface/constraints/bool/linear.rb +29 -0
- data/lib/gecoder/interface/constraints/bool_enum/boolean.rb +84 -0
- data/lib/gecoder/interface/constraints/bool_enum_constraints.rb +8 -0
- data/lib/gecoder/interface/constraints/bool_var_constraints.rb +75 -0
- data/lib/gecoder/interface/constraints/int/arithmetic.rb +71 -0
- data/lib/gecoder/interface/constraints/int/domain.rb +78 -0
- data/lib/gecoder/interface/constraints/int/linear.rb +295 -0
- data/lib/gecoder/interface/constraints/int_enum/arithmetic.rb +72 -0
- data/lib/gecoder/interface/constraints/int_enum/channel.rb +100 -0
- data/lib/gecoder/interface/constraints/int_enum/count.rb +92 -0
- data/lib/gecoder/interface/constraints/int_enum/distinct.rb +69 -0
- data/lib/gecoder/interface/constraints/int_enum/element.rb +82 -0
- data/lib/gecoder/interface/constraints/int_enum/equality.rb +38 -0
- data/lib/gecoder/interface/constraints/int_enum/sort.rb +126 -0
- data/lib/gecoder/interface/constraints/int_enum_constraints.rb +37 -0
- data/lib/gecoder/interface/constraints/int_var_constraints.rb +58 -0
- data/lib/gecoder/interface/constraints/reifiable_constraints.rb +78 -0
- data/lib/gecoder/interface/constraints/set/cardinality.rb +75 -0
- data/lib/gecoder/interface/constraints/set/connection.rb +193 -0
- data/lib/gecoder/interface/constraints/set/domain.rb +109 -0
- data/lib/gecoder/interface/constraints/set/operation.rb +132 -0
- data/lib/gecoder/interface/constraints/set/relation.rb +178 -0
- data/lib/gecoder/interface/constraints/set_enum/channel.rb +18 -0
- data/lib/gecoder/interface/constraints/set_enum/distinct.rb +80 -0
- data/lib/gecoder/interface/constraints/set_enum/operation.rb +60 -0
- data/lib/gecoder/interface/constraints/set_enum/selection.rb +217 -0
- data/lib/gecoder/interface/constraints/set_enum_constraints.rb +34 -0
- data/lib/gecoder/interface/constraints/set_var_constraints.rb +72 -0
- data/lib/gecoder/interface/enum_matrix.rb +64 -0
- data/lib/gecoder/interface/enum_wrapper.rb +153 -0
- data/lib/gecoder/interface/model.rb +251 -0
- data/lib/gecoder/interface/search.rb +123 -0
- data/lib/gecoder/interface/variables.rb +254 -0
- data/lib/gecoder/version.rb +4 -0
- data/specs/binding_changes.rb +76 -0
- data/specs/bool_var.rb +74 -0
- data/specs/branch.rb +170 -0
- data/specs/constraints/arithmetic.rb +266 -0
- data/specs/constraints/bool_enum.rb +140 -0
- data/specs/constraints/boolean.rb +232 -0
- data/specs/constraints/cardinality.rb +154 -0
- data/specs/constraints/channel.rb +126 -0
- data/specs/constraints/connection.rb +373 -0
- data/specs/constraints/constraint_helper.rb +180 -0
- data/specs/constraints/constraints.rb +74 -0
- data/specs/constraints/count.rb +139 -0
- data/specs/constraints/distinct.rb +218 -0
- data/specs/constraints/element.rb +106 -0
- data/specs/constraints/equality.rb +31 -0
- data/specs/constraints/int_domain.rb +69 -0
- data/specs/constraints/int_relation.rb +78 -0
- data/specs/constraints/linear.rb +332 -0
- data/specs/constraints/reification_sugar.rb +96 -0
- data/specs/constraints/selection.rb +292 -0
- data/specs/constraints/set_domain.rb +181 -0
- data/specs/constraints/set_operation.rb +285 -0
- data/specs/constraints/set_relation.rb +201 -0
- data/specs/constraints/sort.rb +175 -0
- data/specs/enum_matrix.rb +43 -0
- data/specs/enum_wrapper.rb +122 -0
- data/specs/int_var.rb +144 -0
- data/specs/logging.rb +24 -0
- data/specs/model.rb +190 -0
- data/specs/search.rb +246 -0
- data/specs/set_var.rb +68 -0
- data/specs/spec_helper.rb +93 -0
- data/tasks/all_tasks.rb +1 -0
- data/tasks/distribution.rake +129 -0
- data/tasks/rcov.rake +17 -0
- data/tasks/specs.rake +15 -0
- data/tasks/svn.rake +11 -0
- data/tasks/website.rake +51 -0
- data/vendor/rust/README +28 -0
- data/vendor/rust/bin/cxxgenerator.rb +93 -0
- data/vendor/rust/include/rust_checks.hh +115 -0
- data/vendor/rust/include/rust_conversions.hh +102 -0
- data/vendor/rust/rust.rb +67 -0
- data/vendor/rust/rust/attribute.rb +51 -0
- data/vendor/rust/rust/bindings.rb +172 -0
- data/vendor/rust/rust/class.rb +339 -0
- data/vendor/rust/rust/constants.rb +48 -0
- data/vendor/rust/rust/container.rb +110 -0
- data/vendor/rust/rust/cppifaceparser.rb +129 -0
- data/vendor/rust/rust/cwrapper.rb +72 -0
- data/vendor/rust/rust/cxxclass.rb +98 -0
- data/vendor/rust/rust/element.rb +81 -0
- data/vendor/rust/rust/enum.rb +63 -0
- data/vendor/rust/rust/function.rb +407 -0
- data/vendor/rust/rust/namespace.rb +61 -0
- data/vendor/rust/rust/templates/AttributeDefinition.rusttpl +17 -0
- data/vendor/rust/rust/templates/AttributeInitBinding.rusttpl +9 -0
- data/vendor/rust/rust/templates/BindingsHeader.rusttpl +24 -0
- data/vendor/rust/rust/templates/BindingsUnit.rusttpl +46 -0
- data/vendor/rust/rust/templates/CWrapperClassDefinitions.rusttpl +64 -0
- data/vendor/rust/rust/templates/ClassDeclarations.rusttpl +7 -0
- data/vendor/rust/rust/templates/ClassInitialize.rusttpl +6 -0
- data/vendor/rust/rust/templates/ConstructorStub.rusttpl +21 -0
- data/vendor/rust/rust/templates/CxxClassDefinitions.rusttpl +91 -0
- data/vendor/rust/rust/templates/CxxMethodStub.rusttpl +12 -0
- data/vendor/rust/rust/templates/CxxStandaloneClassDefinitions.rusttpl +26 -0
- data/vendor/rust/rust/templates/EnumDeclarations.rusttpl +3 -0
- data/vendor/rust/rust/templates/EnumDefinitions.rusttpl +29 -0
- data/vendor/rust/rust/templates/FunctionDefinition.rusttpl +9 -0
- data/vendor/rust/rust/templates/FunctionInitAlias.rusttpl +5 -0
- data/vendor/rust/rust/templates/FunctionInitBinding.rusttpl +9 -0
- data/vendor/rust/rust/templates/MethodInitBinding.rusttpl +9 -0
- data/vendor/rust/rust/templates/ModuleDeclarations.rusttpl +3 -0
- data/vendor/rust/rust/templates/ModuleDefinitions.rusttpl +3 -0
- data/vendor/rust/rust/templates/StandaloneClassDeclarations.rusttpl +7 -0
- data/vendor/rust/rust/templates/VariableFunctionCall.rusttpl +14 -0
- data/vendor/rust/rust/type.rb +98 -0
- data/vendor/rust/test/Makefile +4 -0
- data/vendor/rust/test/constants.rb +36 -0
- data/vendor/rust/test/cppclass.cc +45 -0
- data/vendor/rust/test/cppclass.hh +67 -0
- data/vendor/rust/test/cppclass.rb +59 -0
- data/vendor/rust/test/cwrapper.c +74 -0
- data/vendor/rust/test/cwrapper.h +41 -0
- data/vendor/rust/test/cwrapper.rb +56 -0
- data/vendor/rust/test/dummyclass.hh +31 -0
- data/vendor/rust/test/lib/extension-test.rb +98 -0
- data/vendor/rust/test/operators.cc +41 -0
- data/vendor/rust/test/operators.hh +39 -0
- data/vendor/rust/test/operators.rb +39 -0
- data/vendor/rust/test/test-constants.rb +43 -0
- data/vendor/rust/test/test-cppclass.rb +82 -0
- data/vendor/rust/test/test-cwrapper.rb +80 -0
- data/vendor/rust/test/test-operators.rb +42 -0
- metadata +826 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Main authors:
|
|
3
|
+
* Patrick Pekczynski <pekczynski@ps.uni-sb.de>
|
|
4
|
+
*
|
|
5
|
+
* Copyright:
|
|
6
|
+
* Patrick Pekczynski, 2004
|
|
7
|
+
*
|
|
8
|
+
* Last modified:
|
|
9
|
+
* $Date: 2006-08-04 16:03:26 +0200 (Fri, 04 Aug 2006) $ by $Author: schulte $
|
|
10
|
+
* $Revision: 3512 $
|
|
11
|
+
*
|
|
12
|
+
* This file is part of Gecode, the generic constraint
|
|
13
|
+
* development environment:
|
|
14
|
+
* http://www.gecode.org
|
|
15
|
+
*
|
|
16
|
+
* See the file "LICENSE" for information on usage and
|
|
17
|
+
* redistribution of this file, and for a
|
|
18
|
+
* DISCLAIMER OF ALL WARRANTIES.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
namespace Gecode { namespace Int { namespace GCC {
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* \brief Lower Bounds constraint (LBC) stating
|
|
26
|
+
* \f$ \forall j \in \{0, \dots, |k|-1\}:
|
|
27
|
+
* \#\{i\in\{0, \dots, |x| - 1\} | x_i = card(k_j)\} \geq min(k_j)\f$
|
|
28
|
+
* Hence the lbc constraints the variables such that every value occurs
|
|
29
|
+
* at least as often as specified by its lower cardinality bound.
|
|
30
|
+
* \param home current space
|
|
31
|
+
* \param x the problem variables
|
|
32
|
+
* \param nb denotes number of unique bounds
|
|
33
|
+
* \param hall contains information about the hall structure of the problem
|
|
34
|
+
* (cf. HallInfo)
|
|
35
|
+
* \param rank ranking information about the variable bounds (cf. Rank)
|
|
36
|
+
* \param lps partial sum structure for the lower cardinality bounds (cf. PartialSum)
|
|
37
|
+
* \param mu permutation \f$ \mu \f$ such that
|
|
38
|
+
* \f$ \forall i\in \{0, \dots, |x|-2\}:
|
|
39
|
+
* max(x_{\mu(i)}) \leq max(x_{\mu(i+1)})\f$
|
|
40
|
+
* \param nu permutation \f$ \nu \f$ such that
|
|
41
|
+
* \f$ \forall i\in \{0, \dots, |x|-2\}:
|
|
42
|
+
* min(x_{\mu(i)}) \leq min(x_{\mu(i+1)})\f$
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
template <class View, class Card, bool shared>
|
|
46
|
+
inline ExecStatus
|
|
47
|
+
lbc(Space* home, ViewArray<View>& x, int& nb,
|
|
48
|
+
HallInfo hall[], Rank rank[],
|
|
49
|
+
PartialSum<Card>* lps,
|
|
50
|
+
int mu[], int nu[]){
|
|
51
|
+
|
|
52
|
+
ExecStatus es = ES_FIX;
|
|
53
|
+
int n = x.size();
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* Let I(S) denote the number of variables whose domain intersects
|
|
57
|
+
* the set S and C(S) the number of variables whose domain is containded
|
|
58
|
+
* in S. Let further min_cap(S) be the minimal number of variables
|
|
59
|
+
* that must be assigned to values, that is
|
|
60
|
+
* min_cap(S) is the sum over all l[i] for a value v_i that is an
|
|
61
|
+
* element of S.
|
|
62
|
+
*
|
|
63
|
+
* A failure set is a set F if
|
|
64
|
+
* I(F) < min_cap(F)
|
|
65
|
+
* An unstable set is a set U if
|
|
66
|
+
* I(U) = min_cap(U)
|
|
67
|
+
* A stable set is a set S if
|
|
68
|
+
* C(S) > min_cap(S) and S intersetcs nor
|
|
69
|
+
* any failure set nor any unstable set
|
|
70
|
+
* forall unstable and failure sets
|
|
71
|
+
*
|
|
72
|
+
* failure sets determine the satisfiability of the LBC
|
|
73
|
+
* unstable sets have to be pruned
|
|
74
|
+
* stable set do not have to be pruned
|
|
75
|
+
*
|
|
76
|
+
* hall[].ps ~ stores the unstable
|
|
77
|
+
* sets that have to be pruned
|
|
78
|
+
* hall[].s ~ stores sets that must not be pruned
|
|
79
|
+
* hall[].h ~ contains stable and unstable sets
|
|
80
|
+
* hall[].d ~ contains the difference between interval bounds, i.e.
|
|
81
|
+
* the minimal capacity of the interval
|
|
82
|
+
* hall[].t ~ contains the critical capacity pointer, pointing to the
|
|
83
|
+
* values
|
|
84
|
+
*/
|
|
85
|
+
|
|
86
|
+
// LBC lower bounds
|
|
87
|
+
|
|
88
|
+
int i = 0;
|
|
89
|
+
int j = 0;
|
|
90
|
+
int w = 0;
|
|
91
|
+
int z = 0;
|
|
92
|
+
int v = 0;
|
|
93
|
+
|
|
94
|
+
//initialization of the tree structure
|
|
95
|
+
int rightmost = nb + 1; // rightmost accesible value in bounds
|
|
96
|
+
int bsize = nb + 2;
|
|
97
|
+
w = rightmost;
|
|
98
|
+
|
|
99
|
+
// test
|
|
100
|
+
// unused but uninitialized
|
|
101
|
+
hall[0].d = 0;
|
|
102
|
+
hall[0].s = 0;
|
|
103
|
+
hall[0].ps = 0;
|
|
104
|
+
|
|
105
|
+
for (i = bsize; --i; ) { // i must not be zero
|
|
106
|
+
int pred = i - 1;
|
|
107
|
+
hall[i].s = pred;
|
|
108
|
+
hall[i].ps = pred;
|
|
109
|
+
hall[i].d = lps->sumup(hall[pred].bounds, hall[i].bounds - 1);
|
|
110
|
+
|
|
111
|
+
/* Let [hall[i].bounds,hall[i-1].bounds]=:I
|
|
112
|
+
* If the capacity is zero => min_cap(I) = 0
|
|
113
|
+
* => I cannot be a failure set
|
|
114
|
+
* => I is an unstable set
|
|
115
|
+
*/
|
|
116
|
+
if (hall[i].d == 0) {
|
|
117
|
+
hall[pred].h = w;
|
|
118
|
+
} else {
|
|
119
|
+
hall[w].h = pred;
|
|
120
|
+
w = pred;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
w = rightmost;
|
|
125
|
+
for (i = bsize; i--; ) { // i can be zero
|
|
126
|
+
hall[i].t = i - 1;
|
|
127
|
+
if (hall[i].d == 0) {
|
|
128
|
+
hall[i].t = w;
|
|
129
|
+
} else {
|
|
130
|
+
hall[w].t = i;
|
|
131
|
+
w = i;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/*
|
|
136
|
+
* The algorithm assigns to each value v in bounds
|
|
137
|
+
* empty buckets corresponding to the minimal capacity l[i] to be
|
|
138
|
+
* filled for v. (the buckets correspond to hall[].d containing the
|
|
139
|
+
* difference between the interval bounds) Processing it
|
|
140
|
+
* searches for the smallest value v in dom(x_i) that has an
|
|
141
|
+
* empty bucket, i.e. if all buckets are filled it is guaranteed
|
|
142
|
+
* that there are at least l[i] variables that will be
|
|
143
|
+
* instantiated to v. Since the buckets are initially empty,
|
|
144
|
+
* they are considered as FAILURE SETS
|
|
145
|
+
*/
|
|
146
|
+
|
|
147
|
+
for (i = 0; i < n; i++) {
|
|
148
|
+
// visit intervals in increasing max order
|
|
149
|
+
int x0 = rank[mu[i]].min;
|
|
150
|
+
int y = rank[mu[i]].max;
|
|
151
|
+
int succ = x0 + 1;
|
|
152
|
+
z = pathmax_t(hall, succ);
|
|
153
|
+
j = hall[z].t;
|
|
154
|
+
|
|
155
|
+
/*
|
|
156
|
+
* POTENTIALLY STABLE SET:
|
|
157
|
+
* z \neq succ \Leftrigharrow z>succ, i.e.
|
|
158
|
+
* min(D_{\mu(i)}) is guaranteed to occur min(K_i) times
|
|
159
|
+
* \Rightarrow [x0, min(y,z)] is potentially stable
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
if (z != succ) {
|
|
163
|
+
w = pathmax_ps(hall, succ);
|
|
164
|
+
v = hall[w].ps;
|
|
165
|
+
pathset_ps(hall, succ, w, w);
|
|
166
|
+
w = std::min(y, z);
|
|
167
|
+
pathset_ps(hall, hall[w].ps, v, w);
|
|
168
|
+
hall[w].ps = v;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/*
|
|
172
|
+
* STABLE SET:
|
|
173
|
+
* being stable implies being potentially stable, i.e.
|
|
174
|
+
* [hall[y].ps, hall[y].bounds-1] is the largest stable subset of
|
|
175
|
+
* [hall[j].bounds, hall[y].bounds-1].
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
if (hall[z].d <= lps->sumup(hall[y].bounds, hall[z].bounds - 1)) {
|
|
179
|
+
w = pathmax_s(hall, hall[y].ps);
|
|
180
|
+
pathset_s(hall, hall[y].ps, w, w);
|
|
181
|
+
// Path compression
|
|
182
|
+
v = hall[w].s;
|
|
183
|
+
pathset_s(hall, hall[y].s, v, y);
|
|
184
|
+
hall[y].s = v;
|
|
185
|
+
} else {
|
|
186
|
+
/*
|
|
187
|
+
* FAILURE SET:
|
|
188
|
+
* If the considered interval [x0,y] is neither POTENTIALLY STABLE
|
|
189
|
+
* nor STABLE there are still buckets that can be filled,
|
|
190
|
+
* therefore d can be decreased. If d equals zero the intervals
|
|
191
|
+
* minimum capacity is met and thepath can be compressed to the
|
|
192
|
+
* next value having an empty bucket.
|
|
193
|
+
* see DOMINATION in "gcc/ubc.icc"
|
|
194
|
+
*/
|
|
195
|
+
if (--hall[z].d == 0) {
|
|
196
|
+
hall[z].t = z + 1;
|
|
197
|
+
z = pathmax_t(hall, hall[z].t);
|
|
198
|
+
hall[z].t = j;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/*
|
|
202
|
+
* FINDING NEW LOWER BOUND:
|
|
203
|
+
* If the lower bound belongs to an unstable or a stable set,
|
|
204
|
+
* remind the new value we might assigned to the lower bound
|
|
205
|
+
* in case the variable doesn't belong to a stable set.
|
|
206
|
+
*/
|
|
207
|
+
if (hall[x0].h > x0) {
|
|
208
|
+
hall[i].newBound = pathmax_h(hall, x0);
|
|
209
|
+
w = hall[i].newBound;
|
|
210
|
+
pathset_h(hall, x0, w, w); // path compression
|
|
211
|
+
} else {
|
|
212
|
+
// Do not shrink the variable: take old min as new min
|
|
213
|
+
hall[i].newBound = x0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* UNSTABLE SET
|
|
217
|
+
* If an unstable set is discovered
|
|
218
|
+
* the difference between the interval bounds is equal to the
|
|
219
|
+
* number of variables whose domain intersect the interval
|
|
220
|
+
* (see ZEROTEST in "gcc/ubc.icc")
|
|
221
|
+
*/
|
|
222
|
+
// CLEARLY THIS WAS NOT STABLE == UNSTABLE
|
|
223
|
+
if (hall[z].d == lps->sumup(hall[y].bounds, hall[z].bounds - 1)) {
|
|
224
|
+
if (hall[y].h > y)
|
|
225
|
+
/*
|
|
226
|
+
* y is not the end of the potentially stable set
|
|
227
|
+
* thus ensure that the potentially stable superset is marked
|
|
228
|
+
*/
|
|
229
|
+
y = hall[y].h;
|
|
230
|
+
// Equivalent to pathmax since the path is fully compressed
|
|
231
|
+
int predj = j - 1;
|
|
232
|
+
pathset_h(hall, hall[y].h, predj, y);
|
|
233
|
+
// mark the new unstable set [j,y]
|
|
234
|
+
hall[y].h = predj;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
pathset_t(hall, succ, z, z); // path compression
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* If there is a FAILURE SET left the minimum occurences of the values
|
|
241
|
+
* are not guaranteed. In order to satisfy the LBC the last value
|
|
242
|
+
* in the stable and unstable datastructure hall[].h must point to
|
|
243
|
+
* the sentinel at the beginning of bounds.
|
|
244
|
+
*/
|
|
245
|
+
if (hall[nb].h != 0) {
|
|
246
|
+
return ES_FAILED; // no solution
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// Perform path compression over all elements in
|
|
250
|
+
// the stable interval data structure. This data
|
|
251
|
+
// structure will no longer be modified and will be
|
|
252
|
+
// accessed n or 2n times. Therefore, we can afford
|
|
253
|
+
// a linear time compression.
|
|
254
|
+
for (i = bsize; --i;) {
|
|
255
|
+
if (hall[i].s > i) {
|
|
256
|
+
hall[i].s = w;
|
|
257
|
+
} else {
|
|
258
|
+
w = i;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/*
|
|
263
|
+
* UPDATING LOWER BOUND:
|
|
264
|
+
* For all variables that are not a subset of a stable set,
|
|
265
|
+
* shrink the lower bound, i.e. forall stable sets S we have:
|
|
266
|
+
* x0 < S_min <= y <=S_max or S_min <= x0 <= S_max < y
|
|
267
|
+
* that is [x0,y] is NOT a proper subset of any stable set S
|
|
268
|
+
*/
|
|
269
|
+
for (i = n; i--; ) {
|
|
270
|
+
int x0 = rank[mu[i]].min;
|
|
271
|
+
int y = rank[mu[i]].max;
|
|
272
|
+
// update only those variables that are not contained in a stable set
|
|
273
|
+
if ((hall[x0].s <= x0) || (y > hall[x0].s)) {
|
|
274
|
+
//still have to check this out, how skipping works (consider dominated indices)
|
|
275
|
+
int m = lps->skipNonNullElementsRight(hall[hall[i].newBound].bounds);
|
|
276
|
+
ModEvent me = x[mu[i]].gq(home, m);
|
|
277
|
+
GECODE_ME_CHECK(me);
|
|
278
|
+
if (me_modified(me) && m != x[mu[i]].min()) {
|
|
279
|
+
es = ES_NOFIX;
|
|
280
|
+
}
|
|
281
|
+
if (shared && me_modified(me)) {
|
|
282
|
+
es = ES_NOFIX;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
//LBC narrow upper bounds
|
|
288
|
+
|
|
289
|
+
w = 0;
|
|
290
|
+
for (i = 0; i <= nb; i++) {
|
|
291
|
+
hall[i].d = lps->sumup(hall[i].bounds, hall[i + 1].bounds - 1);
|
|
292
|
+
if (hall[i].d == 0) {
|
|
293
|
+
hall[i].t = w;
|
|
294
|
+
} else {
|
|
295
|
+
hall[w].t = i;
|
|
296
|
+
w = i;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
hall[w].t = i;
|
|
300
|
+
|
|
301
|
+
w = 0;
|
|
302
|
+
for (i = 1; i <= nb; i++) {
|
|
303
|
+
if (hall[i - 1].d == 0) {
|
|
304
|
+
hall[i].h = w;
|
|
305
|
+
} else {
|
|
306
|
+
hall[w].h = i;
|
|
307
|
+
w = i;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
hall[w].h = i;
|
|
311
|
+
|
|
312
|
+
for (i = n; i--; ) {
|
|
313
|
+
// visit intervals in decreasing min order
|
|
314
|
+
// i.e. minsorted from right to left
|
|
315
|
+
int x0 = rank[nu[i]].max;
|
|
316
|
+
int y = rank[nu[i]].min;
|
|
317
|
+
int pred = x0 - 1; // predecessor of x0 in the indices
|
|
318
|
+
z = pathmin_t(hall, pred);
|
|
319
|
+
j = hall[z].t;
|
|
320
|
+
|
|
321
|
+
/* If the variable is not in a discovered stable set
|
|
322
|
+
* (see above condition for STABLE SET)
|
|
323
|
+
*/
|
|
324
|
+
if (hall[z].d > lps->sumup(hall[z].bounds, hall[y].bounds - 1)) {
|
|
325
|
+
//FAILURE SET
|
|
326
|
+
if (--hall[z].d == 0) {
|
|
327
|
+
hall[z].t = z - 1;
|
|
328
|
+
z = pathmin_t(hall, hall[z].t);
|
|
329
|
+
hall[z].t = j;
|
|
330
|
+
}
|
|
331
|
+
//FINDING NEW UPPER BOUND
|
|
332
|
+
if (hall[x0].h < x0) {
|
|
333
|
+
w = pathmin_h(hall, hall[x0].h);
|
|
334
|
+
hall[i].newBound = w;
|
|
335
|
+
pathset_h(hall, x0, w, w); // path compression
|
|
336
|
+
} else {
|
|
337
|
+
hall[i].newBound = x0;
|
|
338
|
+
}
|
|
339
|
+
//UNSTABLE SET
|
|
340
|
+
if (hall[z].d == lps->sumup(hall[z].bounds, hall[y].bounds - 1)) {
|
|
341
|
+
if (hall[y].h < y) {
|
|
342
|
+
y = hall[y].h;
|
|
343
|
+
}
|
|
344
|
+
int succj = j + 1;
|
|
345
|
+
//mark new unstable set [y,j]
|
|
346
|
+
pathset_h(hall, hall[y].h, succj, y);
|
|
347
|
+
hall[y].h = succj;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
pathset_t(hall, pred, z, z);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// UPDATING UPPER BOUND
|
|
354
|
+
for (i = n; i--; ) {
|
|
355
|
+
int x0 = rank[nu[i]].min;
|
|
356
|
+
int y = rank[nu[i]].max;
|
|
357
|
+
if ((hall[x0].s <= x0) || (y > hall[x0].s)){
|
|
358
|
+
int m = lps->skipNonNullElementsLeft(hall[hall[i].newBound].bounds - 1);
|
|
359
|
+
ModEvent me = x[nu[i]].lq(home, m);
|
|
360
|
+
GECODE_ME_CHECK(me);
|
|
361
|
+
if (me_modified(me) && m != x[nu[i]].max()) {
|
|
362
|
+
es = ES_NOFIX;
|
|
363
|
+
}
|
|
364
|
+
if (shared && me_modified(me)) {
|
|
365
|
+
es = ES_NOFIX;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
return es;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
}}}
|
|
373
|
+
|
|
374
|
+
// STATISTICS: int-prop
|
|
375
|
+
|
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Main authors:
|
|
3
|
+
* Patrick Pekczynski <pekczynski@ps.uni-sb.de>
|
|
4
|
+
*
|
|
5
|
+
* Copyright:
|
|
6
|
+
* Patrick Pekczynski, 2004
|
|
7
|
+
*
|
|
8
|
+
* Last modified: $Date: 2006-08-24 11:25:05 +0200 (Thu, 24 Aug 2006) $ by $Author: schulte $
|
|
9
|
+
* $Revision: 3559 $
|
|
10
|
+
*
|
|
11
|
+
* This file is part of Gecode, the generic constrain
|
|
12
|
+
* development environment:
|
|
13
|
+
* http://www.gecode.org
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* See the file "LICENSE" for information on usage and
|
|
17
|
+
* redistribution of this file, and for a
|
|
18
|
+
* DISCLAIMER OF ALL WARRANTIES.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#include "gecode/iter.hh"
|
|
22
|
+
|
|
23
|
+
namespace Gecode { namespace Int { namespace GCC {
|
|
24
|
+
/**
|
|
25
|
+
* \brief Tuple conataining the lower and upper cardinality bounds
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
class OccurBndsView {
|
|
29
|
+
private:
|
|
30
|
+
int _min;
|
|
31
|
+
int _max;
|
|
32
|
+
int c;
|
|
33
|
+
int count;
|
|
34
|
+
public:
|
|
35
|
+
OccurBndsView(void);
|
|
36
|
+
int min(void) const;
|
|
37
|
+
int max(void) const;
|
|
38
|
+
int card(void) const;
|
|
39
|
+
int counter(void) const;
|
|
40
|
+
|
|
41
|
+
void min(int);
|
|
42
|
+
void max(int);
|
|
43
|
+
void card(int c);
|
|
44
|
+
void counter(int c);
|
|
45
|
+
|
|
46
|
+
void init(Space* home, int min, int max, int c);
|
|
47
|
+
ModEvent lq(Space* home, int n);
|
|
48
|
+
ModEvent gq(Space* home, int n);
|
|
49
|
+
ModEvent eq(Space* home, int n);
|
|
50
|
+
bool assigned(void) const;
|
|
51
|
+
bool modified(void) const;
|
|
52
|
+
bool range(void) const;
|
|
53
|
+
ModEvent inc(void);
|
|
54
|
+
|
|
55
|
+
void cancel(Space* home, Propagator* , PropCond ) {}
|
|
56
|
+
void subscribe(Space*, Propagator* , PropCond, bool=true) {}
|
|
57
|
+
|
|
58
|
+
void update(Space*, bool, OccurBndsView&);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
forceinline
|
|
62
|
+
OccurBndsView::OccurBndsView(void) {}
|
|
63
|
+
|
|
64
|
+
forceinline int
|
|
65
|
+
OccurBndsView::min(void) const {
|
|
66
|
+
return _min;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
forceinline int
|
|
70
|
+
OccurBndsView::max(void) const {
|
|
71
|
+
return _max;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
forceinline int
|
|
75
|
+
OccurBndsView::card(void) const {
|
|
76
|
+
return c;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
forceinline int
|
|
80
|
+
OccurBndsView::counter(void) const {
|
|
81
|
+
return count;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
forceinline void
|
|
85
|
+
OccurBndsView::min(int m) {
|
|
86
|
+
_min = m;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
forceinline void
|
|
90
|
+
OccurBndsView::max(int m) {
|
|
91
|
+
_max = m;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
forceinline void
|
|
95
|
+
OccurBndsView::card(int ca) {
|
|
96
|
+
c = ca;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
forceinline void
|
|
100
|
+
OccurBndsView::counter(int count0) {
|
|
101
|
+
count = count0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
forceinline void
|
|
105
|
+
OccurBndsView::init(Space* home, int min, int max, int val) {
|
|
106
|
+
_min = min; _max=max;
|
|
107
|
+
c = val;
|
|
108
|
+
count = 0;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
forceinline ModEvent
|
|
112
|
+
OccurBndsView::inc(void) {
|
|
113
|
+
count++;
|
|
114
|
+
if (count > _max) {
|
|
115
|
+
return ME_GEN_FAILED;
|
|
116
|
+
} else {
|
|
117
|
+
return ME_GEN_NONE;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
forceinline bool
|
|
122
|
+
OccurBndsView::assigned(void) const {
|
|
123
|
+
return _min==_max;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
forceinline bool
|
|
127
|
+
OccurBndsView::modified(void) const {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
forceinline bool
|
|
132
|
+
OccurBndsView::range(void) const {
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
forceinline ModEvent
|
|
138
|
+
OccurBndsView::lq(Space*, int i){
|
|
139
|
+
// the maximum can be made consistent
|
|
140
|
+
if (_min > i) {
|
|
141
|
+
return ME_GEN_FAILED;
|
|
142
|
+
} else {
|
|
143
|
+
return ME_GEN_NONE;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
forceinline ModEvent
|
|
148
|
+
OccurBndsView::gq(Space*, int i){
|
|
149
|
+
// this bound is fix
|
|
150
|
+
if (_max < i) {
|
|
151
|
+
return ME_GEN_FAILED;
|
|
152
|
+
}
|
|
153
|
+
return ME_GEN_NONE;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
forceinline ModEvent
|
|
157
|
+
OccurBndsView::eq(Space*, int i){
|
|
158
|
+
if (_min > i || _max < i) {
|
|
159
|
+
return ME_GEN_FAILED;
|
|
160
|
+
} else {
|
|
161
|
+
return ME_GEN_NONE;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/// \brief Debugging: print a fixed cardinality
|
|
166
|
+
forceinline std::ostream&
|
|
167
|
+
operator<<(std::ostream& os, OccurBndsView& xs) {
|
|
168
|
+
os << xs.card() << "("<< xs.counter() <<")[";
|
|
169
|
+
os << xs.min() << "," << xs.max() << "]";
|
|
170
|
+
return os;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
forceinline void
|
|
174
|
+
OccurBndsView::update(Space*, bool, OccurBndsView& oc) {
|
|
175
|
+
_min = oc._min;
|
|
176
|
+
_max = oc._max;
|
|
177
|
+
c = oc.c;
|
|
178
|
+
count = oc.count;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* \brief Return the index of v in the array
|
|
183
|
+
*
|
|
184
|
+
* Complexity is \f$O(log(|k|))\f$
|
|
185
|
+
*/
|
|
186
|
+
template <class T>
|
|
187
|
+
forceinline int
|
|
188
|
+
lookupValue(T& a, int v){
|
|
189
|
+
int idx = -1;
|
|
190
|
+
|
|
191
|
+
int l = 0;
|
|
192
|
+
int r = a.size() - 1;
|
|
193
|
+
|
|
194
|
+
if (r == 0) {
|
|
195
|
+
if (a[0].card() == v) {
|
|
196
|
+
return 0;
|
|
197
|
+
} else {
|
|
198
|
+
return -1;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
while ( l < r ) {
|
|
203
|
+
if ( a[l].card() == v) {
|
|
204
|
+
idx = l;
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
if ( a[r].card() == v) {
|
|
208
|
+
idx = r;
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
int p = (l + r) / 2;
|
|
212
|
+
if ( v == a[p].card()) {
|
|
213
|
+
idx = p;
|
|
214
|
+
break;
|
|
215
|
+
} else {
|
|
216
|
+
if ( v < a[p].card()) {
|
|
217
|
+
r = p;
|
|
218
|
+
} else {
|
|
219
|
+
l = p;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (l == r - 1) {
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return idx;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* \brief Card integer view
|
|
233
|
+
*
|
|
234
|
+
*/
|
|
235
|
+
class CardView : public DerivedViewBase<IntView> {
|
|
236
|
+
protected:
|
|
237
|
+
/// Card
|
|
238
|
+
int c;
|
|
239
|
+
/// Counter
|
|
240
|
+
int count;
|
|
241
|
+
using DerivedViewBase<IntView>::view;
|
|
242
|
+
public:
|
|
243
|
+
CardView(void);
|
|
244
|
+
/// Initialize with integer view \a x and value \a c
|
|
245
|
+
CardView(const IntView& x, int c);
|
|
246
|
+
/// Initialize with integer view \a x and value \a c
|
|
247
|
+
void init(const IntView& x, int c);
|
|
248
|
+
void init(Space* home, int mi, int ma , int c);
|
|
249
|
+
|
|
250
|
+
/// Return value
|
|
251
|
+
int card(void) const;
|
|
252
|
+
void card(int ca);
|
|
253
|
+
|
|
254
|
+
/// Increment counter
|
|
255
|
+
ModEvent inc(void);
|
|
256
|
+
/// Set the counter to the number of times value \a c occurs
|
|
257
|
+
void counter(int);
|
|
258
|
+
/// Return the number of times value \a c occurs
|
|
259
|
+
int counter(void);
|
|
260
|
+
|
|
261
|
+
/// \name Value access
|
|
262
|
+
//@{
|
|
263
|
+
void operator=(const IntView& x);
|
|
264
|
+
void operator=(const Gecode::Int::GCC::CardView& x);
|
|
265
|
+
/// Return minimum of domain
|
|
266
|
+
int min(void) const;
|
|
267
|
+
/// Return maximum of domain
|
|
268
|
+
int max(void) const;
|
|
269
|
+
/// Return median of domain
|
|
270
|
+
int med(void) const;
|
|
271
|
+
/// Return assigned value (only if assigned)
|
|
272
|
+
int val(void) const;
|
|
273
|
+
/// Return used IntView
|
|
274
|
+
IntView intview(void);
|
|
275
|
+
/// Return size (cardinality) of domain
|
|
276
|
+
unsigned int size(void) const;
|
|
277
|
+
/// Return width of domain (distance between maximum and minimum)
|
|
278
|
+
unsigned int width(void) const;
|
|
279
|
+
/// Return regret of domain minimum (distance to next larger value)
|
|
280
|
+
unsigned int regret_min(void) const;
|
|
281
|
+
/// Return regret of domain maximum (distance to next smaller value)
|
|
282
|
+
unsigned int regret_max(void) const;
|
|
283
|
+
///@}
|
|
284
|
+
|
|
285
|
+
/// \name Domain tests
|
|
286
|
+
///@{
|
|
287
|
+
/// Test whether domain is a range
|
|
288
|
+
bool range(void) const;
|
|
289
|
+
/// Test whether view is assigned
|
|
290
|
+
bool assigned(void) const;
|
|
291
|
+
|
|
292
|
+
/// Test whether \a n is contained in domain
|
|
293
|
+
bool in(int n) const;
|
|
294
|
+
/// Test whether \a n is contained in domain
|
|
295
|
+
bool in(double n) const;
|
|
296
|
+
///@}
|
|
297
|
+
|
|
298
|
+
/// \name Domain update by value
|
|
299
|
+
///@{
|
|
300
|
+
/// Restrict domain values to be less or equal than \a n
|
|
301
|
+
ModEvent lq(Space* home, int n);
|
|
302
|
+
/// Restrict domain values to be less or equal than \a n
|
|
303
|
+
ModEvent lq(Space* home, double n);
|
|
304
|
+
/// Restrict domain values to be less than \a n
|
|
305
|
+
ModEvent le(Space* home, int n);
|
|
306
|
+
/// Restrict domain values to be less than \a n
|
|
307
|
+
ModEvent le(Space* home, double n);
|
|
308
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
309
|
+
ModEvent gq(Space* home, int n);
|
|
310
|
+
/// Restrict domain values to be greater or equal than \a n
|
|
311
|
+
ModEvent gq(Space* home, double n);
|
|
312
|
+
/// Restrict domain values to be greater than \a n
|
|
313
|
+
ModEvent gr(Space* home, int n);
|
|
314
|
+
/// Restrict domain values to be greater than \a n
|
|
315
|
+
ModEvent gr(Space* home, double n);
|
|
316
|
+
/// Restrict domain values to be different from \a n
|
|
317
|
+
ModEvent nq(Space* home, int n);
|
|
318
|
+
/// Restrict domain values to be different from \a n
|
|
319
|
+
ModEvent nq(Space* home, double n);
|
|
320
|
+
/// Restrict domain values to be equal to \a n
|
|
321
|
+
ModEvent eq(Space* home, int n);
|
|
322
|
+
/// Restrict domain values to be equal to \a n
|
|
323
|
+
ModEvent eq(Space* home, double n);
|
|
324
|
+
///@}
|
|
325
|
+
|
|
326
|
+
/// \name Domain update by range iterator
|
|
327
|
+
///@{
|
|
328
|
+
/// Replace domain by range sequence described by \a i
|
|
329
|
+
/// Intersect domain with range sequence described by \a i
|
|
330
|
+
template <class I> ModEvent inter(Space* home, I& i);
|
|
331
|
+
/// Remove from domain the range sequence described by \a i
|
|
332
|
+
template <class I> ModEvent minus(Space* home, I& i);
|
|
333
|
+
///@}
|
|
334
|
+
|
|
335
|
+
/// \name Propagator modification events
|
|
336
|
+
///@{
|
|
337
|
+
/// Return modification event of propagator \a p for view
|
|
338
|
+
static ModEvent pme(const Propagator* p);
|
|
339
|
+
/// Translate modification event \a me to propagator modification event for view
|
|
340
|
+
static PropModEvent pme(ModEvent me);
|
|
341
|
+
///@}
|
|
342
|
+
|
|
343
|
+
/// \name Dependencies
|
|
344
|
+
///@{
|
|
345
|
+
/// Subscribe propagator \a p with propagation condition \a pc to view
|
|
346
|
+
void subscribe(Space* home, Propagator* p, PropCond pc, bool process=true);
|
|
347
|
+
/// Cancel subscription of propagator \a p with propagation condition \a pc to view
|
|
348
|
+
void cancel(Space* home, Propagator* p, PropCond pc);
|
|
349
|
+
///@}
|
|
350
|
+
|
|
351
|
+
/// \name Cloning
|
|
352
|
+
///@{
|
|
353
|
+
/// Update this view to be a clone of view \a x
|
|
354
|
+
void update(Space* home, bool share, CardView& x);
|
|
355
|
+
///@}
|
|
356
|
+
|
|
357
|
+
/// \name View comparison
|
|
358
|
+
///@{
|
|
359
|
+
/// Test whether this view is the same as \a x
|
|
360
|
+
bool operator ==(const CardView& x) const;
|
|
361
|
+
/// Test whether this view is not the same as \a x
|
|
362
|
+
bool operator !=(const CardView& x) const;
|
|
363
|
+
/// Test whether this view is smaller than \a x (arbitrary order)
|
|
364
|
+
bool operator < (const CardView& x) const;
|
|
365
|
+
/// Test whether this view is larger than \a x (arbitrary order)
|
|
366
|
+
bool operator > (const CardView& x) const;
|
|
367
|
+
///@}
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
/*
|
|
371
|
+
* Constructors and initialization
|
|
372
|
+
*
|
|
373
|
+
*/
|
|
374
|
+
forceinline
|
|
375
|
+
CardView::CardView(void) {}
|
|
376
|
+
|
|
377
|
+
forceinline
|
|
378
|
+
CardView::CardView(const IntView& x, int d)
|
|
379
|
+
: DerivedViewBase<IntView>(x), c(d), count(0) {}
|
|
380
|
+
|
|
381
|
+
forceinline void
|
|
382
|
+
CardView::init(const IntView& x, int d) {
|
|
383
|
+
view = x;
|
|
384
|
+
c = d;
|
|
385
|
+
count = 0;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
forceinline void
|
|
390
|
+
CardView::init(Space* home, int mi, int ma, int d) {
|
|
391
|
+
IntVar ivar(home, mi, ma);
|
|
392
|
+
IntView iview(ivar);
|
|
393
|
+
view = iview;
|
|
394
|
+
c = d;
|
|
395
|
+
count = 0;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
forceinline void
|
|
399
|
+
CardView::card(int ca) {
|
|
400
|
+
c = ca;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
forceinline int
|
|
404
|
+
CardView::card(void) const {
|
|
405
|
+
return c;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
forceinline ModEvent
|
|
409
|
+
CardView::inc(void) {
|
|
410
|
+
count++;
|
|
411
|
+
if (count > this->max()) {
|
|
412
|
+
return ME_GEN_FAILED;
|
|
413
|
+
} else {
|
|
414
|
+
return ME_GEN_NONE;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
forceinline void
|
|
419
|
+
CardView::counter(int c) {
|
|
420
|
+
count = c;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
forceinline int
|
|
424
|
+
CardView::counter(void) {
|
|
425
|
+
return count;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/*
|
|
429
|
+
* Value access
|
|
430
|
+
*
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
forceinline void
|
|
434
|
+
CardView::operator=(const IntView& x) {
|
|
435
|
+
view = x;
|
|
436
|
+
c = 0;
|
|
437
|
+
count = 0;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
forceinline void
|
|
441
|
+
CardView::operator=(const CardView& x) {
|
|
442
|
+
view = x.view;
|
|
443
|
+
c = x.c;
|
|
444
|
+
count = x.count;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
forceinline int
|
|
449
|
+
CardView::min(void) const {
|
|
450
|
+
return view.min();
|
|
451
|
+
}
|
|
452
|
+
forceinline int
|
|
453
|
+
CardView::max(void) const {
|
|
454
|
+
return view.max();
|
|
455
|
+
}
|
|
456
|
+
forceinline int
|
|
457
|
+
CardView::med(void) const {
|
|
458
|
+
return view.med();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
forceinline int
|
|
462
|
+
CardView::val(void) const {
|
|
463
|
+
return view.val();
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
forceinline IntView
|
|
467
|
+
CardView::intview(void){
|
|
468
|
+
return view;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
forceinline unsigned int
|
|
473
|
+
CardView::width(void) const {
|
|
474
|
+
return view.width();
|
|
475
|
+
}
|
|
476
|
+
forceinline unsigned int
|
|
477
|
+
CardView::size(void) const {
|
|
478
|
+
return view.size();
|
|
479
|
+
}
|
|
480
|
+
forceinline unsigned int
|
|
481
|
+
CardView::regret_min(void) const {
|
|
482
|
+
return view.regret_min();
|
|
483
|
+
}
|
|
484
|
+
forceinline unsigned int
|
|
485
|
+
CardView::regret_max(void) const {
|
|
486
|
+
return view.regret_max();
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/*
|
|
490
|
+
* Domain tests
|
|
491
|
+
*
|
|
492
|
+
*/
|
|
493
|
+
forceinline bool
|
|
494
|
+
CardView::range(void) const {
|
|
495
|
+
return view.range();
|
|
496
|
+
}
|
|
497
|
+
forceinline bool
|
|
498
|
+
CardView::assigned(void) const {
|
|
499
|
+
return view.assigned();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
forceinline bool
|
|
503
|
+
CardView::in(int n) const {
|
|
504
|
+
return view.in(n);
|
|
505
|
+
}
|
|
506
|
+
forceinline bool
|
|
507
|
+
CardView::in(double n) const {
|
|
508
|
+
return view.in(n);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
/*
|
|
513
|
+
* Domain update by value
|
|
514
|
+
*
|
|
515
|
+
*/
|
|
516
|
+
forceinline ModEvent
|
|
517
|
+
CardView::lq(Space* home, int n) {
|
|
518
|
+
return view.lq(home,n);
|
|
519
|
+
}
|
|
520
|
+
forceinline ModEvent
|
|
521
|
+
CardView::lq(Space* home, double n) {
|
|
522
|
+
return view.lq(home,n);
|
|
523
|
+
}
|
|
524
|
+
forceinline ModEvent
|
|
525
|
+
CardView::le(Space* home, int n) {
|
|
526
|
+
return view.le(home,n);
|
|
527
|
+
}
|
|
528
|
+
forceinline ModEvent
|
|
529
|
+
CardView::le(Space* home, double n) {
|
|
530
|
+
return view.le(home,n);
|
|
531
|
+
}
|
|
532
|
+
forceinline ModEvent
|
|
533
|
+
CardView::gq(Space* home, int n) {
|
|
534
|
+
return view.gq(home,n);
|
|
535
|
+
}
|
|
536
|
+
forceinline ModEvent
|
|
537
|
+
CardView::gq(Space* home, double n) {
|
|
538
|
+
return view.gq(home,n);
|
|
539
|
+
}
|
|
540
|
+
forceinline ModEvent
|
|
541
|
+
CardView::gr(Space* home, int n) {
|
|
542
|
+
return view.gr(home,n);
|
|
543
|
+
}
|
|
544
|
+
forceinline ModEvent
|
|
545
|
+
CardView::gr(Space* home, double n) {
|
|
546
|
+
return view.gr(home,n);
|
|
547
|
+
}
|
|
548
|
+
forceinline ModEvent
|
|
549
|
+
CardView::nq(Space* home, int n) {
|
|
550
|
+
return view.nq(home,n);
|
|
551
|
+
}
|
|
552
|
+
forceinline ModEvent
|
|
553
|
+
CardView::nq(Space* home, double n) {
|
|
554
|
+
return view.nq(home,n);
|
|
555
|
+
}
|
|
556
|
+
forceinline ModEvent
|
|
557
|
+
CardView::eq(Space* home, int n) {
|
|
558
|
+
return view.eq(home,n);
|
|
559
|
+
}
|
|
560
|
+
forceinline ModEvent
|
|
561
|
+
CardView::eq(Space* home, double n) {
|
|
562
|
+
return view.eq(home,n);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
/*
|
|
567
|
+
* Domain update by range iterator
|
|
568
|
+
*
|
|
569
|
+
*/
|
|
570
|
+
template <class I>
|
|
571
|
+
ModEvent
|
|
572
|
+
CardView::inter(Space* home, I& i) {
|
|
573
|
+
return view.inter(home,i);
|
|
574
|
+
}
|
|
575
|
+
template <class I>
|
|
576
|
+
ModEvent
|
|
577
|
+
CardView::minus(Space* home, I& i) {
|
|
578
|
+
return view.minus(home,i);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
/*
|
|
584
|
+
* Propagator modification events
|
|
585
|
+
*
|
|
586
|
+
*/
|
|
587
|
+
forceinline ModEvent
|
|
588
|
+
CardView::pme(const Propagator* p) {
|
|
589
|
+
return IntView::pme(p);
|
|
590
|
+
}
|
|
591
|
+
forceinline PropModEvent
|
|
592
|
+
CardView::pme(ModEvent me) {
|
|
593
|
+
return IntView::pme(me);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
/*
|
|
598
|
+
* Dependencies
|
|
599
|
+
*
|
|
600
|
+
*/
|
|
601
|
+
forceinline void
|
|
602
|
+
CardView::subscribe(Space* home, Propagator* p, PropCond pc, bool process) {
|
|
603
|
+
view.subscribe(home, p, pc, process);
|
|
604
|
+
}
|
|
605
|
+
forceinline void
|
|
606
|
+
CardView::cancel(Space* home, Propagator* p, PropCond pc) {
|
|
607
|
+
view.cancel(home,p, pc);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
/*
|
|
612
|
+
* Cloning
|
|
613
|
+
*
|
|
614
|
+
*/
|
|
615
|
+
forceinline void
|
|
616
|
+
CardView::update(Space* home, bool share, CardView& x) {
|
|
617
|
+
c = x.c;
|
|
618
|
+
count = x.count;
|
|
619
|
+
view.update(home,share,x.view);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* \brief %Range iterator for indexed problem variables
|
|
629
|
+
*/
|
|
630
|
+
template <>
|
|
631
|
+
class ViewRanges<GCC::CardView>
|
|
632
|
+
: public Gecode::Int::ViewRanges<IntView> {
|
|
633
|
+
public:
|
|
634
|
+
/// \name Constructors and initialization
|
|
635
|
+
///@{
|
|
636
|
+
/// Default constructor
|
|
637
|
+
ViewRanges(void);
|
|
638
|
+
/// Initialize with ranges for view \a x
|
|
639
|
+
ViewRanges(const GCC::CardView& x);
|
|
640
|
+
/// Initialize with ranges for view \a x
|
|
641
|
+
void init(const GCC::CardView& x);
|
|
642
|
+
///@}
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
/// \brief Debugging: print a cardinality variable
|
|
647
|
+
forceinline std::ostream&
|
|
648
|
+
operator<<(std::ostream& os, GCC::CardView& v) {
|
|
649
|
+
os << "("<<v.card() << ","<< v.counter() <<",";
|
|
650
|
+
if (v.min() == v.max()) {
|
|
651
|
+
os << v.min() <<" ";
|
|
652
|
+
} else {
|
|
653
|
+
if (v.range()){
|
|
654
|
+
os << "["<<v.min() <<".."<<v.max()<<"] ";
|
|
655
|
+
} else {
|
|
656
|
+
os << "{";
|
|
657
|
+
ViewValues<GCC::CardView> iter(v);
|
|
658
|
+
while(iter()){
|
|
659
|
+
os << iter.val() <<",";
|
|
660
|
+
++iter;
|
|
661
|
+
}
|
|
662
|
+
os << "}";
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
os << ")";
|
|
666
|
+
return os;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
forceinline
|
|
671
|
+
ViewRanges<GCC::CardView>::ViewRanges(void) :
|
|
672
|
+
Gecode::Int::ViewRanges<IntView>() {}
|
|
673
|
+
|
|
674
|
+
forceinline
|
|
675
|
+
ViewRanges<GCC::CardView>::ViewRanges (const GCC::CardView& x)
|
|
676
|
+
: Gecode::Int::ViewRanges<IntView>(x.base()) {}
|
|
677
|
+
|
|
678
|
+
forceinline void
|
|
679
|
+
ViewRanges<GCC::CardView>::init(const GCC::CardView& x) {
|
|
680
|
+
Gecode::Int::ViewRanges<IntView> xi(x.base());
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
}}
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
// STATISTICS: int-prop
|