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) |
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.
|
inline |
Actual model.
Definition at line 92 of file hamming.cpp.
|
inline |
Constructor for copying s.
Definition at line 122 of file hamming.cpp.
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.
Definition at line 115 of file hamming.cpp.
|
inlinevirtual |
Copy during cloning.
Definition at line 127 of file hamming.cpp.
|
Main-function.
Definition at line 137 of file hamming.cpp.