[Avida-SVN] r1373 - branches/dkdev/source/main
dknoester at myxo.css.msu.edu
dknoester at myxo.css.msu.edu
Tue Feb 27 06:04:42 PST 2007
Author: dknoester
Date: 2007-02-27 09:04:42 -0500 (Tue, 27 Feb 2007)
New Revision: 1373
Modified:
branches/dkdev/source/main/cStats.cc
branches/dkdev/source/main/cStats.h
Log:
Slightly less aggressive recording of generated topologies.
Modified: branches/dkdev/source/main/cStats.cc
===================================================================
--- branches/dkdev/source/main/cStats.cc 2007-02-27 00:40:39 UTC (rev 1372)
+++ branches/dkdev/source/main/cStats.cc 2007-02-27 14:04:42 UTC (rev 1373)
@@ -858,12 +858,7 @@
cDeme::Network& network = deme.GetNetwork();
++m_topo_numReplications;
m_topo_numEdges.Add(boost::num_edges(network));
-
- std::stringstream filename;
- filename << "./data/topo-" << GetUpdate() << ".dot";
- std::ofstream outfile(filename.str().c_str());
- boost::write_graphviz(outfile, network);
- outfile.close();
+ m_topo_lastNetwork = network;
}
@@ -877,4 +872,10 @@
m_topo_numReplications = 0;
m_topo_numEdges.Clear();
df.Endl();
+
+ std::stringstream netfile;
+ netfile << "./data/topo-" << GetUpdate() << ".dot";
+ std::ofstream outfile(netfile.str().c_str());
+ boost::write_graphviz(outfile, m_topo_lastNetwork);
+ outfile.close();
}
Modified: branches/dkdev/source/main/cStats.h
===================================================================
--- branches/dkdev/source/main/cStats.h 2007-02-27 00:40:39 UTC (rev 1372)
+++ branches/dkdev/source/main/cStats.h 2007-02-27 14:04:42 UTC (rev 1373)
@@ -203,6 +203,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.
cStats(); // @not_implemented
cStats(const cStats&); // @not_implemented
More information about the Avida-cvs
mailing list