Generated on Tue Sep 25 2012 20:53:24 for Gecode by doxygen 1.7.5
Money Class Reference

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

List of all members.

Public Types

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

Public Member Functions

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

Protected Attributes

IntVarArray le
 Array of letters.

Static Protected Attributes

static const int nl = 8
 Number of letters.

Related Functions

(Note that these are not member functions.)

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

Detailed Description

Example: SEND+MORE=MONEY puzzle

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


Member Enumeration Documentation

anonymous enum

Model variants.

Enumerator:
MODEL_SINGLE 

Use single linear equation.

MODEL_CARRY 

Use carries.

Definition at line 61 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 [inline, virtual]

Print solution.

Reimplemented from Gecode::Driver::ScriptBase.

Definition at line 100 of file money.cpp.

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

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 [static, protected]

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: