[Avida-SVN] r2895 - branches/hjg-dev/source/main

hjg at myxo.css.msu.edu hjg at myxo.css.msu.edu
Tue Oct 28 20:08:13 PDT 2008


Author: hjg
Date: 2008-10-28 23:08:13 -0400 (Tue, 28 Oct 2008)
New Revision: 2895

Modified:
   branches/hjg-dev/source/main/cStats.cc
Log:


Modified: branches/hjg-dev/source/main/cStats.cc
===================================================================
--- branches/hjg-dev/source/main/cStats.cc	2008-10-29 02:55:38 UTC (rev 2894)
+++ branches/hjg-dev/source/main/cStats.cc	2008-10-29 03:08:13 UTC (rev 2895)
@@ -1725,6 +1725,8 @@
 	cDoubleSum reciprocations; 
 	cDoubleSum donors;
 	cDoubleSum recip_prob_change;
+	cDoubleSum k;
+
 	// difference between how many an organism donated & how many it received
 	cDoubleSum disparity;
 
@@ -1732,7 +1734,7 @@
 	int min_rep = 100; 
 	int max_rep = 0;
 	int cur_rep;
-	int pop_size = 0;
+//	int pop_size = 0;
 	int num_alt =0;
 	int num_coop = 0;
 	
@@ -1756,7 +1758,8 @@
 		reciprocations.Add(org->GetNumberOfReciprocations());
 		donors.Add(org->GetNumberOfDonors());
 		recip_prob_change.Add(org->GetChangeInRecipProb());
-		pop_size++;
+		k.Add(org->GetK());
+//		pop_size++;
 		
 		disparity.Add(org->GetNumberOfDonations() - org->GetOtherRawMaterials()); 
 		
@@ -1778,6 +1781,7 @@
 
 	df.Write(num_alt, "Number of altruists [altruists]");
 	df.Write(num_coop, "Number of cooperators [cooperators]");
+	df.Write(k.Average(), "Avg. k of organisms [k]");
 
 
 	




More information about the Avida-cvs mailing list