Example: Generating Hamming codes More...
Public Member Functions | |
Hamming (const HammingOptions &opt) | |
Actual model. | |
virtual void | print (std::ostream &os) const |
Print solution. | |
Hamming (bool share, Hamming &s) | |
Constructor for copying s. | |
virtual Space * | copy (bool share) |
Copy during cloning. | |
Related Functions | |
(Note that these are not member functions.) | |
int | main (int argc, char *argv[]) |
Main-function. |
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.
Hamming::Hamming | ( | const HammingOptions & | opt | ) | [inline] |
Actual model.
Definition at line 96 of file hamming.cpp.
Hamming::Hamming | ( | bool | share, |
Hamming & | s | ||
) | [inline] |
Constructor for copying s.
Definition at line 120 of file hamming.cpp.
virtual void Hamming::print | ( | std::ostream & | os | ) | const [inline, virtual] |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase.
Definition at line 113 of file hamming.cpp.
virtual Space* Hamming::copy | ( | bool | share | ) | [inline, virtual] |
Copy during cloning.
Definition at line 125 of file hamming.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) | [related] |
Main-function.
Definition at line 135 of file hamming.cpp.