pulsatrix
Loading...
Searching...
No Matches
pulsatrix::GeneratorPopulation Class Reference

Owns N independently-parameterized generator Modules. More...

#include <generator_population.hpp>

Public Member Functions

 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.
 

Detailed Description

Owns N independently-parameterized generator Modules.

Constructor & Destructor Documentation

◆ GeneratorPopulation()

pulsatrix::GeneratorPopulation::GeneratorPopulation ( std::vector< std::unique_ptr< Module > >  generators)
inlineexplicit
Exceptions
std::invalid_argumentif generators is empty or any entry is null.

Member Function Documentation

◆ generator() [1/2]

Module & pulsatrix::GeneratorPopulation::generator ( size_t  index)
inline
Exceptions
std::out_of_rangeif 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_argumentif new_generator is null.
std::out_of_rangeif index >= size().

◆ size()

size_t pulsatrix::GeneratorPopulation::size ( ) const
inline

The documentation for this class was generated from the following file: