Candidate class contains arrays to be used by optimization algorithm to store data of a solution candidate.
More...
#include <candidate.h>
Candidate class contains arrays to be used by optimization algorithm to store data of a solution candidate.
◆ Candidate()
OptAlg class is friend of Candidate class and can access the arrays of solution candidates directly. However, the specific algorithms are not.
◆ init_can()
void Candidate::init_can |
( |
int |
numvar, |
|
|
int |
fit_size |
|
) |
| |
A function for allocating memories for storing information for a candidate solution.
- Parameters
-
numvar | number of variables |
fit_size | the number of objective functions |
◆ init_velocity()
void Candidate::init_velocity |
( |
| ) |
|
A function for allocating memory for additional information: velocity.
◆ put_to_global()
void Candidate::put_to_global |
( |
| ) |
|
A function for copying can_best array to global_best array.
◆ read_best()
void Candidate::read_best |
( |
double * |
output | ) |
|
A function for reading the can_best array to output array.
◆ read_bestfit()
double Candidate::read_bestfit |
( |
int |
i | ) |
|
|
inline |
A function for reading a fitness value.
- Parameters
-
i | index of fitness value to be read |
◆ read_bestt()
int Candidate::read_bestt |
( |
| ) |
|
|
inline |
A function for reading the number of times the best_fit has been averaged over.
◆ read_cont()
void Candidate::read_cont |
( |
double * |
output | ) |
|
A function for reading the contender array to output array.
◆ read_contfit()
double Candidate::read_contfit |
( |
int |
i | ) |
|
|
inline |
A function for reading a fitness value.
- Parameters
-
i | index of fitness value to be read |
◆ read_global()
void Candidate::read_global |
( |
double * |
output | ) |
|
A function for reading the global_best array to output array.
◆ read_globalfit()
double Candidate::read_globalfit |
( |
int |
i | ) |
|
|
inline |
A function for reading a fitness value.
- Parameters
-
i | index of fitness value to be read |
◆ read_vel()
void Candidate::read_vel |
( |
double * |
output | ) |
|
A function for reading the velocity array to output array.
◆ update_best()
void Candidate::update_best |
( |
| ) |
|
A function for putting the contender array to the can_best array.This is done by swapping pointers.
◆ update_cont()
void Candidate::update_cont |
( |
double * |
input | ) |
|
A function for copying onto the contender array from input.
◆ update_global()
void Candidate::update_global |
( |
double * |
input | ) |
|
A function for copying onto the global_best array from input.
◆ update_vel()
void Candidate::update_vel |
( |
double * |
input | ) |
|
A function for copying onto the velocity array from input.
◆ write_bestfit()
void Candidate::write_bestfit |
( |
double * |
fit | ) |
|
A function for copying an array of fitness values to best_fit array.
◆ write_contfit()
void Candidate::write_contfit |
( |
double * |
fit, |
|
|
int |
tt |
|
) |
| |
A function for copying an array of fitness values to cont_fit array.
◆ write_globalfit()
void Candidate::write_globalfit |
( |
double * |
fit | ) |
|
A function for copying an array of fitness values to global_fit array.
The documentation for this class was generated from the following files:
- C:/DATA/PROGRAM/GitHub/phase_estimation/src/candidate.h
- C:/DATA/PROGRAM/GitHub/phase_estimation/src/candidate.cpp