CGAL 5.4 - Linear and Quadratic Programming Solver
|
#include <CGAL/QP_options.h>
This is a class used for passing options to the linear and quadratic programming solvers.
Currently, we support only options referring to
Quadratic_program_pricing_strategy
), Quadratic_program_solution
) The idea is that this list grows in the future.
Operations
Here we just have set/get pairs for any option type.
Creation | |
Quadratic_program_options () | |
constructs an instance of Quadratic_program_options where all available options are at their defaults. | |
Verbosity | |
void | set_verbosity (int verbosity) |
sets the verbosity of the solver to the value verbosity when options is passed to any of the four solution functions. More... | |
int | get_verbosity () const |
returns the verbosity level of options . | |
Pricing strategy | |
void | set_pricing_strategy (Quadratic_program_pricing_strategy pricing_strategy) |
sets the pricing strategy of the solver to the value pricing_strategy when options is passed to any of the four solution functions. More... | |
Quadratic_program_pricing_strategy | get_pricing_strategy () const |
returns the pricing strategy of options . | |
Validation mode | |
void | set_auto_validation (bool validate) |
sets the automatic validation mode of the solver to the value validate . More... | |
bool | get_auto_validation () const |
returns the validation mode of options . | |
void CGAL::Quadratic_program_options::set_auto_validation | ( | bool | validate | ) |
sets the automatic validation mode of the solver to the value validate
.
The default is false
. By providing value true
you can tell the solver to automatically check whether the program has correctly been solved, see the Validity section of the class Quadratic_program_solution
.
void CGAL::Quadratic_program_options::set_pricing_strategy | ( | Quadratic_program_pricing_strategy | pricing_strategy | ) |
sets the pricing strategy of the solver to the value pricing_strategy
when options
is passed to any of the four solution functions.
The pricing strategy controls how the solver proceeds from any intermediate solution. For the available strategies and their behavior, see the documentation of the class Quadratic_program_pricing_strategy
.
void CGAL::Quadratic_program_options::set_verbosity | ( | int | verbosity | ) |
sets the verbosity of the solver to the value verbosity
when options
is passed to any of the four solution functions.
The provided value must be a number between \( 0\) and \( 5\). Verbosity \( 0\) is the default and results in the solver running silently. Verbosity \( 1\) prints a short summary of every iteration. Higher verbosity values print more information about the solution process, but these are mainly for debugging purposes and have no effect if you compile with CGAL_QP_NO_ASSERTIONS
or NDEBUG
.