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

AllInterval Class Reference
[Scripts for problems]

Inherits Example.

List of all members.


Detailed Description

Example: All-interval Series

An all-interval series of length $n$ is a sequence

\[ (x_0,x_1,\ldots,n_{n-1}) \]

where each $x_i$ is an integer between $0$ and $n-1$ such that the following conditions hold:

  • the $x_i$ are a permutation of $\{0,1,\ldots,n-1\}$ (that is, they are pairwise distinct and take values from $\{0,1,\ldots,n-1\}$).
  • the differences between adjacent values $(d_1,d_2,\ldots,d_{n-1})$ with $d_i=\operatorname{abs}(x_i-x_{i-1})$ form a permutation of $\{1,2,\ldots,n-1\}$.

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

Definition at line 63 of file all-interval.cc.


Constant sets for attacking queens.

int main (int argc, char *argv[])
 Main-function.

Public Member Functions

 AllInterval (const SizeOptions &opt)
 Actual model.
 AllInterval (bool share, AllInterval &e)
 Constructor for cloning e.
virtual Spacecopy (bool share)
 Copy during cloning.
virtual void print (std::ostream &os)
 Print solution.

Constructor & Destructor Documentation

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

Actual model.

Definition at line 69 of file all-interval.cc.

AllInterval::AllInterval ( bool  share,
AllInterval e 
) [inline]

Constructor for cloning e.

Definition at line 93 of file all-interval.cc.


Member Function Documentation

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

Copy during cloning.

Implements Gecode::Space.

Definition at line 99 of file all-interval.cc.

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

Print solution.

Reimplemented from Example.

Definition at line 104 of file all-interval.cc.


Friends And Related Function Documentation

int main ( int  argc,
char *  argv[] 
) [related]

Main-function.

Main-functiona.

Main function.

Definition at line 118 of file all-interval.cc.


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