dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
Weighted< AbstractInstance > Class Template Reference

Weighted Fitness Function used from evaluating the instances in EIG. This functions performs a linear weighted sum of the performance fitness of the instances and their novelty to calculate their final fitness. More...

#include <Weighted.h>

Public Member Functions

 Weighted (const float &fRatio, const float &dRatio)
 Construct a new Weighted object with the corresponding fitness ratio and diversity ratio. More...
 
void computeFitness (vector< AbstractInstance > &solutions)
 Computes the actual fitness of the solutions based on the fitness pre-defined in the instances and their diversity. More...
 
std::tuple< float, float > getFAndNRatios ()
 Returns a tuple containing the fitness and novelty ratio in that order! More...
 

Detailed Description

template<class AbstractInstance>
class Weighted< AbstractInstance >

Weighted Fitness Function used from evaluating the instances in EIG. This functions performs a linear weighted sum of the performance fitness of the instances and their novelty to calculate their final fitness.

Template Parameters
AbstractInstance

Constructor & Destructor Documentation

◆ Weighted()

template<class AbstractInstance >
Weighted< AbstractInstance >::Weighted ( const float &  fRatio,
const float &  dRatio 
)

Construct a new Weighted object with the corresponding fitness ratio and diversity ratio.

Template Parameters
AbstractInstance
Parameters
fRatioWeight of the fitness in the final fitness.
dRatioWeight of the novelty in the final fitness.

Member Function Documentation

◆ computeFitness()

template<class AbstractInstance >
void Weighted< AbstractInstance >::computeFitness ( vector< AbstractInstance > &  solutions)

Computes the actual fitness of the solutions based on the fitness pre-defined in the instances and their diversity.

The selection of different ratios determine whether the generated instances will be completely biased (and well clustered) or more dispersed

Template Parameters
AbstractInstance
Parameters
solutions

◆ getFAndNRatios()

template<class AbstractInstance >
std::tuple<float, float> Weighted< AbstractInstance >::getFAndNRatios ( )
inline

Returns a tuple containing the fitness and novelty ratio in that order!

Returns
std::tuple<float, float>

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