ConstrainedOptPack: C++ Tools for Constrained (and Unconstrained) Optimization
Version of the Day
|
Tests that a set of variables are within their bounds. More...
#include <ConstrainedOptPack_VariableBoundsTester.hpp>
Public Member Functions | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, warning_tol) | |
STANDARD_MEMBER_COMPOSITION_MEMBERS (value_type, error_tol) | |
VariableBoundsTester (value_type warning_tol=1e-10, value_type error_tol=1e-5) | |
virtual | ~VariableBoundsTester () |
virtual bool | check_in_bounds (std::ostream *out, bool print_all_warnings, bool print_vectors, const Vector &xL, const char xL_name[], const Vector &xU, const char xU_name[], const Vector &x, const char x_name[]) |
Check that the variables are within bounds. More... | |
Tests that a set of variables are within their bounds.
xL <= x <= xU
The relative error for each comparison is rel_err(i) = (xL(i)-x(i))/(1+||x||inf) or rel_err(i) = (x(i)-xU(i))/(1+||x||inf). If rel_err(i) >= error_tol, then the tests will be terminated immediately. All of the rel_err(i) >= warning_tol will be printed.
Definition at line 62 of file ConstrainedOptPack_VariableBoundsTester.hpp.
ConstrainedOptPack::VariableBoundsTester::VariableBoundsTester | ( | value_type | warning_tol = 1e-10 , |
value_type | error_tol = 1e-5 |
||
) |
Definition at line 51 of file ConstrainedOptPack_VariableBoundsTester.cpp.
|
inlinevirtual |
Definition at line 78 of file ConstrainedOptPack_VariableBoundsTester.hpp.
ConstrainedOptPack::VariableBoundsTester::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | value_type | , |
warning_tol | |||
) |
ConstrainedOptPack::VariableBoundsTester::STANDARD_MEMBER_COMPOSITION_MEMBERS | ( | value_type | , |
error_tol | |||
) |
|
virtual |
Check that the variables are within bounds.
print_all_warnings | [in] If true, then all errors greater than warning_tol will be printed. |
xL | [in] Sparse lower bound vector (xL.size()==x.size()) |
xL_name | [in] The name of the vector xL (null terminated string). |
xU | [in] Sparse upper bound vector (xU.size()==x.size()) |
xU_name | [in] The name of the vector xU (null terminated string). |
x | [in] Variable to test that it is in bounds. |
x_name | [in] The name of the vector x (null terminated string). |
true
if all of the errors are greater than the error tolerances, otherwise it returns false
Definition at line 59 of file ConstrainedOptPack_VariableBoundsTester.cpp.