Interface IEvolvable<TGene, T>
- Namespace
- AiDotNet.Interfaces
- Assembly
- AiDotNet.dll
Represents an individual that can evolve through genetic operations.
public interface IEvolvable<TGene, T> where TGene : class
Type Parameters
TGeneThe type representing a gene in the genetic model.
TThe numeric type used for fitness calculations.
Methods
Clone()
Creates a deep clone of this individual.
IEvolvable<TGene, T> Clone()
Returns
- IEvolvable<TGene, T>
A clone of this individual.
GetFitness()
Gets the fitness of this individual.
T GetFitness()
Returns
- T
The fitness score.
GetGenes()
Gets the genes of this individual.
ICollection<TGene> GetGenes()
Returns
- ICollection<TGene>
The collection of genes.
SetFitness(T)
Sets the fitness of this individual.
void SetFitness(T fitness)
Parameters
fitnessTThe fitness score to set.
SetGenes(ICollection<TGene>)
Sets the genes of this individual.
void SetGenes(ICollection<TGene> genes)
Parameters
genesICollection<TGene>The genes to set.