Definition in file minimize.h.
Go to the source code of this file.
Data Structures | |
class | minimize |
Numerical differentiation base. More... | |
Functions | |
double | constraint (double x, double center, double width, double height) |
Constrain x to be within width of the value given by center . | |
double | cont_constraint (double x, double center, double width, double height, double tightness=40.0, double exp_arg_limit=50.0) |
Constrain x to be within width of the value given by center . | |
double | lower_bound (double x, double center, double width, double height) |
Constrain x to be greater than the value given by center . | |
double | cont_lower_bound (double x, double center, double width, double height, double tightness=40.0, double exp_arg_limit=50.0) |
Constrain x to be greater than the value given by center . |
double constraint | ( | double | x, | |
double | center, | |||
double | width, | |||
double | height | |||
) | [inline] |
Constrain x
to be within width
of the value given by center
.
Defining
center
,
width
,
height
, this returns the value if
and
if
. The value at
or
is
and the value at
or
is
.
It is important to note that, for large distances of x
from center
, this only scales linearly. If you are trying to constrain a function which decreases more than linearly by making x
far from center
, then a minimizer will likely ignore this constraint.
Definition at line 237 of file minimize.h.
double cont_constraint | ( | double | x, | |
double | center, | |||
double | width, | |||
double | height, | |||
double | tightness = 40.0 , |
|||
double | exp_arg_limit = 50.0 | |||
) | [inline] |
Constrain x
to be within width
of the value given by center
.
Defining
center
,
width
,
height
,
tightness
, and
exp_arg_limit
, this returns the value
if .
The exponential is handled gracefully by assuming that anything smaller than is zero. This function is continuous and differentiable. Note that if
, then the function returns zero.
It is important to note that, for large distances of x
from center
, this only scales linearly. If you are trying to constrain a function which decreases more than linearly by making x
far from center
, then a minimizer will likely ignore this constraint.
Definition at line 272 of file minimize.h.
double cont_lower_bound | ( | double | x, | |
double | center, | |||
double | width, | |||
double | height, | |||
double | tightness = 40.0 , |
|||
double | exp_arg_limit = 50.0 | |||
) | [inline] |
Constrain x
to be greater than the value given by center
.
Defining
center
,
width
,
height
,
tightness
, and
exp_arg_limit
, this returns and has the advantage of being a continuous and differentiable function. The exponential is handled gracefully by assuming that anything smaller than
is zero
It is important to note that, for large distances of x
from center
, this only scales linearly. If you are trying to constrain a function which decreases more than linearly by making x
far from center
, then the constraint will be essentially ignored.
Definition at line 324 of file minimize.h.
double lower_bound | ( | double | x, | |
double | center, | |||
double | width, | |||
double | height | |||
) | [inline] |
Constrain x
to be greater than the value given by center
.
Defining
center
,
width
,
height
, this returns if
and zero otherwise. The value at
is
, while the value at
is
.
It is important to note that, for large distances of x
from center
, this only scales linearly. If you are trying to constrain a function which decreases more than linearly by making x
far from center
, then a minimizer will likely ignore this constraint.
Definition at line 300 of file minimize.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page