Candidates & Populations#
-
namespace gapp
class FitnessVector#
#include <population/candidate.hpp>
class FitnessMatrix#
#include <population/candidate.hpp>
class Chromosome#
#include <population/candidate.hpp>
class Candidate#
#include <population/candidate.hpp>
-
template<typename T>
struct Candidate# The class that is used to represent candidate solutions in all of the algorithms.
- Template Parameters:
T – The gene type used in the candidate’s chromosome.
Public Functions
-
inline explicit Candidate(size_t chrom_len)#
Create a candidate with an empty fitness vector and specific chromosome size. The genes of the chromosome will be default constructed.
- Parameters:
chrom_len – The length of the chromosome.
-
inline explicit Candidate(const Chromosome<T> &chrom)#
Create a candidate with an empty fitness vector and a given chromosome.
- Parameters:
chrom – The chromosome of the candidate.
-
inline explicit Candidate(Chromosome<T> &&chrom) noexcept#
Create a candidate with an empty fitness vector and a given chromosome.
- Parameters:
chrom – The chromosome of the candidate.
Public Members
-
FitnessVector fitness#
The fitness values of the solution (for every objective).
-
Chromosome<T> chromosome#
The chromosome encoding the solution.
-
bool is_evaluated = false#
True if the candidate’s fitness value doesn’t need to be computed.
-
template<typename T>
struct CandidatePair# A pair of candidates.
class Population#
#include <population/population.hpp>
class Bounds#
#include <population/candidate.hpp>
-
template<typename T>
class Bounds# The class used to represent the lower and upper bounds of a gene.
- Template Parameters:
T – The gene type. The lower and upper bounds will also be this type.