diff options
author | Mike Buland <eichlan@xagasoft.com> | 2019-08-08 09:59:41 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2019-08-08 09:59:41 -0700 |
commit | ca9f059a4295db6269728b0b747036f995c777a9 (patch) | |
tree | 849844f91121dfe0c9a6d974838ffa2220cd67f8 /src/explicitsimulation.cpp | |
parent | e9cfcc6dfc8427904ab227eea2452ccddd8f295c (diff) | |
download | libgenetic-ca9f059a4295db6269728b0b747036f995c777a9.tar.gz libgenetic-ca9f059a4295db6269728b0b747036f995c777a9.tar.bz2 libgenetic-ca9f059a4295db6269728b0b747036f995c777a9.tar.xz libgenetic-ca9f059a4295db6269728b0b747036f995c777a9.zip |
Added more features to the simulation.
Diffstat (limited to 'src/explicitsimulation.cpp')
-rw-r--r-- | src/explicitsimulation.cpp | 10 |
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 | ||
143 | Genetic::PhenotypeId Genetic::ExplicitSimulation::getMaxFitnessId() const | ||
144 | { | ||
145 | return uMaxFitness; | ||
146 | } | ||
147 | |||
148 | Genetic::Phenotype *Genetic::ExplicitSimulation::getMaxFitnessPhenotype() const | ||
149 | { | ||
150 | return xPop.getPhenotype( uMaxFitness ); | ||
151 | } | ||
152 | |||
143 | void Genetic::ExplicitSimulation::updateFitness() | 153 | void Genetic::ExplicitSimulation::updateFitness() |
144 | { | 154 | { |
145 | mFitness.lock(); | 155 | mFitness.lock(); |