[Avida-cvs] [avida-svn] r785 - in development/source: actions main
brysonda@myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Wed Jun 28 13:06:33 PDT 2006
Author: brysonda
Date: 2006-06-28 16:06:33 -0400 (Wed, 28 Jun 2006)
New Revision: 785
Modified:
development/source/actions/LandscapeActions.cc
development/source/main/cMutationalNeighborhood.cc
development/source/main/cMutationalNeighborhood.h
development/source/main/cMutationalNeighborhoodResults.h
Log:
Add two step data aggregation to MutationalNeighborhood.
Modified: development/source/actions/LandscapeActions.cc
===================================================================
--- development/source/actions/LandscapeActions.cc 2006-06-28 07:40:28 UTC (rev 784)
+++ development/source/actions/LandscapeActions.cc 2006-06-28 20:06:33 UTC (rev 785)
@@ -388,8 +388,16 @@
{
private:
cString m_filename;
- tList<cMutationalNeighborhood> m_batch;
+ struct sBatchEntry {
+ cMutationalNeighborhood* mutn;
+ int depth;
+
+ sBatchEntry(cMutationalNeighborhood* in_mutn, int in_depth) : mutn(in_mutn), depth(in_depth) { ; }
+ ~sBatchEntry() { delete mutn; }
+ };
+ tList<sBatchEntry> m_batch;
+
public:
cActionMutationalNeighborhood(cWorld* world, const cString& args)
: cAction(world, args), m_filename("mut-neighborhood.dat")
@@ -405,7 +413,6 @@
void Process(cAvidaContext& ctx)
{
- int update = -1;
cMutationalNeighborhood* mutn = NULL;
cInstSet& inst_set = m_world->GetHardwareManager().GetInstSet();
@@ -423,29 +430,29 @@
cAnalyzeGenotype* genotype = NULL;
while (genotype = batch_it.Next()) {
mutn = new cMutationalNeighborhood(m_world, genotype->GetGenome(), inst_set);
- m_batch.PushRear(mutn);
+ m_batch.PushRear(new sBatchEntry(mutn, genotype->GetDepth()));
jobqueue.AddJob(new tAnalyzeJob<cMutationalNeighborhood>(mutn, &cMutationalNeighborhood::Process));
}
jobqueue.Execute();
} else {
if (m_world->GetConfig().VERBOSITY.Get() >= VERBOSE_DETAILS)
- m_world->GetDriver().NotifyComment("Full Landscaping...");
+ m_world->GetDriver().NotifyComment("Calculating Mutational Neighborhood...");
const cGenome& best_genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
mutn = new cMutationalNeighborhood(m_world, best_genome, inst_set);
- m_batch.PushRear(mutn);
+ m_batch.PushRear(new sBatchEntry(mutn, m_world->GetStats().GetUpdate()));
mutn->Process(ctx);
- update = m_world->GetStats().GetUpdate();
}
cMutationalNeighborhoodResults* results = NULL;
+ sBatchEntry* entry = NULL;
cDataFile& df = m_world->GetDataFile(m_filename);
- while (mutn = m_batch.Pop()) {
- results = new cMutationalNeighborhoodResults(mutn);
- results->PrintStats(df, update);
+ while (entry = m_batch.Pop()) {
+ results = new cMutationalNeighborhoodResults(entry->mutn);
+ results->PrintStats(df, entry->depth);
delete results;
- delete mutn;
+ delete entry;
}
}
};
Modified: development/source/main/cMutationalNeighborhood.cc
===================================================================
--- development/source/main/cMutationalNeighborhood.cc 2006-06-28 07:40:28 UTC (rev 784)
+++ development/source/main/cMutationalNeighborhood.cc 2006-06-28 20:06:33 UTC (rev 785)
@@ -209,55 +209,109 @@
void cMutationalNeighborhood::ProcessComplete(cAvidaContext& ctx)
{
// Initialize values
- m_total = 0;
- m_total_sqr_fitness = 0.0;
- m_dead = 0;
- m_neg = 0;
- m_neut = 0;
- m_pos = 0;
- m_size_pos = 0.0;
- m_size_neg = 0.0;
- m_peak_fitness = m_base_fitness;
- m_peak_genome = m_base_genome;
- m_site_count.Resize(m_base_genome.GetSize(), 0);
+ m_o_total = 0;
+ m_o_total_sqr_fitness = 0.0;
+ m_o_dead = 0;
+ m_o_neg = 0;
+ m_o_neut = 0;
+ m_o_pos = 0;
+ m_o_size_pos = 0.0;
+ m_o_size_neg = 0.0;
+ m_o_peak_fitness = m_base_fitness;
+ m_o_peak_genome = m_base_genome;
+ m_o_site_count.Resize(m_base_genome.GetSize(), 0);
+ m_o_total_entropy = 0;
+ m_o_task_target = 0;
+ m_o_task_total = 0;
+ m_o_task_knockout = 0;
for (int i = 0; i < m_onestep.GetSize(); i++) {
sOneStep& odata = m_onestep[i];
- m_total += odata.total;
- m_total_fitness += odata.total_fitness;
- m_total_sqr_fitness += odata.total_sqr_fitness;
- m_dead += odata.dead;
- m_neg += odata.neg;
- m_neut += odata.neut;
- m_pos += odata.pos;
- m_size_pos += odata.size_pos;
- m_size_neg += odata.size_neg;
+ m_o_total += odata.total;
+ m_o_total_fitness += odata.total_fitness;
+ m_o_total_sqr_fitness += odata.total_sqr_fitness;
+ m_o_dead += odata.dead;
+ m_o_neg += odata.neg;
+ m_o_neut += odata.neut;
+ m_o_pos += odata.pos;
+ m_o_size_pos += odata.size_pos;
+ m_o_size_neg += odata.size_neg;
- if (odata.peak_fitness > m_peak_fitness) {
- m_peak_genome = odata.peak_genome;
- m_peak_fitness = odata.peak_fitness;
+ if (odata.peak_fitness > m_o_peak_fitness) {
+ m_o_peak_genome = odata.peak_genome;
+ m_o_peak_fitness = odata.peak_fitness;
}
- for (int j = 0; j < m_site_count.GetSize(); j++) {
- m_site_count[j] += odata.site_count[j];
+ for (int j = 0; j < m_o_site_count.GetSize(); j++) {
+ m_o_site_count[j] += odata.site_count[j];
}
// @TODO - aggregate task data
}
- double max_ent = log(static_cast<double>(m_inst_set.GetSize()));
- m_total_entropy = 0;
+ const double max_ent = log(static_cast<double>(m_inst_set.GetSize()));
for (int i = 0; i < m_base_genome.GetSize(); i++) {
// Per-site entropy is the log of the number of legal states for that
// site. Add one to account for the unmutated state.
- m_total_entropy += log(static_cast<double>(m_site_count[i] + 1)) / max_ent;
+ m_o_total_entropy += log(static_cast<double>(m_o_site_count[i] + 1)) / max_ent;
}
- m_complexity = m_base_genome.GetSize() - m_total_entropy;
+ m_o_complexity = m_base_genome.GetSize() - m_o_total_entropy;
- // @TODO - aggregate two step task data
+ // Initialize values
+ m_t_total = 0;
+ m_t_total_sqr_fitness = 0.0;
+ m_t_dead = 0;
+ m_t_neg = 0;
+ m_t_neut = 0;
+ m_t_pos = 0;
+ m_t_size_pos = 0.0;
+ m_t_size_neg = 0.0;
+ m_t_peak_fitness = m_base_fitness;
+ m_t_peak_genome = m_base_genome;
+ m_t_site_count.Resize(m_base_genome.GetSize(), 0);
+ m_t_total_entropy = 0;
+ m_t_task_target = 0;
+ m_t_task_target_pos = 0;
+ m_t_task_target_neg = 0;
+ m_t_task_target_neut = 0;
+ m_t_task_target_dead = 0;
+ m_t_task_total = 0;
+ m_t_task_knockout = 0;
+
+ for (int i = 0; i < m_twostep.GetSize(); i++) {
+ sTwoStep& tdata = m_twostep[i];
+ m_t_total += tdata.total;
+ m_t_total_fitness += tdata.total_fitness;
+ m_t_total_sqr_fitness += tdata.total_sqr_fitness;
+ m_t_dead += tdata.dead;
+ m_t_neg += tdata.neg;
+ m_t_neut += tdata.neut;
+ m_t_pos += tdata.pos;
+ m_t_size_pos += tdata.size_pos;
+ m_t_size_neg += tdata.size_neg;
+
+ if (tdata.peak_fitness > m_t_peak_fitness) {
+ m_t_peak_genome = tdata.peak_genome;
+ m_t_peak_fitness = tdata.peak_fitness;
+ }
+
+
+ for (int j = 0; j < m_t_site_count.GetSize(); j++) {
+ m_t_site_count[j] += tdata.site_count[j];
+ }
+
+ // @TODO - aggregate task data
+ }
+ for (int i = 0; i < m_base_genome.GetSize(); i++) {
+ // Per-site entropy is the log of the number of legal states for that
+ // site. Add one to account for the unmutated state.
+ m_t_total_entropy += log(static_cast<double>(m_t_site_count[i] + 1)) / max_ent;
+ }
+ m_t_complexity = m_base_genome.GetSize() - m_t_total_entropy;
+
pthread_rwlock_unlock(&m_rwlock);
}
@@ -265,38 +319,48 @@
void cMutationalNeighborhood::PrintStats(cDataFile& df, int update)
{
- df.Write(update, "Update");
- df.Write(m_base_fitness, "Base Fitness");
- df.Write(m_base_merit, "Base Merit");
- df.Write(m_base_gestation, "Base Gestation");
- df.Write(m_total, "Total One Step Mutants");
- df.Write(GetProbDead(), "One Step Probability Dead");
- df.Write(GetProbNeg(), "One Step Probability Deleterious");
- df.Write(GetProbNeut(), "One Step Probability Neutral");
- df.Write(GetProbPos(), "One Step Probability Positive");
- df.Write(GetAvPosSize(), "One Step Average Positive Size");
- df.Write(GetAvNegSize(), "One Step Average Negative Size");
- df.Write(m_peak_fitness, "One Step Peak Fitness");
- df.Write(GetAveFitness(), "One Step Average Fitness");
- df.Write(GetAveSqrFitness(), "One Step Average Square Fitness");
- df.Write(m_total_entropy, "One Step Total Entropy");
- df.Write(m_complexity, "One Step Total Complexity");
- df.Endl();
-}
+ df.Write(update, "Update/Tree Depth");
+
+ df.Write(GetBaseFitness(), "Base Fitness");
+ df.Write(GetBaseMerit(), "Base Merit");
+ df.Write(GetBaseGestation(), "Base Gestation");
+ df.Write(GetBaseGenome().GetSize(), "Base Genome Length");
-void cMutationalNeighborhood::PrintEntropy(cDataFile& df)
-{
- double max_ent = log(static_cast<double>(m_inst_set.GetSize()));
- for (int j = 0; j < m_base_genome.GetSize(); j++) {
- df.Write(log(static_cast<double>(m_site_count[j] + 1)) / max_ent, " ");
- }
- df.Endl();
-}
+ df.Write(GetSingleTotal(), "Total One Step Mutants");
+ df.Write(GetSingleProbPos(), "One Step Probability Positive");
+ df.Write(GetSingleProbNeg(), "One Step Probability Deleterious");
+ df.Write(GetSingleProbNeut(), "One Step Probability Neutral");
+ df.Write(GetSingleProbDead(), "One Step Probability Dead");
+ df.Write(GetSingleAverageSizePos(), "One Step Average Positive Size");
+ df.Write(GetSingleAverageSizeNeg(), "One Step Average Negative Size");
+ df.Write(GetSinglePeakFitness(), "One Step Peak Fitness");
+ df.Write(GetSingleAverageFitness(), "One Step Average Fitness");
+ df.Write(GetSingleAverageSqrFitness(), "One Step Average Square Fitness");
+ df.Write(GetSingleTotalEntropy(), "One Step Total Entropy");
+ df.Write(GetSingleComplexity(), "One Step Total Complexity");
+ df.Write(GetSingleProbTargetTask(), "One Step Probability Confers Target Task");
+ df.Write(GetSingleProbTask(), "One Step Probability Confers Any Task");
+ df.Write(GetSingleProbKnockout(), "One Step Probability Knockout Task");
-void cMutationalNeighborhood::PrintSiteCount(cDataFile& df)
-{
- for (int j = 0; j < m_base_genome.GetSize(); j++) {
- df.Write(m_site_count[j], " ");
- }
+ df.Write(GetDoubleTotal(), "Total Two Step Mutants");
+ df.Write(GetDoubleProbPos(), "Two Step Probability Positive");
+ df.Write(GetDoubleProbNeg(), "Two Step Probability Deleterious");
+ df.Write(GetDoubleProbDead(), "Two Step Probability Fatal");
+ df.Write(GetDoubleProbNeut(), "Two Step Probability Neutral");
+ df.Write(GetDoubleAverageSizePos(), "Two Step Average Positive Size");
+ df.Write(GetDoubleAverageSizeNeg(), "Two Step Average Negative Size");
+ df.Write(GetDoublePeakFitness(), "Two Step Peak Fitness");
+ df.Write(GetDoubleAverageFitness(), "Two Step Average Fitness");
+ df.Write(GetDoubleAverageSqrFitness(), "Two Step Average Square Fitness");
+ df.Write(GetDoubleTotalEntropy(), "Two Step Total Entropy");
+ df.Write(GetDoubleComplexity(), "Two Step Total Complexity");
+ df.Write(GetDoubleProbTargetTask(), "Two Step Probability Confers Target Task");
+ df.Write(GetDoubleProbTargetTaskPos(), "Two Step Prob. Confers Target - Previous Positive");
+ df.Write(GetDoubleProbTargetTaskNeg(), "Two Step Prob. Confers Target - Previous Deleterious");
+ df.Write(GetDoubleProbTargetTaskNeut(), "Two Step Prob. Confers Target - Previous Neutral");
+ df.Write(GetDoubleProbTargetTaskDead(), "Two Step Prob. Confers Target - Previous Fatal");
+ df.Write(GetDoubleProbTask(), "Two Step Probability Confers Any Task");
+ df.Write(GetDoubleProbKnockout(), "Two Step Probability Knockout Task");
+
df.Endl();
}
Modified: development/source/main/cMutationalNeighborhood.h
===================================================================
--- development/source/main/cMutationalNeighborhood.h 2006-06-28 07:40:28 UTC (rev 784)
+++ development/source/main/cMutationalNeighborhood.h 2006-06-28 20:06:33 UTC (rev 785)
@@ -122,42 +122,61 @@
double m_neut_min; // These two variables are a range around the base
double m_neut_max; // fitness to be counted as neutral mutations.
- // Aggregated data
+ // Aggregated One Step Data
// --------------------------------------------------------------------------
- int m_total;
+ int m_o_total;
- double m_total_fitness;
- double m_total_sqr_fitness;
- cGenome m_peak_genome;
- double m_peak_fitness;
+ double m_o_total_fitness;
+ double m_o_total_sqr_fitness;
+ cGenome m_o_peak_genome;
+ double m_o_peak_fitness;
- int m_dead;
- int m_neg;
- int m_neut;
- int m_pos;
- double m_size_pos;
- double m_size_neg;
+ int m_o_dead;
+ int m_o_neg;
+ int m_o_neut;
+ int m_o_pos;
+ double m_o_size_pos;
+ double m_o_size_neg;
- tArray<int> m_site_count;
+ tArray<int> m_o_site_count;
- double m_total_entropy;
- double m_complexity;
+ double m_o_total_entropy;
+ double m_o_complexity;
- // Single step task totals
- int m_stask_target;
- int m_stask_total;
- int m_stask_knockout;
+ int m_o_task_target;
+ int m_o_task_total;
+ int m_o_task_knockout;
- // Two step task totals
- int m_ttask_target;
- int m_ttask_target_pos;
- int m_ttask_target_neg;
- int m_ttask_target_neut;
- int m_ttask_target_dead;
- int m_ttask_total;
- int m_ttask_knockout;
+ // Aggregated Two Step Data
+ // --------------------------------------------------------------------------
+ int m_t_total;
+ double m_t_total_fitness;
+ double m_t_total_sqr_fitness;
+ cGenome m_t_peak_genome;
+ double m_t_peak_fitness;
+
+ int m_t_dead;
+ int m_t_neg;
+ int m_t_neut;
+ int m_t_pos;
+ double m_t_size_pos;
+ double m_t_size_neg;
+
+ tArray<int> m_t_site_count;
+
+ double m_t_total_entropy;
+ double m_t_complexity;
+ int m_t_task_target;
+ int m_t_task_target_pos;
+ int m_t_task_target_neg;
+ int m_t_task_target_neut;
+ int m_t_task_target_dead;
+ int m_t_task_total;
+ int m_t_task_knockout;
+
+
void ProcessInitialize(cAvidaContext& ctx);
void ProcessOneStep(cAvidaContext& ctx, cTestCPU* testcpu, cCPUTestInfo& test_info, int cur_site);
void ProcessTwoStep(cAvidaContext& ctx, cTestCPU* testcpu, cCPUTestInfo& test_info, int cur_site, cGenome& mod_genome);
@@ -189,50 +208,68 @@
// These methods can only be accessed via a cMutationalNeighborhoodResults object
private:
void PrintStats(cDataFile& df, int update = -1);
- void PrintEntropy(cDataFile& df);
- void PrintSiteCount(cDataFile& df);
inline const cGenome& GetBaseGenome() const { return m_base_genome; }
inline double GetBaseFitness() const { return m_base_fitness; }
+ inline double GetBaseMerit() const { return m_base_merit; }
+ inline double GetBaseGestation() const { return m_base_gestation; }
- inline int GetTotal() const { return m_total; }
+ inline int GetSingleTotal() const { return m_o_total; }
- inline double GetAveFitness() const { return m_total_fitness / m_total; }
- inline double GetAveSqrFitness() const { return m_total_sqr_fitness / m_total; }
- inline const cGenome& GetPeakGenome() const { return m_peak_genome; }
- inline double GetPeakFitness() const { return m_peak_fitness; }
+ inline double GetSingleAverageFitness() const { return m_o_total_fitness / m_o_total; }
+ inline double GetSingleAverageSqrFitness() const { return m_o_total_sqr_fitness / m_o_total; }
+ inline const cGenome& GetSinglePeakGenome() const { return m_o_peak_genome; }
+ inline double GetSinglePeakFitness() const { return m_o_peak_fitness; }
- inline double GetProbDead() const { return static_cast<double>(m_dead) / m_total; }
- inline double GetProbNeg() const { return static_cast<double>(m_neg) / m_total; }
- inline double GetProbNeut() const { return static_cast<double>(m_neut) / m_total; }
- inline double GetProbPos() const { return static_cast<double>(m_pos) / m_total; }
- inline double GetAvPosSize() const { if (m_pos == 0) return 0.0; else return m_size_pos / m_pos; }
- inline double GetAvNegSize() const { if (m_neg == 0) return 0.0; else return m_size_neg / m_neg; }
+ inline double GetSingleProbDead() const { return static_cast<double>(m_o_dead) / m_o_total; }
+ inline double GetSingleProbNeg() const { return static_cast<double>(m_o_neg) / m_o_total; }
+ inline double GetSingleProbNeut() const { return static_cast<double>(m_o_neut) / m_o_total; }
+ inline double GetSingleProbPos() const { return static_cast<double>(m_o_pos) / m_o_total; }
+ inline double GetSingleAverageSizePos() const { if (m_o_pos == 0) return 0.0; else return m_o_size_pos / m_o_pos; }
+ inline double GetSingleAverageSizeNeg() const { if (m_o_neg == 0) return 0.0; else return m_o_size_neg / m_o_neg; }
- inline double GetTotalEntropy() const { return m_total_entropy; }
- inline double GetComplexity() const { return m_complexity; }
+ inline double GetSingleTotalEntropy() const { return m_o_total_entropy; }
+ inline double GetSingleComplexity() const { return m_o_complexity; }
+
+ inline int GetSingleTargetTask() const { return m_o_task_target; }
+ inline double GetSingleProbTargetTask() const { return static_cast<double>(m_o_task_target) / m_o_total; }
+ inline int GetSingleTask() const { return m_o_task_total; }
+ inline double GetSingleProbTask() const { return static_cast<double>(m_o_task_total) / m_o_total; }
+ inline int GetSingleKnockout() const { return m_o_task_knockout; }
+ inline double GetSingleProbKnockout() const { return static_cast<double>(m_o_task_knockout) / m_o_total; }
- inline int GetSingleTargetTask() const { return m_stask_target; }
- inline double GetProbSingleTargetTask() const { return static_cast<double>(m_stask_target) / m_total; }
- inline int GetSingleTask() const { return m_stask_total; }
- inline double GetProbSingleTask() const { return static_cast<double>(m_stask_total) / m_total; }
- inline int GetSingleKnockout() const { return m_stask_knockout; }
- inline double GetProbSingleKnockout() const { return static_cast<double>(m_stask_knockout) / m_total; }
- inline int GetDoubleTargetTask() const { return m_ttask_target; }
- inline double GetProbDoubleTargetTask() const { return static_cast<double>(m_ttask_target) / m_total; }
- inline int GetDoubleTargetTaskPos() const { return m_ttask_target_pos; }
- inline double GetProbDoubleTargetTaskPos() const { return static_cast<double>(m_ttask_target_pos) / m_total; }
- inline int GetDoubleTargetTaskNeg() const { return m_ttask_target_neg; }
- inline double GetProbDoubleTargetTaskNeg() const { return static_cast<double>(m_ttask_target_neg) / m_total; }
- inline int GetDoubleTargetTaskNeut() const { return m_ttask_target_neut; }
- inline double GetProbDoubleTargetTaskNeut() const { return static_cast<double>(m_ttask_target_neut) / m_total; }
- inline int GetDoubleTargetTaskDead() const { return m_ttask_target_dead; }
- inline double GetProbDoubleTargetTaskDead() const { return static_cast<double>(m_ttask_target_dead) / m_total; }
- inline int GetDoubleTask() const { return m_stask_total; }
- inline double GetProbDoubleTask() const { return static_cast<double>(m_stask_total) / m_total; }
- inline int GetDoubleKnockout() const { return m_stask_knockout; }
- inline double GetProbDoubleKnockout() const { return static_cast<double>(m_stask_knockout) / m_total; }
+ inline int GetDoubleTotal() const { return m_t_total; }
+
+ inline double GetDoubleAverageFitness() const { return m_t_total_fitness / m_t_total; }
+ inline double GetDoubleAverageSqrFitness() const { return m_t_total_sqr_fitness / m_t_total; }
+ inline const cGenome& GetDoublePeakGenome() const { return m_t_peak_genome; }
+ inline double GetDoublePeakFitness() const { return m_t_peak_fitness; }
+
+ inline double GetDoubleProbDead() const { return static_cast<double>(m_t_dead) / m_t_total; }
+ inline double GetDoubleProbNeg() const { return static_cast<double>(m_t_neg) / m_t_total; }
+ inline double GetDoubleProbNeut() const { return static_cast<double>(m_t_neut) / m_t_total; }
+ inline double GetDoubleProbPos() const { return static_cast<double>(m_t_pos) / m_t_total; }
+ inline double GetDoubleAverageSizePos() const { if (m_t_pos == 0) return 0.0; else return m_t_size_pos / m_t_pos; }
+ inline double GetDoubleAverageSizeNeg() const { if (m_t_neg == 0) return 0.0; else return m_t_size_neg / m_t_neg; }
+
+ inline double GetDoubleTotalEntropy() const { return m_t_total_entropy; }
+ inline double GetDoubleComplexity() const { return m_t_complexity; }
+
+ inline int GetDoubleTargetTask() const { return m_t_task_target; }
+ inline double GetDoubleProbTargetTask() const { return static_cast<double>(m_t_task_target) / m_t_total; }
+ inline int GetDoubleTargetTaskPos() const { return m_t_task_target_pos; }
+ inline double GetDoubleProbTargetTaskPos() const { return static_cast<double>(m_t_task_target_pos) / m_t_total; }
+ inline int GetDoubleTargetTaskNeg() const { return m_t_task_target_neg; }
+ inline double GetDoubleProbTargetTaskNeg() const { return static_cast<double>(m_t_task_target_neg) / m_t_total; }
+ inline int GetDoubleTargetTaskNeut() const { return m_t_task_target_neut; }
+ inline double GetDoubleProbTargetTaskNeut() const { return static_cast<double>(m_t_task_target_neut) / m_t_total; }
+ inline int GetDoubleTargetTaskDead() const { return m_t_task_target_dead; }
+ inline double GetDoubleProbTargetTaskDead() const { return static_cast<double>(m_t_task_target_dead) / m_t_total; }
+ inline int GetDoubleTask() const { return m_t_task_total; }
+ inline double GetDoubleProbTask() const { return static_cast<double>(m_t_task_total) / m_t_total; }
+ inline int GetDoubleKnockout() const { return m_t_task_knockout; }
+ inline double GetDoubleProbKnockout() const { return static_cast<double>(m_t_task_knockout) / m_t_total; }
};
Modified: development/source/main/cMutationalNeighborhoodResults.h
===================================================================
--- development/source/main/cMutationalNeighborhoodResults.h 2006-06-28 07:40:28 UTC (rev 784)
+++ development/source/main/cMutationalNeighborhoodResults.h 2006-06-28 20:06:33 UTC (rev 785)
@@ -39,50 +39,68 @@
}
inline void PrintStats(cDataFile& df, int update = -1) const { m_src.PrintStats(df, update); }
- inline void PrintEntropy(cDataFile& df) const { m_src.PrintEntropy(df); }
- inline void PrintSiteCount(cDataFile& df) const { m_src.PrintSiteCount(df); }
inline const cGenome& GetBaseGenome() const { return m_src.GetBaseGenome(); }
inline double GetBaseFitness() const { return m_src.GetBaseFitness(); }
+ inline double GetBaseMerit() const { return m_src.GetBaseMerit(); }
+ inline double GetBaseGestation() const { return m_src.GetBaseGestation(); }
- inline int GetTotal() const { return m_src.GetTotal(); }
+ inline int GetSingleTotal() const { return m_src.GetSingleTotal(); }
- inline double GetAveFitness() const { return m_src.GetAveFitness(); }
- inline double GetAveSqrFitness() const { return m_src.GetAveSqrFitness(); }
- inline const cGenome& GetPeakGenome() const { return m_src.GetPeakGenome(); }
- inline double GetPeakFitness() const { return m_src.GetPeakFitness(); }
+ inline double GetSingleAverageFitness() const { return m_src.GetSingleAverageFitness(); }
+ inline double GetSingleAverageSqrFitness() const { return m_src.GetSingleAverageSqrFitness(); }
+ inline const cGenome& GetSinglePeakGenome() const { return m_src.GetSinglePeakGenome(); }
+ inline double GetSinglePeakFitness() const { return m_src.GetSinglePeakFitness(); }
- inline double GetProbDead() const { return m_src.GetProbDead(); }
- inline double GetProbNeg() const { return m_src.GetProbNeg(); }
- inline double GetProbNeut() const { return m_src.GetProbNeut(); }
- inline double GetProbPos() const { return m_src.GetProbPos(); }
- inline double GetAvPosSize() const { return m_src.GetAvPosSize(); }
- inline double GetAvNegSize() const { return m_src.GetAvNegSize(); }
+ inline double GetSingleProbDead() const { return m_src.GetSingleProbDead(); }
+ inline double GetSingleProbNeg() const { return m_src.GetSingleProbNeg(); }
+ inline double GetSingleProbNeut() const { return m_src.GetSingleProbNeut(); }
+ inline double GetSingleProbPos() const { return m_src.GetSingleProbPos(); }
+ inline double GetSingleAverageSizePos() const { return m_src.GetSingleAverageSizePos(); }
+ inline double GetSingleAverageSizeNeg() const { return m_src.GetSingleAverageSizeNeg(); }
- inline double GetTotalEntropy() const { return m_src.GetTotalEntropy(); }
- inline double GetComplexity() const { return m_src.GetComplexity(); }
+ inline double GetSingleTotalEntropy() const { return m_src.GetSingleTotalEntropy(); }
+ inline double GetSingleComplexity() const { return m_src.GetSingleComplexity(); }
inline int GetSingleTargetTask() const { return m_src.GetSingleTargetTask(); }
- inline double GetProbSingleTargetTask() const { return m_src.GetProbSingleTargetTask(); }
- inline int GetSingleTask() const { return m_src.GetProbSingleTask(); }
- inline double GetProbSingleTask() const { return m_src.GetProbSingleTask(); }
+ inline double GetSingleProbTargetTask() const { return m_src.GetSingleProbTargetTask(); }
+ inline int GetSingleTask() const { return m_src.GetSingleProbTask(); }
+ inline double GetSingleProbTask() const { return m_src.GetSingleProbTask(); }
inline int GetSingleKnockout() const { return m_src.GetSingleKnockout(); }
- inline double GetProbSingleKnockout() const { return m_src.GetProbSingleKnockout(); }
+ inline double GetSingleProbKnockout() const { return m_src.GetSingleProbKnockout(); }
+
+ inline int GetDoubleTotal() const { return m_src.GetDoubleTotal(); }
+
+ inline double GetDoubleAverageFitness() const { return m_src.GetDoubleAverageFitness(); }
+ inline double GetDoubleAverageSqrFitness() const { return m_src.GetDoubleAverageSqrFitness(); }
+ inline const cGenome& GetDoublePeakGenome() const { return m_src.GetDoublePeakGenome(); }
+ inline double GetDoublePeakFitness() const { return m_src.GetDoublePeakFitness(); }
+
+ inline double GetDoubleProbDead() const { return m_src.GetDoubleProbDead(); }
+ inline double GetDoubleProbNeg() const { return m_src.GetDoubleProbNeg(); }
+ inline double GetDoubleProbNeut() const { return m_src.GetDoubleProbNeut(); }
+ inline double GetDoubleProbPos() const { return m_src.GetDoubleProbPos(); }
+ inline double GetDoubleAverageSizePos() const { return m_src.GetDoubleAverageSizePos(); }
+ inline double GetDoubleAverageSizeNeg() const { return m_src.GetDoubleAverageSizeNeg(); }
+
+ inline double GetDoubleTotalEntropy() const { return m_src.GetDoubleTotalEntropy(); }
+ inline double GetDoubleComplexity() const { return m_src.GetDoubleComplexity(); }
+
inline int GetDoubleTargetTask() const { return m_src.GetDoubleTargetTask(); }
- inline double GetProbDoubleTargetTask() const { return m_src.GetProbDoubleTargetTask(); }
+ inline double GetDoubleProbTargetTask() const { return m_src.GetDoubleProbTargetTask(); }
inline int GetDoubleTargetTaskPos() const { return m_src.GetDoubleTargetTaskPos(); }
- inline double GetProbDoubleTargetTaskPos() const { return m_src.GetProbDoubleTargetTaskPos(); }
+ inline double GetDoubleProbTargetTaskPos() const { return m_src.GetDoubleProbTargetTaskPos(); }
inline int GetDoubleTargetTaskNeg() const { return m_src.GetDoubleTargetTaskNeg(); }
- inline double GetProbDoubleTargetTaskNeg() const { return m_src.GetProbDoubleTargetTaskNeg(); }
+ inline double GetDoubleProbTargetTaskNeg() const { return m_src.GetDoubleProbTargetTaskNeg(); }
inline int GetDoubleTargetTaskNeut() const { return m_src.GetDoubleTargetTaskNeut(); }
- inline double GetProbDoubleTargetTaskNeut() const { return m_src.GetProbDoubleTargetTaskNeut(); }
+ inline double GetDoubleProbTargetTaskNeut() const { return m_src.GetDoubleProbTargetTaskNeut(); }
inline int GetDoubleTargetTaskDead() const { return m_src.GetDoubleTargetTaskDead(); }
- inline double GetProbDoubleTargetTaskDead() const { return m_src.GetProbDoubleTargetTaskDead(); }
- inline int GetDoubleTask() const { return m_src.GetProbDoubleTask(); }
- inline double GetProbDoubleTask() const { return m_src.GetProbDoubleTask(); }
+ inline double GetDoubleProbTargetTaskDead() const { return m_src.GetDoubleProbTargetTaskDead(); }
+ inline int GetDoubleTask() const { return m_src.GetDoubleProbTask(); }
+ inline double GetDoubleProbTask() const { return m_src.GetDoubleProbTask(); }
inline int GetDoubleKnockout() const { return m_src.GetDoubleKnockout(); }
- inline double GetProbDoubleKnockout() const { return m_src.GetProbDoubleKnockout(); }
+ inline double GetDoubleProbKnockout() const { return m_src.GetDoubleProbKnockout(); }
};
#endif
More information about the Avida-cvs
mailing list