Pallas Solver
0.1
C++ Global Optimization Algorithms
|
A new candidate solution is generated between upper and lower bounds. Each degree of freedom in the candidate solution is at most step_size
from the current solution.
More...
#include <step_function.h>
Public Member Functions | |
BoundedStepFunction (double step_size, const double *upper_bounds, const double *lower_bounds, unsigned int num_parameters) | |
Constructor. More... | |
void | Step (double *x, unsigned int num_parameters) |
Modifies x in place to a new random position. More... | |
![]() | |
virtual | ~StepFunction () |
Destructor. | |
A new candidate solution is generated between upper and lower bounds. Each degree of freedom in the candidate solution is at most step_size
from the current solution.
step_size | double. Maximum magnitude a degree of freedom can be changed from its current position. |
upper_bounds | double*. Pointer to the upper bounds on the candidate's variables. |
lower_bounds | double*. Pointer to the lower bounds on the candidate's variables. |
num_parameters | unsigned int. The number of parameters to modify in x . |
pallas::BoundedStepFunction::BoundedStepFunction | ( | double | step_size, |
const double * | upper_bounds, | ||
const double * | lower_bounds, | ||
unsigned int | num_parameters | ||
) |
Constructor.
step_size | double. Maximum magnitude a degree of freedom can be changed from its current position. |
upper_bounds | double*. Pointer to the upper bounds on the candidate's variables. |
lower_bounds | double*. Pointer to the lower bounds on the candidate's variables. |
num_parameters | unsigned int. The number of parameters to modify in x . Should also be the number of constraints held within the upper and lower bounds. |
|
virtual |
Modifies x
in place to a new random position.
The maximum difference between the old and new position for each degree of freedom is determined by the step_size
. If any degree of freedom exceeds the upper or lower bounds, it is adjusted to fall within the boundary.
x | double*. The current state of the parameters. Modified in place to achieve new state. |
num_parameters. | unsigned int. The number of parameters to modify in x . |
Implements pallas::StepFunction.