The actual model
| 70 | }; |
| 71 | /// The actual model |
| 72 | MagicSequence(const SizeOptions& opt) |
| 73 | : Script(opt), n(opt.size()), s(*this,n,0,n-1) { |
| 74 | switch (opt.propagation()) { |
| 75 | case PROP_COUNT: |
| 76 | for (int i=n; i--; ) |
| 77 | count(*this, s, i, IRT_EQ, s[i]); |
| 78 | linear(*this, s, IRT_EQ, n); |
| 79 | break; |
| 80 | case PROP_GCC: |
| 81 | count(*this, s, s, opt.ipl()); |
| 82 | break; |
| 83 | } |
| 84 | linear(*this, IntArgs::create(n,-1,1), s, IRT_EQ, 0); |
| 85 | branch(*this, s, INT_VAR_NONE(), INT_VAL_MAX()); |
| 86 | } |
| 87 | |
| 88 | /// Constructor for cloning \a e |
| 89 | MagicSequence(MagicSequence& e) : Script(e), n(e.n) { |
nothing calls this directly
no test coverage detected