Hamming Class Reference
[Example scripts (models)]
Inherits Example.
Detailed Description
Example: Generating hamming codesGenerate 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 to words is the number of bit positions where they differ.
This instance fixes b to 20 and d to 3.
Definition at line 41 of file hamming.cc.
Public Member Functions | |
Hamming (const Options &o) | |
Hamming (bool share, Hamming &s) | |
virtual Space * | copy (bool share) |
Copying member function. | |
virtual void | print (void) |
Public Attributes | |
SetVarArray | xs |
Static Public Attributes | |
static const int | bits = 20 |
static const int | dist = 3 |
Constructor & Destructor Documentation
Hamming::Hamming | ( | const Options & | o | ) | [inline] |
Definition at line 48 of file hamming.cc.
Hamming::Hamming | ( | bool | share, | |
Hamming & | s | |||
) | [inline] |
Definition at line 78 of file hamming.cc.
Member Function Documentation
virtual Space* Hamming::copy | ( | bool | share | ) | [inline, virtual] |
Copying member function.
Must create a new object using the constructor for cloning.
Implements Gecode::Space.
Definition at line 83 of file hamming.cc.
virtual void Hamming::print | ( | void | ) | [inline, virtual] |
Member Data Documentation
Definition at line 43 of file hamming.cc.
const int Hamming::bits = 20 [static] |
Definition at line 45 of file hamming.cc.
const int Hamming::dist = 3 [static] |
Definition at line 46 of file hamming.cc.
The documentation for this class was generated from the following file:
- examples/hamming.cc (Revision: 3506)