Generated on Thu Jan 20 2022 00:00:00 for Gecode by doxygen 1.9.1
Alpha Class Reference

Example: Alpha puzzle More...

Public Types

enum  { BRANCH_NONE , BRANCH_INVERSE , BRANCH_SIZE }
 Branching to use for model. More...
 

Public Member Functions

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

Protected Attributes

IntVarArray le
 Array for letters. More...
 

Static Protected Attributes

static const int n = 26
 Alphabet has 26 letters. 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 *sn, std::ofstream &ofs)
 Choose output stream according to sn. More...
 
template<class Script , template< class > class Engine, class Options >
static void run (const Options &opt, Script *s=NULL)
 

Detailed Description

Example: Alpha puzzle

Well-known cryptoarithmetic puzzle of unknown origin.

Definition at line 49 of file alpha.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Branching to use for model.

Enumerator
BRANCH_NONE 

Choose variable left to right.

BRANCH_INVERSE 

Choose variable right to left.

BRANCH_SIZE 

Choose variable with smallest size.

Definition at line 57 of file alpha.cpp.

Constructor & Destructor Documentation

◆ Alpha() [1/2]

Alpha::Alpha ( const Options opt)
inline

Actual model.

Definition at line 63 of file alpha.cpp.

◆ Alpha() [2/2]

Alpha::Alpha ( Alpha s)
inline

Constructor for cloning s.

Definition at line 109 of file alpha.cpp.

Member Function Documentation

◆ copy()

virtual Space* Alpha::copy ( void  )
inlinevirtual

Copy during cloning.

Definition at line 114 of file alpha.cpp.

◆ print()

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

Print solution.

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

Definition at line 119 of file alpha.cpp.

Friends And Related Function Documentation

◆ main()

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

Main-function.

Definition at line 134 of file alpha.cpp.

Member Data Documentation

◆ n

const int Alpha::n = 26
staticprotected

Alphabet has 26 letters.

Definition at line 52 of file alpha.cpp.

◆ le

IntVarArray Alpha::le
protected

Array for letters.

Definition at line 54 of file alpha.cpp.


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