[avida-cvs] avida CVS commits: /current/source/main analyze.cc
dule123
avida-cvs at alife.org
Wed Dec 17 05:11:32 PST 2003
dule123 Tue Dec 16 21:11:32 2003 EDT
Modified files:
/avida/current/source/main analyze.cc
Log:
Added an option to specify the file name for printing out a genotype
in the analyze mode. This is useful for printing out a single genotype,
and will not work well if the batch has more than one genotype in it
(first one will go into the specified file, other will be named as before).
Filename is the second (optional) argument, and if it's not specified,
everything will remain as before.
Index: avida/current/source/main/analyze.cc
diff -u avida/current/source/main/analyze.cc:1.89 avida/current/source/main/analyze.cc:1.90
--- avida/current/source/main/analyze.cc:1.89 Wed Dec 10 13:56:57 2003
+++ avida/current/source/main/analyze.cc Tue Dec 16 21:11:31 2003
@@ -767,8 +767,15 @@
cAnalyzeGenotype * genotype = NULL;
while ((genotype = batch_it.Next()) != NULL) {
cString filename(directory);
- filename += genotype->GetName();
- filename += ".gen";
+
+ if (cur_string.GetSize() > 0) {
+ filename += cur_string.PopWord();
+ }
+ else {
+ filename += genotype->GetName();
+ filename += ".gen";
+ }
+
cTestUtil::PrintGenome(genotype->GetGenome(), filename);
if (verbose) cout << "Printing: " << filename << endl;
}
More information about the Avida-cvs
mailing list