Generated on Sat Feb 7 2015 02:01:38 for Gecode by doxygen 1.8.9.1
AllInterval Class Reference

Example: All-interval series More...

Public Member Functions

 AllInterval (const SizeOptions &opt)
 Actual model. More...
 
 AllInterval (bool share, AllInterval &s)
 Constructor for cloning e. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. More...
 
virtual void print (std::ostream &os) const
 Print solution. More...
 
- Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
 ScriptBase (void)
 Default constructor. More...
 
 ScriptBase (bool share, ScriptBase &e)
 Constructor used for cloning. More...
 
virtual void compare (const Space &, std::ostream &os) const
 Compare with s. More...
 

Related Functions

(Note that these are not member functions.)

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

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::Driver::ScriptBase< BaseSpace >
static std::ostream & select_ostream (const char *name, std::ofstream &ofs)
 Choose output stream according to name. More...
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

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 http://www.csplib.org/.

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

Constructor & Destructor Documentation

AllInterval::AllInterval ( const SizeOptions opt)
inline

Actual model.

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

AllInterval::AllInterval ( bool  share,
AllInterval s 
)
inline

Constructor for cloning e.

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

Member Function Documentation

virtual Space* AllInterval::copy ( bool  share)
inlinevirtual

Copy during cloning.

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

virtual void AllInterval::print ( std::ostream &  os) const
inlinevirtual

Print solution.

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

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

Friends And Related Function Documentation

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

Main-function.

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


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