pulsatrix
Loading...
Searching...
No Matches
pulsatrix::Individual< Genotype, FitnessT > Struct Template Reference

A single candidate solution in a genetic algorithm population. More...

#include <individual.hpp>

Public Attributes

Genotype genes
 
FitnessT fitness {}
 

Detailed Description

template<typename Genotype, typename FitnessT = double>
struct pulsatrix::Individual< Genotype, FitnessT >

A single candidate solution in a genetic algorithm population.

Template Parameters
GenotypeThe candidate solution's own representation (e.g. std::vector<double>).
FitnessTThe 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).

Member Data Documentation

◆ fitness

template<typename Genotype , typename FitnessT = double>
FitnessT pulsatrix::Individual< Genotype, FitnessT >::fitness {}

◆ genes

template<typename Genotype , typename FitnessT = double>
Genotype pulsatrix::Individual< Genotype, FitnessT >::genes

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