Evolutionary Algorithm for Adaptive Phase Estimation  1.0.2
Public Member Functions | Public Attributes | List of all members
Problem Class Reference

Problem class contains the prototype of the functions in the optimization problem that OptAlg class needs. More...

#include <problem.h>

Inheritance diagram for Problem:
Phase

Public Member Functions

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)
 

Public Attributes

double * lower_bound
 
double * upper_bound
 
int num
 
int num_repeat
 
int num_fit
 

Detailed Description

Problem class contains the prototype of the functions in the optimization problem that OptAlg class needs.

Member Function Documentation

◆ 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.

Member Data Documentation

◆ lower_bound

double* Problem::lower_bound

Pointer to array storing the lower bound of the variables

◆ num

int Problem::num

number of variables in the problem

◆ num_repeat

int Problem::num_repeat

number of repeats

◆ 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: