[Avida-SVN] r3223 - development/source/actions
ruppmatt at myxo.css.msu.edu
ruppmatt at myxo.css.msu.edu
Mon May 4 09:08:53 PDT 2009
Author: ruppmatt
Date: 2009-05-04 12:08:53 -0400 (Mon, 04 May 2009)
New Revision: 3223
Modified:
development/source/actions/PrintActions.cc
Log:
Adjust for bins properly in previous task prob histogram submission.
Modified: development/source/actions/PrintActions.cc
===================================================================
--- development/source/actions/PrintActions.cc 2009-05-04 16:01:35 UTC (rev 3222)
+++ development/source/actions/PrintActions.cc 2009-05-04 16:08:53 UTC (rev 3223)
@@ -1686,7 +1686,7 @@
tArray<double> task_prob = genotype->GetTaskProbabilities();
int weight = (m_weighted) ? genotype->GetNumCPUs() : 1;
for (int k = 0; k < task_prob.GetSize(); k++){
- int bin_id = (task_prob[k] < 1.0) ? ceil( ( static_cast<int>(task_prob[k] * 100 ) / 5 )) : 21;
+ int bin_id = (task_prob[k] < 1.0) ? ceil( ( (task_prob[k] * 100 ) / 5 )) : 21;
m_bins(k,bin_id) += weight;
}
}
@@ -1698,7 +1698,7 @@
int weight = (m_weighted) ? genotype->GetNumOrganisms() : 1;
tArray<double> task_prob = genotype->GetTaskProbabilities(ctx);
for (int k = 0; k < task_prob.GetSize(); k++){
- int bin_id = (task_prob[k] < 1.0) ? ceil( ( static_cast<int>(task_prob[k] * 100 ) / 5 )) : 21;
+ int bin_id = (task_prob[k] < 1.0) ? ceil( ( task_prob[k] * 100 )/ 5 )) : 21;
m_bins(k,bin_id) += weight;
}
genotype = genotype->GetNext();
More information about the Avida-cvs
mailing list