Generated on Wed Nov 1 15:04:51 2006 for Gecode by doxygen 1.4.5

Golomb Class Reference
[Example scripts (models)]

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 Spacecopy (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]
 

Actual model.

Definition at line 51 of file golomb.cc.

Golomb::Golomb bool  share,
Golomb s
[inline]
 

Constructor for cloning s.

Definition at line 112 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 98 of file golomb.cc.

virtual void Golomb::print void   )  [inline, virtual]
 

Print solution.

Reimplemented from Example.

Definition at line 104 of file golomb.cc.

virtual Space* Golomb::copy bool  share  )  [inline, virtual]
 

Copy during cloning.

Implements Gecode::Space.

Definition at line 118 of file golomb.cc.


Member Data Documentation

const int Golomb::n [protected]
 

Number of marks.

Definition at line 40 of file golomb.cc.

IntVarArray Golomb::m [protected]
 

Array for ruler marks.

Definition at line 42 of file golomb.cc.


The documentation for this class was generated from the following file: