#include <dignea/core/Solution.h>
#include <dignea/distances/Distance.h>
#include <dignea/searches/NoveltySearch.h>
#include <functional>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
Go to the source code of this file.
|
using | neighborT = pair< float, int > |
| Data type which represents a close neighbours. The first value is the distance to the individual The second value is the index of the neighbour in the array (Distance_to_other, other_index) More...
|
|
using | neighVector = vector< neighborT > |
| Vector of neighbours Each element is of type neighborT. [(Distance_to_other_0, other_index_0), (Distance_to_other_1, other_index_1), (...), (Distance_to_other_n-1, other_index_n-1)]. More...
|
|
using | neighMatrix = vector< neighVector > |
| Data type which represents a matrix of close neighbours. The first value is the index of the neighbour in the array The second value is the distance to the individual [ [ (Distance_to_other_0, other_index_0), (Distance_to_other_1, other_index_1), (...), (Distance_to_other_n-1, other_index_n-1) ], [ (Distance_to_other_0, other_index_0), (Distance_to_other_1, other_index_1), (...), (Distance_to_other_n-1, other_index_n-1) ] ]. More...
|
|
using | Descriptor = vector< float > |
|
|
vector< float > | sparseness (const vector< Descriptor > &population, Distance< float > *metric, const int k) |
| Computes the sparseness of all individuals in the population vector Based on the Novelty Search from Exploiting Open-Endedness to Solve Problems Through the Search for Novelty. More...
|
|
float | sparseness (const Descriptor &solution, const vector< Descriptor > &population, Distance< float > *metric, const int k) |
| Computes the sparseness score of the individual against the rest of individuals in the population list Based on the Novelty Search from Exploiting Open-Endedness to Solve Problems Through the Search for Novelty. More...
|
|
- Author
- Alejandro Marrero (amarr.nosp@m.erd@.nosp@m.ull.e.nosp@m.du.e.nosp@m.s)
- Version
- 0.1
- Date
- 2022-10-11
- Copyright
- Copyright (c) 2022
◆ neighborT
Data type which represents a close neighbours. The first value is the distance to the individual The second value is the index of the neighbour in the array (Distance_to_other, other_index)
- Template Parameters
-
◆ neighMatrix
Data type which represents a matrix of close neighbours. The first value is the index of the neighbour in the array The second value is the distance to the individual [ [ (Distance_to_other_0, other_index_0), (Distance_to_other_1, other_index_1), (...), (Distance_to_other_n-1, other_index_n-1) ], [ (Distance_to_other_0, other_index_0), (Distance_to_other_1, other_index_1), (...), (Distance_to_other_n-1, other_index_n-1) ] ].
- Template Parameters
-
◆ neighVector
Vector of neighbours Each element is of type neighborT. [(Distance_to_other_0, other_index_0), (Distance_to_other_1, other_index_1), (...), (Distance_to_other_n-1, other_index_n-1)].
- Template Parameters
-
◆ sparseness() [1/2]
float sparseness |
( |
const Descriptor & |
solution, |
|
|
const vector< Descriptor > & |
population, |
|
|
Distance< float > * |
metric, |
|
|
const int |
k |
|
) |
| |
Computes the sparseness score of the individual against the rest of individuals in the population list Based on the Novelty Search from Exploiting Open-Endedness to Solve Problems Through the Search for Novelty.
- Template Parameters
-
- Parameters
-
individual | |
neighbours | |
metric | |
k | |
- Returns
- T
◆ sparseness() [2/2]
vector<float> sparseness |
( |
const vector< Descriptor > & |
population, |
|
|
Distance< float > * |
metric, |
|
|
const int |
k |
|
) |
| |
Computes the sparseness of all individuals in the population vector Based on the Novelty Search from Exploiting Open-Endedness to Solve Problems Through the Search for Novelty.
- Template Parameters
-
- Parameters
-
individual | |
neighbours | |
metric | |
k | |
- Returns
- T