11 #ifndef ANN_GENERATOR_H_
12 # define ANN_GENERATOR_H_
16 #include "ANN/neural_net.h"
17 # include "ANN/ann_layer.h"
18 # include "GA/i_generator.h"
19 # include "GA/i_dna.h"
39 ANNGenerator(std::vector<unsigned int>
const& infos,
double crossing_rate)
throw();
54 void init(std::vector<unsigned int>
const& infos,
double crossing_rate)
throw();
84 std::vector<unsigned int>
const&
getInfos(
void)
const throw();
137 std::vector<unsigned int> _infos;
138 double _crossing_rate;
ANNLayer::FActivate getOutputsActivation(void) const
Get the activation function pointer of the output layer.
Definition: ann_generator.cc:98
Define the interface that will be used to create an supported individual for the GAEngine.
Definition: i_dna.h:22
Define the interface that allow to define a new generator of individual for the GAEngine.
Definition: i_generator.h:22
Define the generator of a neural network.
Definition: ann_generator.h:27
std::vector< unsigned int > const & getInfos(void) const
Get the topology of the neural network.
Definition: ann_generator.cc:73
void setActivationFunction(ANNLayer::FActivate function, ANN::ActivationType type)
Set the activation function of the intern layers.
Definition: ann_generator.cc:56
ANN::ActivationType getOutputType(void) const
Get the activation function's type of the intern layers.
Definition: ann_generator.cc:103
void setOutputsActivation(ANNLayer::FActivate function, ANN::ActivationType type)
Set the activation function of the output layer.
Definition: ann_generator.cc:63
double(* FActivate)(double)
Function pointer of an activation function.
Definition: ann_layer.h:31
ANNLayer::FActivate getActivation(void) const
Get the activation function pointer of the intern layers.
Definition: ann_generator.cc:93
ANNGenerator(void)
Constructor.
Definition: ann_generator.cc:23
Contains all the objects that provide the management for the genetic algorithm with neural networks...
Definition: ann_exception.h:16
ActivationType
Define the type of the activation function.
Definition: neural_net.h:30
double getRandomMin(void) const
Get the minimum value of the randomization range.
Definition: ann_generator.cc:83
void setRandomize(double min, double max)
Set the range of the randomization.
Definition: ann_generator.cc:50
double getRandomMax(void) const
Get the maximum value of the randomization range.
Definition: ann_generator.cc:88
~ANNGenerator(void)
Destructor.
Definition: ann_generator.cc:37
ANN::ActivationType getLayerType(void) const
Get the activaton function's type of the output layer.
Definition: ann_generator.cc:108
double getCrossingRate(void) const
Get the crossing rate of the neural network.
Definition: ann_generator.cc:78
void init(std::vector< unsigned int > const &infos, double crossing_rate)
Initialize the generator.
Definition: ann_generator.cc:44
GA::IDNA * Generate(void) const
Generate a new neural network.
Definition: ann_generator.cc:132