summaryrefslogtreecommitdiff
path: root/src/explicitsimulation.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2019-08-08 09:59:41 -0700
committerMike Buland <eichlan@xagasoft.com>2019-08-08 09:59:41 -0700
commitca9f059a4295db6269728b0b747036f995c777a9 (patch)
tree849844f91121dfe0c9a6d974838ffa2220cd67f8 /src/explicitsimulation.cpp
parente9cfcc6dfc8427904ab227eea2452ccddd8f295c (diff)
downloadlibgenetic-ca9f059a4295db6269728b0b747036f995c777a9.tar.gz
libgenetic-ca9f059a4295db6269728b0b747036f995c777a9.tar.bz2
libgenetic-ca9f059a4295db6269728b0b747036f995c777a9.tar.xz
libgenetic-ca9f059a4295db6269728b0b747036f995c777a9.zip
Added more features to the simulation.
Diffstat (limited to '')
-rw-r--r--src/explicitsimulation.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/explicitsimulation.cpp b/src/explicitsimulation.cpp
index 95b721b..3e4edc3 100644
--- a/src/explicitsimulation.cpp
+++ b/src/explicitsimulation.cpp
@@ -140,6 +140,16 @@ Genetic::PhenotypeId Genetic::ExplicitSimulation::selectWeighted()
140 return uMaxFitness; 140 return uMaxFitness;
141} 141}
142 142
143Genetic::PhenotypeId Genetic::ExplicitSimulation::getMaxFitnessId() const
144{
145 return uMaxFitness;
146}
147
148Genetic::Phenotype *Genetic::ExplicitSimulation::getMaxFitnessPhenotype() const
149{
150 return xPop.getPhenotype( uMaxFitness );
151}
152
143void Genetic::ExplicitSimulation::updateFitness() 153void Genetic::ExplicitSimulation::updateFitness()
144{ 154{
145 mFitness.lock(); 155 mFitness.lock();