Pallas Solver  0.1
C++ Global Optimization Algorithms
Public Member Functions | List of all members
pallas::BoundedStepFunction Class Reference

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>

Inheritance diagram for pallas::BoundedStepFunction:
Inheritance graph
[legend]
Collaboration diagram for pallas::BoundedStepFunction:
Collaboration graph
[legend]

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...
 
- Public Member Functions inherited from pallas::StepFunction
virtual ~StepFunction ()
 Destructor.
 

Detailed Description

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.

Parameters
step_sizedouble. Maximum magnitude a degree of freedom can be changed from its current position.
upper_boundsdouble*. Pointer to the upper bounds on the candidate's variables.
lower_boundsdouble*. Pointer to the lower bounds on the candidate's variables.
num_parametersunsigned int. The number of parameters to modify in x.

Constructor & Destructor Documentation

pallas::BoundedStepFunction::BoundedStepFunction ( double  step_size,
const double *  upper_bounds,
const double *  lower_bounds,
unsigned int  num_parameters 
)

Constructor.

Parameters
step_sizedouble. Maximum magnitude a degree of freedom can be changed from its current position.
upper_boundsdouble*. Pointer to the upper bounds on the candidate's variables.
lower_boundsdouble*. Pointer to the lower bounds on the candidate's variables.
num_parametersunsigned int. The number of parameters to modify in x. Should also be the number of constraints held within the upper and lower bounds.

Member Function Documentation

void pallas::BoundedStepFunction::Step ( double *  x,
unsigned int  num_parameters 
)
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.

Parameters
xdouble*. 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.


The documentation for this class was generated from the following files: