[avida-cvs] avida(spatial) CVS commits: /current/doc events.html /current/source/event cPopulation.events /current/source/main genebank.cc genebank.hh

bdbaer avida-cvs at alife.org
Wed Oct 29 22:39:16 PST 2003


bdbaer		Wed Oct 29 14:39:16 2003 EDT

  Modified files:              (Branch: spatial)
    /avida/current/doc	events.html 
    /avida/current/source/event	cPopulation.events 
    /avida/current/source/main	genebank.cc genebank.hh 
  Log:
  Added headers to Detail/Historic population dump files
  
  Corrected spelling error in the event.html file
  
  
  
Index: avida/current/doc/events.html
diff -u avida/current/doc/events.html:1.8 avida/current/doc/events.html:1.8.2.1
--- avida/current/doc/events.html:1.8	Sat Aug 23 21:40:08 2003
+++ avida/current/doc/events.html	Wed Oct 29 14:39:15 2003
@@ -252,7 +252,7 @@
     Similar to apocalypse, but we specify the exact number of organisms to
     keep alive after the event.</li>
 <br>
-<li><b>kill_rectanle</b> [<font color="#008800">X1</font>] [<font
+<li><b>kill_rectangle</b> [<font color="#008800">X1</font>] [<font
 color="#008800">Y1</font>] [<font color="#008800">X2</font>] [<font 
 color="#008800">Y2</font>]<br>
     Kill off all organisms in a rectangle defined by the points (X1, Y1) and 
Index: avida/current/source/event/cPopulation.events
diff -u avida/current/source/event/cPopulation.events:1.42 avida/current/source/event/cPopulation.events:1.42.2.1
--- avida/current/source/event/cPopulation.events:1.42	Thu Aug  7 20:24:18 2003
+++ avida/current/source/event/cPopulation.events	Wed Oct 29 14:39:15 2003
@@ -583,6 +583,7 @@
   filename.Set("detail_pop.%d", population->GetUpdate());
 }
 ofstream fp(filename());
+fp << "\x23 Avida Detail Population Dump file. Update = " << population->GetUpdate() << endl;
 population->GetGenebank().DumpDetailedSummary(fp);
 
 detail_parasite_pop
@@ -624,6 +625,7 @@
   filename.Set("historic_dump.%d", population->GetUpdate());
 }
 ofstream fp(filename());
+fp << "\x23 Avida Historic Population Dump file. Update = " << population->GetUpdate() << endl;
 population->GetGenebank().DumpHistoricSummary(fp);
 
 dump_memory
Index: avida/current/source/main/genebank.cc
diff -u avida/current/source/main/genebank.cc:1.33 avida/current/source/main/genebank.cc:1.33.2.1
--- avida/current/source/main/genebank.cc:1.33	Thu Aug  7 20:24:19 2003
+++ avida/current/source/main/genebank.cc	Wed Oct 29 14:39:15 2003
@@ -1051,6 +1051,7 @@
 bool cGenebank::DumpDetailedSummary(ofstream & fp)
 {
   genotype_control->Reset(0);
+  DumpDetailHeading(fp);
   for (int i = 0; i < genotype_control->GetSize(); i++) {
     DumpDetailedEntry(genotype_control->Get(0), fp);
     genotype_control->Next(0);
@@ -1062,12 +1063,30 @@
 bool cGenebank::DumpHistoricSummary(ofstream & fp)
 {
   genotype_control->ResetHistoric(0);
+  DumpDetailHeading(fp);
   for (int i = 0; i < genotype_control->GetHistoricCount(); i++) {
     DumpDetailedEntry(genotype_control->Get(0), fp);
     genotype_control->Next(0);
   }
 
   return true;
+}
+
+void cGenebank::DumpDetailHeading (ofstream & fp)
+{
+  fp << "#  1: ID" << endl
+     << "#  2: parent ID" << endl
+     << "#  3: parent distance" << endl
+     << "#  4: number of orgranismsi currently alive" << endl
+     << "#  5: total number of organisms that ever existed" << endl
+     << "#  6: length of genome" << endl
+     << "#  7: merit" << endl
+     << "#  8: gestation time" << endl
+     << "#  9: fitness" << endl
+     << "# 10: update born" << endl
+     << "# 11: update deactivated" << endl
+     << "# 12: depth in phylogentic tree" << endl
+     << "# 13: genome of organism" << endl;
 }
 
 void cGenebank::DumpDetailedEntry(cGenotype * genotype, ofstream & fp)
Index: avida/current/source/main/genebank.hh
diff -u avida/current/source/main/genebank.hh:1.21 avida/current/source/main/genebank.hh:1.21.2.1
--- avida/current/source/main/genebank.hh:1.21	Thu Jul 31 16:03:35 2003
+++ avida/current/source/main/genebank.hh	Wed Oct 29 14:39:15 2003
@@ -196,6 +196,7 @@
   bool DumpTextSummary(std::ofstream & fp);
   bool DumpDetailedSummary(std::ofstream & fp);
   bool DumpHistoricSummary(std::ofstream & fp);
+  void DumpDetailHeading (std::ofstream & fp); 
   void DumpDetailedEntry(cGenotype * genotype, std::ofstream & fp);
   bool OK();
 






More information about the Avida-cvs mailing list