Owns N independently-parameterized generator Modules.
More...
#include <generator_population.hpp>
|
| | GeneratorPopulation (std::vector< std::unique_ptr< Module > > generators) |
| |
| size_t | size () const |
| |
| Module & | generator (size_t index) |
| |
| const Module & | generator (size_t index) const |
| |
| void | ReplaceGenerator (size_t index, std::unique_ptr< Module > new_generator) |
| | Replaces population member index with new_generator – the concrete mechanism a future survivor-selection step (Phase 5 Mission 1) will use to install a mutated offspring in place of its parent.
|
| |
Owns N independently-parameterized generator Modules.
◆ GeneratorPopulation()
| pulsatrix::GeneratorPopulation::GeneratorPopulation |
( |
std::vector< std::unique_ptr< Module > > |
generators | ) |
|
|
inlineexplicit |
- Exceptions
-
| std::invalid_argument | if generators is empty or any entry is null. |
◆ generator() [1/2]
| Module & pulsatrix::GeneratorPopulation::generator |
( |
size_t |
index | ) |
|
|
inline |
- Exceptions
-
| std::out_of_range | if index >= size(). |
◆ generator() [2/2]
| const Module & pulsatrix::GeneratorPopulation::generator |
( |
size_t |
index | ) |
const |
|
inline |
◆ ReplaceGenerator()
| void pulsatrix::GeneratorPopulation::ReplaceGenerator |
( |
size_t |
index, |
|
|
std::unique_ptr< Module > |
new_generator |
|
) |
| |
|
inline |
Replaces population member index with new_generator – the concrete mechanism a future survivor-selection step (Phase 5 Mission 1) will use to install a mutated offspring in place of its parent.
- Exceptions
-
| std::invalid_argument | if new_generator is null. |
| std::out_of_range | if index >= size(). |
◆ size()
| size_t pulsatrix::GeneratorPopulation::size |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: