Options Class Reference
#include <support.hh>
Inherited by BIBDOptions, FileNameOptions, LangfordNumberOptions, and SizeOptions.
Detailed Description
Options for examples.Definition at line 150 of file support.hh.
Model options | |
| StringOption | _model |
| General model options. | |
| StringOption | _propagation |
| Propagation options. | |
| StringOption | _pk |
| Propagation kind. | |
| StringOption | _icl |
| Integer consistency level. | |
| StringOption | _branching |
| Branching options. | |
Search options | |
| StringOption | _search |
| Search options. | |
| UnsignedIntOption | _solutions |
| How many solutions. | |
| UnsignedIntOption | _c_d |
| Copy recomputation distance. | |
| UnsignedIntOption | _a_d |
| Adaptive recomputation distance. | |
| UnsignedIntOption | _fail |
| Cutoff for number of failures. | |
| UnsignedIntOption | _time |
| Cutoff for time. | |
Execution options | |
| StringOption | _mode |
| Example mode to run. | |
| UnsignedIntOption | _samples |
| How many samples. | |
| UnsignedIntOption | _iterations |
| How many iterations per sample. | |
Model options | |
| void | model (int v) |
| Set default model value. | |
| void | model (int v, const char *o, const char *h=NULL) |
| Add model option value for value v, string o, and help h. | |
| int | model (void) const |
| Return model value. | |
| void | propagation (int v) |
| Set default propagation value. | |
| void | propagation (int v, const char *o, const char *h=NULL) |
| Add propagation option value for value v, string o, and help h. | |
| int | propagation (void) const |
| Return propagation value. | |
| void | pk (PropKind p) |
| Set default propagation kind. | |
| PropKind | pk (void) const |
| Return propagation kind. | |
| void | icl (IntConLevel i) |
| Set default integer consistency level. | |
| IntConLevel | icl (void) const |
| Return integer consistency level. | |
| void | branching (int v) |
| Set default branching value. | |
| void | branching (int v, const char *o, const char *h=NULL) |
| Add branching option value for value v, string o, and help h. | |
| int | branching (void) const |
| Return branching value. | |
Search options | |
| void | search (int v) |
| Set default search value. | |
| void | search (int v, const char *o, const char *h=NULL) |
| Add search option value for value v, string o, and help h. | |
| int | search (void) const |
| Return search value. | |
| void | solutions (unsigned int n) |
| Set default number of solutions to search for. | |
| unsigned int | solutions (void) const |
| Return number of solutions to search for. | |
| void | c_d (unsigned int d) |
| Set default copy recomputation distance. | |
| unsigned int | c_d (void) const |
| Return copy recomputation distance. | |
| void | a_d (unsigned int d) |
| Set default adaptive recomputation distance. | |
| unsigned int | a_d (void) const |
| Return adaptive recomputation distance. | |
| void | fail (unsigned int n) |
| Set default failure cutoff. | |
| unsigned int | fail (void) const |
| Return failure cutoff. | |
| void | time (unsigned int t) |
| Set default time cutoff. | |
| unsigned int | time (void) const |
| Return time cutoff. | |
Execution options | |
| void | mode (ExampleMode em) |
| Set default mode. | |
| ExampleMode | mode (void) const |
| Return mode. | |
| void | iterations (unsigned int i) |
| Set default number of iterations. | |
| unsigned int | iterations (void) const |
| Return number of iterations. | |
| void | samples (unsigned int s) |
| Set default number of samples. | |
| unsigned int | samples (void) const |
| Return number of samples. | |
Public Member Functions | |
| Options (const char *s) | |
| Initialize options for example with name s. | |
| void | add (BaseOption &o) |
| Add new option o. | |
| virtual void | help (void) |
| Print help text. | |
| void | parse (int &argc, char *argv[]) |
| Parse options from arguments argv (number is argc). | |
| const char * | name (void) const |
| Return name of example. | |
| virtual | ~Options (void) |
| Destructor. | |
Protected Attributes | |
| BaseOption * | fst |
| First registered option. | |
| BaseOption * | lst |
| Last registered option. | |
| const char * | _name |
| Example name. | |
Constructor & Destructor Documentation
| Options::Options | ( | const char * | s | ) |
| Options::~Options | ( | void | ) | [inline, virtual] |
Member Function Documentation
| void Options::add | ( | BaseOption & | o | ) | [inline] |
| void Options::help | ( | void | ) | [virtual] |
Print help text.
Reimplemented in BIBDOptions, FileNameOptions, LangfordNumberOptions, and SizeOptions.
Definition at line 182 of file options.cc.
| void Options::parse | ( | int & | argc, | |
| char * | argv[] | |||
| ) |
Parse options from arguments argv (number is argc).
Reimplemented in BIBDOptions, FileNameOptions, LangfordNumberOptions, and SizeOptions.
Definition at line 191 of file options.cc.
| const char * Options::name | ( | void | ) | const [inline] |
| void Options::model | ( | int | v | ) | [inline] |
| void Options::model | ( | int | v, | |
| const char * | o, | |||
| const char * | h = NULL | |||
| ) | [inline] |
Add model option value for value v, string o, and help h.
Definition at line 113 of file options.icc.
| int Options::model | ( | void | ) | const [inline] |
| void Options::propagation | ( | int | v | ) | [inline] |
| void Options::propagation | ( | int | v, | |
| const char * | o, | |||
| const char * | h = NULL | |||
| ) | [inline] |
Add propagation option value for value v, string o, and help h.
Definition at line 126 of file options.icc.
| int Options::propagation | ( | void | ) | const [inline] |
| void Options::pk | ( | PropKind | p | ) |
Set default propagation kind.
| PropKind Options::pk | ( | void | ) | const [inline] |
| void Options::icl | ( | IntConLevel | i | ) |
Set default integer consistency level.
| IntConLevel Options::icl | ( | void | ) | const [inline] |
| void Options::branching | ( | int | v | ) | [inline] |
| void Options::branching | ( | int | v, | |
| const char * | o, | |||
| const char * | h = NULL | |||
| ) | [inline] |
Add branching option value for value v, string o, and help h.
Definition at line 157 of file options.icc.
| int Options::branching | ( | void | ) | const [inline] |
| void Options::search | ( | int | v | ) | [inline] |
| void Options::search | ( | int | v, | |
| const char * | o, | |||
| const char * | h = NULL | |||
| ) | [inline] |
Add search option value for value v, string o, and help h.
Definition at line 174 of file options.icc.
| int Options::search | ( | void | ) | const [inline] |
| void Options::solutions | ( | unsigned int | n | ) | [inline] |
| unsigned int Options::solutions | ( | void | ) | const [inline] |
| void Options::c_d | ( | unsigned int | d | ) | [inline] |
| unsigned int Options::c_d | ( | void | ) | const [inline] |
| void Options::a_d | ( | unsigned int | d | ) | [inline] |
| unsigned int Options::a_d | ( | void | ) | const [inline] |
| void Options::fail | ( | unsigned int | n | ) | [inline] |
| unsigned int Options::fail | ( | void | ) | const [inline] |
| void Options::time | ( | unsigned int | t | ) | [inline] |
| unsigned int Options::time | ( | void | ) | const [inline] |
| void Options::mode | ( | ExampleMode | em | ) | [inline] |
| ExampleMode Options::mode | ( | void | ) | const [inline] |
| void Options::iterations | ( | unsigned int | i | ) | [inline] |
| unsigned int Options::iterations | ( | void | ) | const [inline] |
| void Options::samples | ( | unsigned int | s | ) | [inline] |
| unsigned int Options::samples | ( | void | ) | const [inline] |
Member Data Documentation
BaseOption* Options::fst [protected] |
BaseOption* Options::lst [protected] |
const char* Options::_name [protected] |
StringOption Options::_model [protected] |
StringOption Options::_propagation [protected] |
StringOption Options::_pk [protected] |
StringOption Options::_icl [protected] |
StringOption Options::_branching [protected] |
StringOption Options::_search [protected] |
UnsignedIntOption Options::_solutions [protected] |
UnsignedIntOption Options::_c_d [protected] |
UnsignedIntOption Options::_a_d [protected] |
UnsignedIntOption Options::_fail [protected] |
UnsignedIntOption Options::_time [protected] |
StringOption Options::_mode [protected] |
UnsignedIntOption Options::_samples [protected] |
UnsignedIntOption Options::_iterations [protected] |
The documentation for this class was generated from the following files:
- examples/support.hh (Revision: 7347)
- examples/support/options.cc (Revision: 7347)
- examples/support/options.icc (Revision: 7344)
