Golomb Class Reference
[Example scripts (models)]
Inherits Example.
Detailed Description
Example: Finding optimal Golomb rulersThe script makes use of two lower bounds taken from: Barbara Smith, Kostas Stergiou, Toby Walsh, Modelling the Golomb Ruler Problem. In IJCAI 99 Workshop on Non-binary Constraints, 1999.
Definition at line 37 of file golomb.cc.
Public Member Functions | |
int | diag (int i, int j) |
Return index for mark difference between mark i and mark j. | |
Golomb (const Options &opt) | |
Actual model. | |
void | constrain (Space *s) |
Add constraint for next better solution. | |
virtual void | print (void) |
Print solution. | |
Golomb (bool share, Golomb &s) | |
Constructor for cloning s. | |
virtual Space * | copy (bool share) |
Copy during cloning. | |
Protected Attributes | |
const int | n |
Number of marks. | |
IntVarArray | m |
Array for ruler marks. |
Constructor & Destructor Documentation
|
Actual model.
|
|
Constructor for cloning s.
|
Member Function Documentation
|
Return index for mark difference between mark i and mark j.
|
|
Add constraint for next better solution.
|
|
Print solution.
Reimplemented from Example. |
|
Copy during cloning.
Implements Gecode::Space. |
Member Data Documentation
|
Number of marks.
|
|
Array for ruler marks.
|
The documentation for this class was generated from the following file:
- examples/golomb.cc (Revision: 3374)