MagicSequence Class Reference
[Example scripts (models), Example scripts (models)]
Inherits Example, and Example.
Detailed Description
Example: Magic sequence
Find a magic sequence of length
. A magic sequence of length
is a sequence
of integers such that for every
:
is an integer between
and
.- the number
occurs exactly
times in the sequence.
Definition at line 37 of file magic-sequence-gcc.cc.
Public Member Functions | |
| MagicSequence (const Options &opt) | |
| The actual model. | |
| MagicSequence (bool share, MagicSequence &e) | |
| Constructor for cloning e. | |
| virtual Space * | copy (bool share) |
| Copy during cloning. | |
| virtual void | print (void) |
| Print sequence. | |
| void | exactly (IntVarArray &v, IntVar &x, int i) |
| Naive version for counting number of ocurrences of i. | |
| MagicSequence (const Options &opt) | |
| The actual model. | |
| MagicSequence (bool share, MagicSequence &e) | |
| Constructor for cloning e. | |
| virtual Space * | copy (bool share) |
| Copy during cloning. | |
| virtual void | print (void) |
| Print sequence. | |
Constructor & Destructor Documentation
| MagicSequence::MagicSequence | ( | const Options & | opt | ) | [inline] |
| MagicSequence::MagicSequence | ( | bool | share, | |
| MagicSequence & | e | |||
| ) | [inline] |
| MagicSequence::MagicSequence | ( | const Options & | opt | ) | [inline] |
| MagicSequence::MagicSequence | ( | bool | share, | |
| MagicSequence & | e | |||
| ) | [inline] |
Member Function Documentation
| virtual Space* MagicSequence::copy | ( | bool | share | ) | [inline, virtual] |
| virtual void MagicSequence::print | ( | void | ) | [inline, virtual] |
| void MagicSequence::exactly | ( | IntVarArray & | v, | |
| IntVar & | x, | |||
| int | i | |||
| ) | [inline] |
Naive version for counting number of ocurrences of i.
Definition at line 46 of file magic-sequence.cc.
| virtual Space* MagicSequence::copy | ( | bool | share | ) | [inline, virtual] |
| virtual void MagicSequence::print | ( | void | ) | [inline, virtual] |
The documentation for this class was generated from the following files:
- examples/magic-sequence-gcc.cc (Revision: 3517)
- examples/magic-sequence.cc (Revision: 3517)
