Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <adaptative_parameter_value.h>
Public Member Functions | |
AdaptiveParameterValue (double initial_value) | |
Initial value is in [0.0, 1.0], both 0.0 and 1.0 are valid. | |
void | Reset () |
void | Increase () |
void | Decrease () |
void | Update (int num_decreases, int num_increases) |
double | value () const |
Basic adaptive [0.0, 1.0] parameter that can be increased or decreased with a step that get smaller and smaller with the number of updates.
After a while, if the probability of getting a Decrease() vs Increase() when running at a given value is f(value), then this should converge towards a value such that f(value) = 0.5 provided f is a non-decreasing function over [0.0, 1.0].
Definition at line 35 of file adaptative_parameter_value.h.
|
inlineexplicit |
Initial value is in [0.0, 1.0], both 0.0 and 1.0 are valid.
Definition at line 38 of file adaptative_parameter_value.h.
|
inline |
Definition at line 48 of file adaptative_parameter_value.h.
|
inline |
Definition at line 43 of file adaptative_parameter_value.h.
|
inline |
Definition at line 41 of file adaptative_parameter_value.h.
|
inline |
If we get more than 1 datapoints from the same value(), we use a formula that is more sound than calling n times Increase()/Decrease() which depends on the order of calls.
Definition at line 56 of file adaptative_parameter_value.h.
|
inline |
Definition at line 68 of file adaptative_parameter_value.h.