1 /*
2  *  cGenomeTestMetrics.h
3  *  Avida
4  *
5  *  Created by David Bryson on 8/13/10.
6  *  Copyright 2010-2011 Michigan State University. All rights reserved.
7  *
8  *
9  *  This file is part of Avida.
10  *
11  *  Avida is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
12  *  as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
13  *
14  *  Avida is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
16  *
17  *  You should have received a copy of the GNU Lesser General Public License along with Avida.
18  *  If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef cGenomeTestMetrics_h
23 #define cGenomeTestMetrics_h
24 
25 #include <cassert>
26 
27 class cAvidaContext;
28 class cBioGroup;
29 
30 
31 class cGenomeTestMetrics
32 {
33 private:
34   bool m_is_viable;
35   double m_fitness;
36   double m_colony_fitness;
37   double m_merit;
38   int m_copied_size;
39   int m_executed_size;
40   int m_gestation_time;
41 
42 
43   cGenomeTestMetrics(); // @not_implemented
44 
45   cGenomeTestMetrics(cAvidaContext& ctx, cBioGroup* bg);
46 
47 public:
IsViable()48   bool IsViable() const { return m_is_viable; }
GetFitness()49   double GetFitness() const { return m_fitness; }
GetColonyFitness()50   double GetColonyFitness() const { return m_colony_fitness; }
GetMerit()51   double GetMerit() const { return m_merit; }
GetLinesCopied()52   int GetLinesCopied() const { return m_copied_size; }
GetLinesExecuted()53   int GetLinesExecuted() const { return m_executed_size; }
GetGestationTime()54   int GetGestationTime() const { return m_gestation_time; }
55 
56 
57   static cGenomeTestMetrics* GetMetrics(cAvidaContext& ctx, cBioGroup* bg);
58 };
59 
60 #endif
61