#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.
|
| 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...
|
| |
- 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
- Copyright
- Copyright (c) 2022
◆ crowOrder()
template<typename S >
| void crowOrder |
( |
vector< S > & |
population, |
|
|
const Problem< S > * |
problem |
|
) |
| |
- Template Parameters
-
- Parameters
-
◆ 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
-
- Parameters
-
- 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
-
- Parameters
-
◆ sortByFitness()
template<typename S >
| void sortByFitness |
( |
vector< S > & |
population | ) |
|
Sorts the population by fitness in descending order.
- Template Parameters
-
- Parameters
-
◆ 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
-
- Parameters
-
| population | |
| objNumber | |
| problem | |