LangfordNum Class Reference
[Example scripts (models)]
Inherits Example.
Detailed Description
Example: Langford's number problemProblem 024 in the categoy "combinatorial mathematics" of http://www.csplib.org/.
For a detailed problem analysis see http://www.lclark.edu/~miller/langford.html
Definition at line 50 of file langfordnum.cc.
Public Member Functions | |
void | adiff_skn (Space *home, IntVarArray &x, IntVarArray &pi) |
Constrain x to be a permutation of ![]() | |
IntVar & | p (int i, int j) |
Returns the position of the j-th occurence of value ![]() | |
IntVar & | ys (int i, int j) |
void | distance (Space *home) |
The occurences of a value v in the Langford sequence are v numbers apart. | |
LangfordNum (const Options &op) | |
LangfordNum (bool share, LangfordNum &l) | |
virtual Space * | copy (bool share) |
Copying member function. | |
virtual void | print (void) |
Constructor & Destructor Documentation
|
Definition at line 116 of file langfordnum.cc. |
|
Definition at line 157 of file langfordnum.cc. |
Member Function Documentation
|
Constrain x to be a permutation of
Definition at line 70 of file langfordnum.cc. |
|
Returns the position of the j-th occurence of value
Definition at line 88 of file langfordnum.cc. |
|
Definition at line 92 of file langfordnum.cc. |
|
The occurences of a value v in the Langford sequence are v numbers apart.
Let Definition at line 106 of file langfordnum.cc. |
|
Copying member function. Must create a new object using the constructor for cloning. Implements Gecode::Space. Definition at line 166 of file langfordnum.cc. |
|
Reimplemented from Example. Definition at line 170 of file langfordnum.cc. |
The documentation for this class was generated from the following file:
- examples/langfordnum.cc (Revision: 3517)