Inherits
Example.
List of all members.
Detailed Description
Example: Finding optimal Golomb rulers
The 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
Golomb::Golomb |
( |
const Options & |
opt |
) |
[inline] |
Golomb::Golomb |
( |
bool |
share, |
|
|
Golomb & |
s | |
|
) |
| | [inline] |
Constructor for cloning s.
Definition at line 113 of file golomb.cc.
Member Function Documentation
int Golomb::diag |
( |
int |
i, |
|
|
int |
j | |
|
) |
| | [inline] |
Return index for mark difference between mark i and mark j.
Definition at line 46 of file golomb.cc.
void Golomb::constrain |
( |
Space * |
s |
) |
[inline] |
Add constraint for next better solution.
Definition at line 99 of file golomb.cc.
virtual void Golomb::print |
( |
void |
|
) |
[inline, virtual] |
virtual Space* Golomb::copy |
( |
bool |
share |
) |
[inline, virtual] |
Member Data Documentation
Number of marks.
Definition at line 40 of file golomb.cc.
Array for ruler marks.
Definition at line 42 of file golomb.cc.
The documentation for this class was generated from the following file: