Generated on Mon Aug 25 11:35:48 2008 for Gecode by doxygen 1.5.6

LangfordNumber Class Reference
[Scripts for problems]

Inherits Example.

List of all members.


Detailed Description

Example: Langford's number problem

See problem 24 at http://www.csplib.org/.

Definition at line 81 of file langford-number.cc.


Public Types

enum  { PROP_REIFIED, PROP_EXTENSIONAL, PROP_EXTENSIONAL_CHANNEL }
 Propagation to use for model. More...

Public Member Functions

 LangfordNumber (const LangfordNumberOptions &opt)
 Construct model.
virtual void print (std::ostream &os)
 Print solution.
 LangfordNumber (bool share, LangfordNumber &l)
 Constructor for cloning l.
virtual Spacecopy (bool share)
 Copy during cloning.

Protected Attributes

int k
int n
 Problem parameters.
IntVarArray y
 Sequence variables.

Member Enumeration Documentation

anonymous enum

Propagation to use for model.

Enumerator:
PROP_REIFIED  Use reified constraints.
PROP_EXTENSIONAL  Use extensional constraints.
PROP_EXTENSIONAL_CHANNEL  Use extensional and channel constraints.

Definition at line 88 of file langford-number.cc.


Constructor & Destructor Documentation

LangfordNumber::LangfordNumber ( const LangfordNumberOptions opt  )  [inline]

Construct model.

Position of values in sequence

Definition at line 94 of file langford-number.cc.

LangfordNumber::LangfordNumber ( bool  share,
LangfordNumber l 
) [inline]

Constructor for cloning l.

Definition at line 184 of file langford-number.cc.


Member Function Documentation

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

Print solution.

Reimplemented from Example.

Definition at line 179 of file langford-number.cc.

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

Copy during cloning.

Implements Gecode::Space.

Definition at line 191 of file langford-number.cc.


Member Data Documentation

int LangfordNumber::k [protected]

Definition at line 83 of file langford-number.cc.

int LangfordNumber::n [protected]

Problem parameters.

Definition at line 83 of file langford-number.cc.

Sequence variables.

Definition at line 84 of file langford-number.cc.


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