[avida-cvs] avida CVS commits: /current/source/event cPopulation.events /current/source/main genebank.cc genebank.hh
bdbaer
avida-cvs at alife.org
Fri Oct 31 14:48:45 PST 2003
bdbaer Fri Oct 31 06:48:45 2003 EDT
Modified files:
/avida/current/source/event cPopulation.events
/avida/current/source/main genebank.cc genebank.hh
Log:
Added headers to detail_pop and dump_historic_pop files
Index: avida/current/source/event/cPopulation.events
diff -u avida/current/source/event/cPopulation.events:1.46 avida/current/source/event/cPopulation.events:1.47
--- avida/current/source/event/cPopulation.events:1.46 Tue Oct 21 10:05:39 2003
+++ avida/current/source/event/cPopulation.events Fri Oct 31 06:48:43 2003
@@ -609,6 +609,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
@@ -650,6 +651,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.34 avida/current/source/main/genebank.cc:1.35
--- avida/current/source/main/genebank.cc:1.34 Mon Oct 6 14:16:06 2003
+++ avida/current/source/main/genebank.cc Fri Oct 31 06:48:43 2003
@@ -978,6 +978,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);
@@ -989,12 +990,31 @@
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 << endl
+ << "# 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 << endl;
}
void cGenebank::DumpDetailedEntry(cGenotype * genotype, ofstream & fp)
Index: avida/current/source/main/genebank.hh
diff -u avida/current/source/main/genebank.hh:1.22 avida/current/source/main/genebank.hh:1.23
--- avida/current/source/main/genebank.hh:1.22 Mon Oct 6 14:16:06 2003
+++ avida/current/source/main/genebank.hh Fri Oct 31 06:48:43 2003
@@ -162,6 +162,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