[Avida-SVN] r2259 - branches/matt/PairwiseEpistasis/source/analyze
matt at myxo.css.msu.edu
matt at myxo.css.msu.edu
Tue Jan 8 13:33:34 PST 2008
Author: matt
Date: 2008-01-08 16:33:34 -0500 (Tue, 08 Jan 2008)
New Revision: 2259
Modified:
branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc
Log:
Used correct code to break out of loop.
Modified: branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc
===================================================================
--- branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc 2008-01-08 21:30:07 UTC (rev 2258)
+++ branches/matt/PairwiseEpistasis/source/analyze/cAnalyze.cc 2008-01-08 21:33:34 UTC (rev 2259)
@@ -7052,7 +7052,8 @@
int dist_from_A = 0; // Number of mutations from genotype_A
tArray<bool> mutated_from_A(genotype_0->GetAlignedSequence().GetSize());
mutated_from_A.SetAll(false);
-
+ bool performed_reversion = false; //Was there anything to revert?
+
for (int AB = A+1; AB < batch_size; AB++){
genotype_AB = lineage.GetPos(AB);
dist_from_A += genotype_AB->GetParentDist();
@@ -7092,7 +7093,6 @@
//Revert "background" to remove mutation from genotype0 to genotypeA
cString tmp_B; // Debugging string
- bool performed_reversion = false; //Was there anything to revert?
for (int k = 0; k < reversion.GetSize(); k++){
switch(reversion[k]){
case '+': // Insertion from 0 to A, so remove site all together
@@ -7127,8 +7127,8 @@
break;
}
}
- if (!performed_reversion) // Mutation 0->A has been removed from the background.
- continue;
+ if (!performed_reversion) // Mutation 0->A has been removed from the background skip this pair.
+ break; // Move on to next 0,A pairing
// Get our fitness values
double fitness_A = genotype_A->GetFitness();
More information about the Avida-cvs
mailing list