[Avida-SVN] r2872 - branches/vo/source/targets/viewer-fltk
michaelvo at myxo.css.msu.edu
michaelvo at myxo.css.msu.edu
Fri Oct 24 08:02:03 PDT 2008
Author: michaelvo
Date: 2008-10-24 11:02:03 -0400 (Fri, 24 Oct 2008)
New Revision: 2872
Removed:
branches/vo/source/targets/viewer-fltk/oldstats.h
Log:
Deleted a file I didn't need.
Deleted: branches/vo/source/targets/viewer-fltk/oldstats.h
===================================================================
--- branches/vo/source/targets/viewer-fltk/oldstats.h 2008-10-24 15:00:49 UTC (rev 2871)
+++ branches/vo/source/targets/viewer-fltk/oldstats.h 2008-10-24 15:02:03 UTC (rev 2872)
@@ -1,132 +0,0 @@
-/*
- * cFLTKStats.h
- *
- *
- * Created by Michael Vo on 8/3/08.
- * Copyright 2008 __MyCompanyName__. All rights reserved.
- *
- */
-
-#ifndef cFLTKStats_h
-#define cFLTKStats_h
-
-#include "cCoreView_Text.h"
-#include <FL/Fl_Text_Display.H>
-#include <FL/Fl_Multiline_Output.H>
-#include <FL/Fl_Box.H>
-#include "cWorld.h"
-#include "cFLTKScreen.h"
-#include "cFLTKTable.h"
-
-class cFLTKStats : public cFLTKScreen {
-private:
- Fl_Multiline_Output* m_pop_stats_label;
- Fl_Multiline_Output* m_pop_dominant_label;
- Fl_Multiline_Output* m_pop_average_label;
- Fl_Multiline_Output* m_task_label;
-
- cWorld* m_world;
-public:
-
- void PutInside(Fl_Widget* container, Fl_Widget* widget)
- {
- widget->position(container->x()+widget->x(), container->y()+widget->y());
- }
- cFLTKStats(cWorld* world) : m_world(world)
- {
- Fl_Group* c = new Fl_Group(10, 35, 480, 580, "");
- c->end();
- Fl_Box* framePopStats = new Fl_Box(FL_BORDER_FRAME, 20, 20, 300, 115, "");
- {
-
- //framePopStats->align(FL_ALIGN_TOP|FL_ALIGN_INSIDE|FL_ALIGN_LEFT);
- PutInside(c, framePopStats);
- framePopStats->color(FL_BLACK);
-
- Fl_Multiline_Output* popStatsLabel = new Fl_Multiline_Output(10, 10, 200, 100, "");
- m_pop_stats_label = new Fl_Multiline_Output(150, 10, 100, 100, "");
- //popStatsLabel->set_boxtype(FL_NO_BOX, 0, 0, 0, 0);
-
- popStatsLabel->labelfont(FL_COURIER);
- popStatsLabel->value("Total Births:\nBreedTrue:\nParasites:\nEnergy:\nMax Fitness:\nMax Merit:");
-
- popStatsLabel->box(FL_NO_BOX);
- m_pop_stats_label->box(FL_NO_BOX);
- popStatsLabel->labelfont(FL_COURIER);
-
- PutInside(framePopStats, popStatsLabel);
- PutInside(framePopStats, m_pop_stats_label);
- }
-
- Fl_Box* frameDomAveStats = new Fl_Box(FL_BORDER_FRAME, 20, 145, 400, 300, "");
- {
- PutInside(c, frameDomAveStats);
- frameDomAveStats->color(FL_BLACK);
- Fl_Multiline_Output* domAveStatsLabel = new Fl_Multiline_Output(10, 25, 130, 270, "");
- domAveStatsLabel->value("\nFitness:\nMerit:\nGestation:\nLength:\nCopy Length:\nExec Length:\nAbundance:\nBirths:\nBirthrate:\nTree Depth:\nGen. Ave:");
- m_pop_dominant_label = new Fl_Multiline_Output(150, 25, 100, 270, "");
- m_pop_average_label = new Fl_Multiline_Output(270, 25, 100, 270, "");
- domAveStatsLabel->box(FL_NO_BOX);
- m_pop_average_label->box(FL_NO_BOX);
- m_pop_dominant_label->box(FL_NO_BOX);
- PutInside(frameDomAveStats, domAveStatsLabel);
- PutInside(frameDomAveStats, m_pop_average_label);
- PutInside(frameDomAveStats, m_pop_dominant_label);
- }
-
- Fl_Box* frame_tasks = new Fl_Box(FL_BORDER_FRAME, 430, 145, 200, 300, "");
- {
- PutInside(c, frame_tasks);
- frame_tasks->color(FL_BLACK);
- Fl_Multiline_Output* task_label = new Fl_Multiline_Output(10, 25, 130, 270, "");
- cString task_string="";
- for(int n=0; n<m_world->GetEnvironment().GetNumTasks(); n++){
- task_string+=m_world->GetEnvironment().GetTask(n).GetName();
- task_string+="\n";
- }
- task_label->value(task_string);
- m_task_label = new Fl_Multiline_Output(150, 25, 40, 270, "");
- PutInside(frame_tasks, task_label);
- PutInside(frame_tasks, m_task_label);
- task_label->box(FL_NO_BOX);
- m_task_label->box(FL_NO_BOX);
- }
- }
-
- void Redraw()
- {
- cString stats_string;
- stats_string.Set("%d\n%d\n%d\n%f\n%f\n%f", m_world->GetStats().GetNumBirths(), m_world->GetStats().GetBreedTrue(),
- m_world->GetStats().GetNumParasites(), m_world->GetStats().GetEnergy(), m_world->GetStats().GetMaxFitness(), m_world->GetStats().GetMaxMerit());
- m_pop_stats_label->value(stats_string);
- m_pop_stats_label->redraw_label();
-
- stats_string.Set("Dominant\n%f \n%f \n%f \n%d \n%f \n%f \n%d \n%d \n%f \n%d", m_world->GetStats().GetDomFitness(), m_world->GetStats().GetDomMerit(),
- m_world->GetStats().GetDomGestation(), m_world->GetStats().GetDomSize(), m_world->GetStats().GetDomCopySize(), m_world->GetStats().GetDomExeSize(),
- m_world->GetStats().GetDomAbundance(), m_world->GetStats().GetDomBirths(), m_world->GetStats().GetDomReproRate(), m_world->GetStats().GetDomGeneDepth());
- m_pop_dominant_label->value(stats_string);
- m_pop_dominant_label->redraw_label();
-
- stats_string.Set("Average\n%f \n%f \n%f \n%f \n%f \n%f \n%f \n%f \n%f \n%f \n%f", m_world->GetStats().GetAveFitness(), m_world->GetStats().GetAveMerit(),
- m_world->GetStats().GetAveGestation(), m_world->GetStats().GetAveSize(), m_world->GetStats().GetAveCopySize(), m_world->GetStats().GetAveExeSize(),
- double(m_world->GetStats().GetNumCreatures())/m_world->GetStats().GetNumGenotypes(),
- 0,
- m_world->GetStats().GetAveReproRate(), 0,0);
- //m_world->GetStats().SumGenotypeDepth().Average(),
- //m_world->GetStats().SumGeneration().Average());
- m_pop_average_label->value(stats_string);
- m_pop_average_label->redraw_label();
-
- cString format_string="";
- for(int n=0; n<m_world->GetEnvironment().GetNumTasks(); n++){
- stats_string.Set("%d\n", m_world->GetStats().GetTaskLastCount(n));
- format_string+=stats_string;
- }
- m_task_label->value(format_string);
- m_task_label->redraw_label();
- }
-
-};
-
-
-#endif
More information about the Avida-cvs
mailing list