[Avida-SVN] r1414 - branches/dkdev/source/main

dknoester at myxo.css.msu.edu dknoester at myxo.css.msu.edu
Tue Mar 20 12:52:09 PDT 2007


Author: dknoester
Date: 2007-03-20 15:52:09 -0400 (Tue, 20 Mar 2007)
New Revision: 1414

Modified:
   branches/dkdev/source/main/cStats.cc
   branches/dkdev/source/main/cStats.h
Log:
Logging for the genomes responsible for topo construction.

Modified: branches/dkdev/source/main/cStats.cc
===================================================================
--- branches/dkdev/source/main/cStats.cc	2007-03-20 19:36:01 UTC (rev 1413)
+++ branches/dkdev/source/main/cStats.cc	2007-03-20 19:52:09 UTC (rev 1414)
@@ -16,6 +16,7 @@
 #include "tDataEntry.h"
 #include "cWorld.h"
 #include "cWorldDriver.h"
+#include "cGenome.h"
 
 #include <float.h>
 #include <math.h>
@@ -859,6 +860,7 @@
   ++m_topo_numReplications;
   m_topo_numEdges.Add(boost::num_edges(network));
   m_topo_lastNetwork = network;
+  m_topo_germline = deme.GetGermline();
 }
 
 // Need to fix the vertices to contain the cell position.
@@ -891,4 +893,10 @@
 	std::ofstream outfile(netfile.str().c_str());
 	boost::write_graphviz(outfile, m_topo_lastNetwork, topo_vertex_writer(m_topo_lastNetwork));
 	outfile.close();
+  
+  netfile.clear();
+  netfile << "./data/germ-" << GetUpdate() << ".genome";
+  std::ofstream germfile(netfile.str().c_str());
+  germfile << m_topo_germline.GetLatest().AsString() << std::endl;
+  germfile.close();
 }

Modified: branches/dkdev/source/main/cStats.h
===================================================================
--- branches/dkdev/source/main/cStats.h	2007-03-20 19:36:01 UTC (rev 1413)
+++ branches/dkdev/source/main/cStats.h	2007-03-20 19:52:09 UTC (rev 1414)
@@ -24,6 +24,7 @@
 #include "tDataManager.h"
 #include "nGeometry.h"
 #include "cDeme.h"
+#include "cGermline.h"
 
 class cGenotype;
 class cInjectGenotype;
@@ -204,6 +205,7 @@
   int m_topo_numReplications; //!< Number of deme replications since the last stats output.
   cDoubleSum m_topo_numEdges; //!< Average number of edges per deme upon replication.
   cDeme::Network m_topo_lastNetwork; //!< The network resulting from the last replication.
+  cGermline m_topo_germline; //!< The germline that built the network above.
 
   cStats(); // @not_implemented
   cStats(const cStats&); // @not_implemented




More information about the Avida-cvs mailing list