restore.h

Go to the documentation of this file.
00001 /*
00002  * restore.h
00003  *
00004  *  Created on: 21.10.2009
00005  *      Author: robot12
00006  */
00007 
00008 #ifndef RESTORE_H_
00009 #define RESTORE_H_
00010 
00011 #include <string>
00012 #include <vector>
00013 
00014 class Prototype;
00015 class IValue;
00016 
00017 struct RESTORE_GA_HEAD {
00018   union {
00019     struct{
00020       int generationNumber;
00021       bool cleanStrategies;
00022       int numIndividuals;
00023       int numGeneration;
00024       int numGenes;
00025     };
00026     char buffer[];
00027   };
00028 };
00029 
00030 struct RESTORE_GA_GENERATION {
00031   union {
00032     struct {
00033       int number;
00034       int numberIndividuals;
00035       int size;
00036       int children;
00037       double q1;
00038       double q3;
00039       double w1;
00040       double w3;
00041       double min;
00042       double max;
00043       double avg;
00044       double med;
00045       double best;
00046     };
00047 
00048     char buffer[];
00049   };
00050 
00051   //std::vector<int> idsOfIndividual;
00052 };
00053 
00054 struct RESTORE_GA_INDIVIDUAL {
00055   //std::string name;
00056 
00057   union {
00058     struct {
00059       int ID;
00060       int numberGenes;
00061       int parent1;
00062       int parent2;
00063       bool mutated;
00064       bool fitnessCalculated;
00065       double fitness;
00066     };
00067 
00068     char buffer[];
00069   };
00070 
00071   //std::vector<int> idsOfGenes;
00072 };
00073 
00074 struct RESTORE_GA_GENE {
00075   //std::string prototype;
00076 
00077   union {
00078     struct {
00079       int ID;
00080     };
00081 
00082     char buffer[];
00083   };
00084 };
00085 
00086 template<class Typ>
00087 struct RESTORE_GA_TEMPLATE {
00088   union {
00089     Typ value;
00090     char buffer[];
00091   };
00092 };
00093 
00094 
00095 #endif /* RESTORE_H_ */

Generated on Fri Oct 30 16:29:01 2009 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.4.7