A single candidate solution in a genetic algorithm population.
More...
#include <individual.hpp>
template<typename Genotype, typename FitnessT = double>
struct pulsatrix::Individual< Genotype, FitnessT >
A single candidate solution in a genetic algorithm population.
- Template Parameters
-
| Genotype | The candidate solution's own representation (e.g. std::vector<double>). |
| FitnessT | The fitness value's type (default: double, single-objective, maximized). |
- Note
- Compile-time template design (Decision Point 4, campaign_exai_dl_library_evolutionary_deep_learning, resolved 2026-09-27): DEAP's
creator.create dynamically synthesizes an Individual class at runtime to work around Python's lack of compile-time generics – a plain templated aggregate expresses the same concept at compile time, with zero runtime class-synthesis cost. GA operators (selection.hpp) sit in this campaign's hottest inner loop (per-individual, per-generation), so static polymorphism is the deliberate default here, unlike DeviceBackend's runtime dispatch (which is unavoidable there – a Tensor doesn't know its device until runtime; a GA operator's identity is fixed at algorithm-design time).
◆ fitness
template<typename Genotype , typename FitnessT = double>
◆ genes
template<typename Genotype , typename FitnessT = double>
The documentation for this struct was generated from the following file: