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

DE class contains the functions that are specific to this particular optimization algorithm. More...

#include <mpi_optalg.h>

Inheritance diagram for DE:
OptAlg

Public Member Functions

 DE (Problem *problem_ptr, Rng *gaussian_rng, int pop_size)
 
void put_to_best ()
 
void combination ()
 
void selection ()
 
void fit_to_global ()
 
void find_global ()
 
void write_param (double *param_array)
 
void read_param (double *param_array)
 
- Public Member Functions inherited from OptAlg
 OptAlg (Problem *problem_ptr, Rng *gaussian_rng, int pop_size)
 
void Init_population (int psize)
 
void Init_previous (double prev_dev, double new_dev, int psize, double *prev_soln)
 
void Cont_fitness (int p)
 
void Best_fitness (int p)
 
void update_popfit ()
 
void set_success (int iter, bool goal)
 
bool check_success (int t, double *current_fitarray, double *memory_fitarray, int data_size, double t_goal, bool *mem_ptype, int *numvar, int N_cut, double *memory_forT)
 
double Final_select (double *fit, double *solution, double *fitarray)
 
double avg_Final_select (double *solution, int repeat, double *soln_fit, double *fitarray)
 
void dev_gen (double *dev_array, double prev_dev, double new_dev, int cut_off)
 
int find_max (double *fit)
 

Additional Inherited Members

- Public Attributes inherited from OptAlg
Problemprob
 
bool success
 
bool policy_type
 
- Protected Attributes inherited from OptAlg
int num
 
int num_fit
 
Rng * gaussian_rng
 
int pop_size
 
int T
 
int t
 
Candidatepop
 
bool goal
 
int total_pop
 
int my_rank
 
int nb_proc
 

Detailed Description

DE class contains the functions that are specific to this particular optimization algorithm.

Member Function Documentation

◆ combination()

void DE::combination ( )
virtual

This function main purpose is to prepare the population for optimization after the population is initialized and the first calculation of the fitness function.

Combination() generates the next generation of candidates. First, all the candidate give their best array to the zeroth processor who then generates the new candidate and send it back to the parent candidate. The parent store the new array into the contender and compute the mean fitness value.

Reimplemented from OptAlg.

◆ find_global()

void DE::find_global ( )
inlinevirtual

This function copies memories on best array to global array.

Reimplemented from OptAlg.

◆ fit_to_global()

void DE::fit_to_global ( )
virtual

This function reads the search parameters that are currently in use.

Reimplemented from OptAlg.

◆ read_param()

void DE::read_param ( double *  param_array)
virtual

This function let the user specify new values to the search parameters.

Reimplemented from OptAlg.

◆ selection()

void DE::selection ( )
virtual

This function generates new candidates that competes with the existing population. This is one potential bottleneck in the communication between processors.

Selection() reads the mean fitness value of best array and contender and decides which one is to be the member of the population. In this version, we simple select the one with the higher fitness value.

Reimplemented from OptAlg.

◆ write_param()

void DE::write_param ( double *  param_array)
virtual

This function performs selects the candidates for the next round of iteration.

Reimplemented from OptAlg.


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