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=nullptr) |
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]
|
inline |
Actual model.
Definition at line 92 of file hamming.cpp.
◆ Hamming() [2/2]
|
inline |
Constructor for copying s.
Definition at line 122 of file hamming.cpp.
Member Function Documentation
◆ print()
|
inlinevirtual |
Print solution.
Reimplemented from Gecode::Driver::ScriptBase< Driver::IgnoreStepOption< Space > >.
Definition at line 115 of file hamming.cpp.
◆ copy()
|
inlinevirtual |
Copy during cloning.
Definition at line 127 of file hamming.cpp.
Friends And Related Symbol Documentation
◆ main()
|
Main-function.
Definition at line 137 of file hamming.cpp.
The documentation for this class was generated from the following file:
- examples/hamming.cpp
