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

Example: SEND+MORE=MONEY puzzle More...

Public Types

enum  { MODEL_SINGLE, MODEL_CARRY }
 Model variants. More...
 

Public Member Functions

 Money (const Options &opt)
 Actual model. More...
 
virtual void print (std::ostream &os) const
 Print solution. More...
 
 Money (bool share, Money &s)
 Constructor for cloning s. More...
 
virtual Spacecopy (bool share)
 Copy during cloning. 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...
 

Protected Attributes

IntVarArray le
 Array of letters. More...
 

Static Protected Attributes

static const int nl = 8
 Number of 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 *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: SEND+MORE=MONEY puzzle

Well-known cryptoarithmetic puzzle. Henry Dudeney, Strand Magazine, July 1924.

Definition at line 53 of file money.cpp.

Constructor & Destructor Documentation

Money::Money ( const Options opt)
inline

Actual model.

Definition at line 66 of file money.cpp.

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

Constructor for cloning s.

Definition at line 105 of file money.cpp.

Member Function Documentation

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

Print solution.

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

Definition at line 100 of file money.cpp.

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

Copy during cloning.

Definition at line 110 of file money.cpp.

Friends And Related Function Documentation

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

Main-function.

Definition at line 119 of file money.cpp.

Member Data Documentation

const int Money::nl = 8
staticprotected

Number of letters.

Definition at line 56 of file money.cpp.

IntVarArray Money::le
protected

Array of letters.

Definition at line 58 of file money.cpp.


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