3 #include <boost/numeric/ublas/matrix_proxy.hpp>
4 #include <boost/numeric/ublas/io.hpp>
8 namespace ublas = boost::numeric::ublas;
11 StandardPropagation::StandardPropagation(
GeneralSelect*
const LocalSelect,
32 for (
int i = 0; i < popsize - 1; i += 2)
45 ublas::row(NewPopulation, i) = Son;
46 ublas::row(NewPopulation, i + 1) = Daughter;
49 if ((popsize % 2) != 0)
55 ublas::row(NewPopulation, popsize - 1) = Son;
The base class for the population of a genetic algorithm, implements storage and access functions...
GeneralSelect is the abstract base class for any selection mechanism in genetic algorithms.
The base class for genetic algorithm propagation methods.
virtual ~StandardPropagation()
virtual void Mutation(tpopmember &child)
ublas::vector< bool > tpopmember
GeneralPopulation *const Population
virtual void Crossover(tpopmember &father, tpopmember &mother)
GeneralSelect *const Select
void SetPopulation(const tpopulation &LocalPop)
The base class for all random number generators, defines the basic interface.
const tpopulation & GetPopulation() const
virtual void NextGeneration()