Generated on Thu Apr 11 13:59:39 2019 for Gecode by doxygen 1.6.3

GolombRuler Class Reference
[Example scripts (models)]

Example: Finding optimal Golomb rulers More...

List of all members.

Public Member Functions

 GolombRuler (const SizeOptions &opt)
 Actual model.
virtual IntVar cost (void) const
 Return cost.
virtual void print (std::ostream &os) const
 Print solution.
 GolombRuler (GolombRuler &s)
 Constructor for cloning s.
virtual Spacecopy (void)
 Copy during cloning.

Protected Attributes

IntVarArray m
 Array for ruler marks.

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.

See also problem 6 at http://www.csplib.org/.

The upper bound used is from the trivial construction where distances between consecutive marks are increasing powers of two.

Note that "Modeling and Programming with Gecode" uses this example as a case study.

Definition at line 62 of file golomb-ruler.cpp.


Constructor & Destructor Documentation

GolombRuler::GolombRuler ( const SizeOptions opt  )  [inline]

Actual model.

Definition at line 68 of file golomb-ruler.cpp.

GolombRuler::GolombRuler ( GolombRuler s  )  [inline]

Constructor for cloning s.

Definition at line 114 of file golomb-ruler.cpp.


Member Function Documentation

virtual IntVar GolombRuler::cost ( void   )  const [inline, virtual]

Return cost.

Definition at line 103 of file golomb-ruler.cpp.

virtual void GolombRuler::print ( std::ostream &  os  )  const [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< BaseSpace >.

Definition at line 109 of file golomb-ruler.cpp.

virtual Space* GolombRuler::copy ( void   )  [inline, virtual]

Copy during cloning.

Definition at line 120 of file golomb-ruler.cpp.


Member Data Documentation

Array for ruler marks.

Definition at line 65 of file golomb-ruler.cpp.


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