dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
Sorter.h File Reference
#include <dignea/core/Problem.h>
#include <dignea/utilities/Comparator.h>
#include <dignea/utilities/exceptions/EmptyPopulation.h>
#include <dignea/utilities/exceptions/OutOfRange.h>
#include <algorithm>
#include <iostream>
#include <ranges>

Go to the source code of this file.

Functions

template<typename S >
void sortByObj (vector< S > &population, const int &objNumber, const Problem< S > *problem)
 Sorts the population of individuals by the given objective according to the problem. The problem must be given to check whether the objective is to Minimize or Maximize. More...
 
template<typename S >
void sortByFitness (vector< S > &population)
 Sorts the population by fitness in descending order. More...
 
template<typename S >
void sortByCrowDistance (vector< S > &population)
 Sorts the population by their crow distance value in descending order. More...
 
template<typename S >
void crowOrder (vector< S > &population, const Problem< S > *problem)
 
template<class S >
vector< vector< S > > fastNonDominatedSort (vector< S > &population, const Problem< S > *problem)
 Fast Non Dominated Sorting operator. Sorts the population in different fronts Used in NSGA-II. More...
 

Detailed Description

Author
Alejandro Marrero (amarr.nosp@m.erd@.nosp@m.ull.e.nosp@m.du.e.nosp@m.s)
Version
0.1
Date
2020-12-02

Function Documentation

◆ crowOrder()

template<typename S >
void crowOrder ( vector< S > &  population,
const Problem< S > *  problem 
)
Template Parameters
S
Parameters
population
problem

◆ fastNonDominatedSort()

template<class S >
vector<vector<S> > fastNonDominatedSort ( vector< S > &  population,
const Problem< S > *  problem 
)

Fast Non Dominated Sorting operator. Sorts the population in different fronts Used in NSGA-II.

Template Parameters
S
Parameters
notClassified
Returns
vector<vector>

◆ sortByCrowDistance()

template<typename S >
void sortByCrowDistance ( vector< S > &  population)

Sorts the population by their crow distance value in descending order.

Template Parameters
S
Parameters
population

◆ sortByFitness()

template<typename S >
void sortByFitness ( vector< S > &  population)

Sorts the population by fitness in descending order.

Template Parameters
S
Parameters
population

◆ sortByObj()

template<typename S >
void sortByObj ( vector< S > &  population,
const int &  objNumber,
const Problem< S > *  problem 
)

Sorts the population of individuals by the given objective according to the problem. The problem must be given to check whether the objective is to Minimize or Maximize.

Template Parameters
S
Parameters
population
objNumber
problem