Hamming Class Reference
Example scripts (models)

Example: Generating Hamming codes More...

## Public Member Functions

| Hamming (const HammingOptions &opt)
| Actual model.
virtual void | print (std::ostream &os) const
| Print solution.
| Hamming (Hamming &s)
| Constructor for copying s.
virtual Space * | copy (void)
| Copy during cloning.
Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
| ScriptBase (const Options &opt)
| Constructor.
| ScriptBase (ScriptBase &e)
| Constructor used for cloning.
virtual void | compare (const Space &home, std::ostream &os) const
| Compare with s.
Public Member Functions inherited from Gecode::Driver::IgnoreStepOption< BaseSpace >
| IgnoreStepOption (const Options &)
| Constructor.
| IgnoreStepOption (BaseSpace &e)
| Constructor used for cloning.

## Related Symbols

(Note that these are not member symbols.)
int | main (int argc, char *argv[])
| Main-function.

## Additional Inherited Members

Static Public Member Functions inherited from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >
static std::ostream & | select_ostream (const char *sn, std::ofstream &ofs)
| Choose output stream according to sn.
static void | run (const Options &opt, Script *s=NULL)

## Detailed Description

Example: Generating Hamming codes

Generate a Hamming code that fits in b-bit words to code n symbols where the Hamming distance between every two symbol codes is at least d. The Hamming distance between two words is the number of bit positions where they differ.

Definition at line 86 of file hamming.cpp.

## Constructor & Destructor Documentation

## Hamming() [1/2]

Hamming::Hamming | ( | const HammingOptions & | opt | ) |

inline

Actual model.

Definition at line 92 of file hamming.cpp.

## Hamming() [2/2]

Hamming::Hamming | ( | Hamming & | s | ) |

inline

Constructor for copying s.

Definition at line 122 of file hamming.cpp.

## Member Function Documentation

## print()

virtual void Hamming::print | ( | std::ostream & | os | ) | const

inline virtual

Print solution.

Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.

Definition at line 115 of file hamming.cpp.

## copy()

virtual Space * Hamming::copy | ( | void |  | ) |

inline virtual

Copy during cloning.

Definition at line 127 of file hamming.cpp.

## Friends And Related Symbol Documentation

## main()

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

related

Main-function.

Definition at line 137 of file hamming.cpp.

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

- examples/hamming.cpp