tests.h
1 /********************************************************************************
2  * FARSA Experiments Library *
3  * Copyright (C) 2007-2012 *
4  * Piero Savastano <piero.savastano@istc.cnr.it> *
5  * Tomassino Ferrauto <tomassino.ferrauto@istc.cnr.it> *
6  * Stefano Nolfi <stefano.nolfi@istc.cnr.it> *
7  * Onofrio Gigliotta <onofrio.gigliotta@istc.cnr.it> *
8  * Gianluca Massera <emmegian@yahoo.it> *
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  * This program is distributed in the hope that it will be useful, *
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18  * GNU General Public License for more details. *
19  * *
20  * You should have received a copy of the GNU General Public License *
21  * along with this program; if not, write to the Free Software *
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *
23  ********************************************************************************/
24 
25 #ifndef TESTS_H
26 #define TESTS_H
27 
28 #include "abstracttest.h"
29 
30 namespace farsa {
31 
34 class FARSA_EXPERIMENTS_API TestRandom : public AbstractTest
35 {
36 public:
43  TestRandom();
45  virtual ~TestRandom();
56  virtual void configure(ConfigurationParameters& params, QString prefix);
67  virtual void save(ConfigurationParameters& params, QString prefix);
69  static void describe( QString type );
71  virtual void runTest();
73  int* buildRandomDNA();
74 };
75 
78 class FARSA_EXPERIMENTS_API TestIndividual : public AbstractTest
79 {
80 public:
89  virtual ~TestIndividual();
100  virtual void configure(ConfigurationParameters& params, QString prefix);
111  virtual void save(ConfigurationParameters& params, QString prefix);
113  static void describe( QString type );
115  virtual void runTest();
120  void setIndividualToTest( int idIndividual );
127  void setPopulationToTest( QString filename, bool deferLoading = true );
128 private:
130  int idIndividual;
132  QString populationFile;
134  bool populationLoaded;
135 };
136 
137 } //end namespace farsa
138 
139 #endif