![]() |
Ultra 0.9.4
|
#include "kernel/population.h"#include <array>#include <cstddef>#include <functional>#include <span>Go to the source code of this file.
Classes | |
| class | ultra::alps_layer_pair< Layer > |
| struct | ultra::alps::parameters |
Namespaces | |
| namespace | ultra |
Functions | |
| template<class Layer> | |
| ultra::alps_layer_pair (Layer &) -> alps_layer_pair< Layer > | |
| template<class Layer> | |
| ultra::alps_layer_pair (Layer &, Layer &) -> alps_layer_pair< Layer > | |
| template<class Layer> | |
| ultra::alps_layer_pair (const Layer &) -> alps_layer_pair< const Layer > | |
| template<class Layer> | |
| ultra::alps_layer_pair (const Layer &, const Layer &) -> alps_layer_pair< const Layer > | |
| template<LayeredPopulation P> | |
| void | ultra::alps::set_age (P &pop) |
| template<LayeredPopulation P> | |
| alps_layer_pair< typename P::layer_t > | ultra::alps::replacement_layers (P &pop, typename P::layer_iter l) |
| template<LayeredPopulation P> | |
| alps_layer_pair< const typename P::layer_t > | ultra::alps::selection_layers (const P &pop, typename P::layer_const_iter l) |
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/
| alps_layer_pair< typename P::layer_t > ultra::alps::replacement_layers | ( | P & | pop, |
| typename P::layer_iter | l ) |
Determines the set of layers whose individuals may be replaced by offspring generated from the specified layer.
| [in] | pop | layered population |
| [in] | l | iterator to the layer producing the offspring |
In the ALPS paradigm, replacement is restricted in order to preserve age stratification. Individuals are typically replaced either within the same layer or, in some cases, in the oldest layer.
The replacement policy implemented here is:
| alps_layer_pair< const typename P::layer_t > ultra::alps::selection_layers | ( | const P & | pop, |
| typename P::layer_const_iter | l ) |
Determines the set of layers from which parents may be selected when generating offspring for the specified layer.
| [in] | pop | layered population |
| [in] | l | iterator to the layer for which parents are being selected |
In ALPS, parent selection is typically restricted to the same age layer or younger ones, preventing older individuals from influencing younger layers.
The selection policy implemented here is: