Generated on Tue May 22 09:40:47 2018 for Gecode by doxygen 1.6.3

AllInterval Class Reference
[Example scripts (models)]

Example: All-interval series More...

List of all members.

Public Member Functions

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

Constant sets for attacking queens.

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

Detailed Description

Example: All-interval series

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

\[ (x_0,x_1,\ldots,x_{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

Definition at line 62 of file all-interval.cpp.

Constructor & Destructor Documentation

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

Actual model.

Definition at line 70 of file all-interval.cpp.

AllInterval::AllInterval ( AllInterval s  )  [inline]

Constructor for cloning e.

Definition at line 91 of file all-interval.cpp.

Member Function Documentation

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

Copy during cloning.

Definition at line 98 of file all-interval.cpp.

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

Print solution.

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

Definition at line 103 of file all-interval.cpp.

Friends And Related Function Documentation

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



Main function.

Definition at line 117 of file all-interval.cpp.

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