Problem class contains the prototype of the functions in the optimization problem that OptAlg class needs.
More...
#include <problem.h>
|
virtual void | fitness (double *soln, double *fitarray) |
|
virtual void | avg_fitness (double *soln, int K, double *fitarray) |
|
virtual bool | T_condition (double *fitarray, int *numvar, int N_cut, bool *mem_ptype, double *memory_forT) |
|
virtual bool | error_condition (double *current_fitarray, double *memory_fitarray, int data_size, double goal) |
|
virtual void | boundary (double *can1) |
|
Problem class contains the prototype of the functions in the optimization problem that OptAlg class needs.
◆ avg_fitness()
virtual void Problem::avg_fitness |
( |
double * |
soln, |
|
|
int |
K, |
|
|
double * |
fitarray |
|
) |
| |
|
inlinevirtual |
A function for calculating the fitness value. It allows a number of sample K to be passed into the function in case the fitness function is a statistical 'quantity'(?)
◆ boundary()
virtual void Problem::boundary |
( |
double * |
can1 | ) |
|
|
inlinevirtual |
This function is used to keep the solution candidate within the boundary of the search space.
◆ error_condition()
virtual bool Problem::error_condition |
( |
double * |
current_fitarray, |
|
|
double * |
memory_fitarray, |
|
|
int |
data_size, |
|
|
double |
goal |
|
) |
| |
|
inlinevirtual |
A function for calculating additional conditions for when optimization algorithm is set to accept solution from error bound.
◆ fitness()
virtual void Problem::fitness |
( |
double * |
soln, |
|
|
double * |
fitarray |
|
) |
| |
|
inlinevirtual |
A function intend to be a wrapper for changing conditions in which the fitness function is evaluated.
◆ T_condition()
virtual bool Problem::T_condition |
( |
double * |
fitarray, |
|
|
int * |
numvar, |
|
|
int |
N_cut, |
|
|
bool * |
mem_ptype, |
|
|
double * |
memory_forT |
|
) |
| |
|
inlinevirtual |
A function for calculating additional conditions for when the optimization algorithm is set to accept solution after time T.
◆ lower_bound
double* Problem::lower_bound |
Pointer to array storing the lower bound of the variables
◆ num
number of variables in the problem
◆ num_repeat
◆ upper_bound
double* Problem::upper_bound |
Pointer to array storing the upper bound of the variables
The documentation for this class was generated from the following file:
- C:/DATA/PROGRAM/GitHub/phase_estimation/src/problem.h