27 #ifndef GENPROTOTYPE_H_
28 #define GENPROTOTYPE_H_
bool restoreGene(FILE *f, RESTORE_GA_GENE *gene, std::vector< Gen * > &storage)
restore gene and the value
Definition: GenPrototype.cpp:78
IValue * getRandomValue(void) const
[inline], [const] This function gives a random value (IValue) which are with the randomStrategy is ge...
Definition: GenPrototype.h:85
virtual ~GenPrototype()
destructor to delete a GenContext.
Definition: GenPrototype.cpp:45
std::map< Generation *, GenContext * > m_context
(map<Generation*, GenContext*>) The storage for the GenContexte.
Definition: GenPrototype.h:144
This interface gives the structur for the mutation of a gen.
Definition: IMutationStrategy.h:39
int getMutationProbability(void) const
[const] This function gives the mutation probability back (from the mutation strategy) ...
Definition: GenPrototype.cpp:74
The Gen class.
Definition: Gen.h:51
The GenContext class.
Definition: GenContext.h:51
GenContext * getContext(Generation *generation)
This function gives the context which is relatedto the Eneration "generation" back.
Definition: GenPrototype.cpp:66
IRandomStrategy * m_randomStrategy
(IRandomStrategy*) the random strategy
Definition: GenPrototype.h:150
IMutationStrategy * m_mutationStrategy
(IMutationStrategy*) the mutation strategy
Definition: GenPrototype.h:156
this interface is to create a random IValue.
Definition: IRandomStrategy.h:36
The GenPrototype class.
Definition: GenPrototype.h:55
The Generation class.
Definition: Generation.h:53
This class is a interface for a value which is part of a gen.
Definition: IValue.h:38
std::string getName(void) const
[inline], [const] This function gives the name of the prototype back.
Definition: GenPrototype.h:79
Gen * mutate(GenContext *context, Individual *individual, Gen *oldGen, GenContext *oldContext) const
[const] This function mutate the given gen.
Definition: GenPrototype.cpp:70
std::string m_name
(string) the name
Definition: GenPrototype.h:138
This class represent one individual of the complete gen.
Definition: Individual.h:45
virtual IValue * getRandomValue(void)=0
gives a random IValue back.
void insertContext(Generation *generation, GenContext *context)
This function insert a GenContext in the GenPrototype.
Definition: GenPrototype.cpp:62