[Avida-SVN] r2678 - development/source/main

beckma24 at myxo.css.msu.edu beckma24 at myxo.css.msu.edu
Mon Jun 23 13:00:46 PDT 2008


Author: beckma24
Date: 2008-06-23 16:00:46 -0400 (Mon, 23 Jun 2008)
New Revision: 2678

Modified:
   development/source/main/cPopulation.cc
Log:
Changed cPopulation::CompeteDemes so that a deme with a count of 1 is re-injected into its self

Modified: development/source/main/cPopulation.cc
===================================================================
--- development/source/main/cPopulation.cc	2008-06-23 18:33:37 UTC (rev 2677)
+++ development/source/main/cPopulation.cc	2008-06-23 20:00:46 UTC (rev 2678)
@@ -1143,6 +1143,12 @@
     }
   }
   
+  //re-inject demes with count of 1 back into self
+  for(int i = 0; i < (int)deme_counts.size(); i++) {
+    if(deme_counts[i] == 1)
+      ReplaceDeme(deme_array[i], deme_array[i]);
+  }
+
   // Now, while we can find both a source deme (one with a count greater than 1)
   // and a target deme (one with a count of 0), replace the target with the source.
   while(true) {




More information about the Avida-cvs mailing list