mirror of https://github.com/CGAL/cgal
- fixed file location in include
- renamed ...validation_flag() to ...auto_validation()
This commit is contained in:
parent
a32c326463
commit
a6aba7c40a
|
|
@ -56,15 +56,15 @@ not internally cycle.}
|
|||
|
||||
\ccHeading{Validation mode}
|
||||
|
||||
\ccMethod{void set_validation_flag(bool validate);}
|
||||
{sets the validation flag of the solver to the value \ccc{validate}.
|
||||
\ccMethod{void set_auto_validation(bool validate);}
|
||||
{sets the automatic validation mode of the solver to the value \ccc{validate}.
|
||||
The default is \ccc{false}. By providing value \ccc{true} you can
|
||||
tell the solver to automatically check whether the program has
|
||||
correctly been solved, see the Validity section of the class
|
||||
\ccc{Quadratic_program_solution}.}
|
||||
|
||||
\ccMethod{bool get_validation_flag() const;}
|
||||
{returns the validation flag of \ccVar.}
|
||||
\ccMethod{bool get_auto_validation() const;}
|
||||
{returns the validation mode of \ccVar.}
|
||||
|
||||
\ccExample
|
||||
\ccReferToExampleCode{QP_solver/cycling.cpp}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ int main() {
|
|||
CGAL::Quadratic_program_options options;
|
||||
options.set_verbosity(1); // verbose mode
|
||||
options.set_pricing_strategy(CGAL::QP_BLAND); // Bland's rule
|
||||
options.set_validation_flag(true); // automatic self-check
|
||||
options.set_auto_validation(true); // automatic self-check
|
||||
Solution s = CGAL::solve_nonnegative_linear_program(lp, ET(), options);
|
||||
assert (s.is_valid()); // did the self-check succeed?
|
||||
|
||||
|
|
|
|||
|
|
@ -74,12 +74,12 @@ public:
|
|||
|
||||
// set/get validation flag
|
||||
// -----------------------
|
||||
bool get_validation_flag() const
|
||||
bool get_auto_validation() const
|
||||
{
|
||||
return validation_flag_;
|
||||
}
|
||||
|
||||
void set_validation_flag (bool validate)
|
||||
void set_auto_validation (bool validate)
|
||||
{
|
||||
validation_flag_ = validate;
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ std::ostream& operator<< (std::ostream& o,
|
|||
o << "QP_BLAND";
|
||||
}
|
||||
o << "\n";
|
||||
o << " Validation flag: " << options.get_validation_flag() << std::endl;
|
||||
o << " Validation flag: " << options.get_auto_validation() << std::endl;
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
// includes
|
||||
#include <CGAL/QP_solver/QP_pricing_strategy.h>
|
||||
#include <CGAL/QP_solver.h>
|
||||
#include <CGAL/QP_solver/QP_solver.h>
|
||||
#include <cmath>
|
||||
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ namespace QP_functions_detail {
|
|||
Solver;
|
||||
const Solver* s = new Solver(p, options);
|
||||
Quadratic_program_solution<ET> solution(s);
|
||||
if (options.get_validation_flag()) {
|
||||
if (options.get_auto_validation()) {
|
||||
// validate solution
|
||||
if (options.get_verbosity() > 0)
|
||||
std::cout << "Validating solution...\n";
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ int main()
|
|||
{
|
||||
// options
|
||||
CGAL::Quadratic_program_options options;
|
||||
options.set_validation_flag(true);
|
||||
options.set_auto_validation(true);
|
||||
|
||||
for (fl = 0; fl < 2; ++fl)
|
||||
for (fu = 0; fu < 2; ++fu)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ int tries = 50000;
|
|||
int main() {
|
||||
// options
|
||||
CGAL::Quadratic_program_options options;
|
||||
options.set_validation_flag(true);
|
||||
options.set_auto_validation(true);
|
||||
|
||||
// generate a set of small random qp's
|
||||
for (int i=0; i<tries; ++i) {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ int max_entry = 10;
|
|||
int main() {
|
||||
// options
|
||||
CGAL::Quadratic_program_options options;
|
||||
options.set_validation_flag(true);
|
||||
options.set_auto_validation(true);
|
||||
|
||||
// generate a set of small random qp's
|
||||
for (int i=0; i<tries; ++i) {
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ bool process(const std::string& filename,
|
|||
solver_options.set_pricing_strategy
|
||||
(static_cast<CGAL::Quadratic_program_pricing_strategy>
|
||||
(options.find("Strategy")->second));
|
||||
solver_options.set_validation_flag(true);
|
||||
solver_options.set_auto_validation(true);
|
||||
|
||||
CGAL::Quadratic_program_solution<ET> solution =
|
||||
CGAL::QP_functions_detail::solve_program
|
||||
|
|
@ -443,7 +443,7 @@ bool process(const std::string& filename,
|
|||
CGAL::Quadratic_program_options local_options;
|
||||
local_options.set_verbosity(0);
|
||||
local_options.set_pricing_strategy(CGAL::QP_DANTZIG);
|
||||
local_options.set_validation_flag(true);
|
||||
local_options.set_auto_validation(true);
|
||||
LocalQP qplocal (qp.get_n(), qp.get_m(), qp.get_a(), qp.get_b(),
|
||||
qp.get_r(),
|
||||
qp.get_fl(), qp.get_l(), qp.get_fu(), qp.get_u(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue