LoveBrains  1.0.0
Public Member Functions | List of all members
GANN::ANNGenerator Class Reference

Define the generator of a neural network. More...

#include <ann_generator.h>

Inheritance diagram for GANN::ANNGenerator:
GA::IGenerator GA::IGenerator

Public Member Functions

 ANNGenerator (void) throw ()
 Constructor.
 
 ANNGenerator (std::vector< unsigned int > const &infos, double crossing_rate) throw ()
 Constructor. More...
 
 ~ANNGenerator (void) throw ()
 Destructor.
 
void init (std::vector< unsigned int > const &infos, double crossing_rate) throw ()
 Initialize the generator. More...
 
void setRandomize (double min, double max) throw ()
 Set the range of the randomization. More...
 
void setActivationFunction (ANNLayer::FActivate function, ANN::ActivationType type) throw ()
 Set the activation function of the intern layers. More...
 
void setOutputsActivation (ANNLayer::FActivate function, ANN::ActivationType type) throw ()
 Set the activation function of the output layer. More...
 
std::vector< unsigned int > const & getInfos (void) const throw ()
 Get the topology of the neural network. More...
 
double getCrossingRate (void) const throw ()
 Get the crossing rate of the neural network. More...
 
double getRandomMin (void) const throw ()
 Get the minimum value of the randomization range. More...
 
double getRandomMax (void) const throw ()
 Get the maximum value of the randomization range. More...
 
ANNLayer::FActivate getActivation (void) const throw ()
 Get the activation function pointer of the intern layers. More...
 
ANNLayer::FActivate getOutputsActivation (void) const throw ()
 Get the activation function pointer of the output layer. More...
 
ANN::ActivationType getOutputType (void) const throw ()
 Get the activation function's type of the intern layers. More...
 
ANN::ActivationType getLayerType (void) const throw ()
 Get the activaton function's type of the output layer. More...
 
ANNGeneratoroperator= (ANNGenerator const &gen) throw ()
 
GA::IDNAGenerate (void) const throw ()
 Generate a new neural network. More...
 
 ANNGenerator (std::vector< unsigned int > const &infos, double crossing_rate) throw ()
 
void init (std::vector< unsigned int > const &infos, double crossing_rate) throw ()
 
void setRandomize (double min, double max) throw ()
 
void setActivationFunction (ANNLayer::FActivate function, ANN::ActivationType type) throw ()
 
void setOutputsActivation (ANNLayer::FActivate function, ANN::ActivationType type) throw ()
 
std::vector< unsigned int > const & getInfos (void) const throw ()
 
double getCrossingRate (void) const throw ()
 
double getRandomMin (void) const throw ()
 
double getRandomMax (void) const throw ()
 
ANNLayer::FActivate getActivation (void) const throw ()
 
ANNLayer::FActivate getOutputsActivation (void) const throw ()
 
ANN::ActivationType getOutputType (void) const throw ()
 
ANN::ActivationType getLayerType (void) const throw ()
 
ANNGeneratoroperator= (ANNGenerator const &gen) throw ()
 
GA::IDNAGenerate (void) const throw ()
 Generate a new individual. More...
 
- Public Member Functions inherited from GA::IGenerator
virtual ~IGenerator (void)
 Destructor.
 

Detailed Description

Define the generator of a neural network.

Constructor & Destructor Documentation

GANN::ANNGenerator::ANNGenerator ( std::vector< unsigned int > const &  infos,
double  crossing_rate 
)
throw (
)

Constructor.

Parameters
infos: Contains the topology of the neural network.
crossing_rate: Contains the crossing rate of the neural network.

Member Function Documentation

GA::IDNA* GANN::ANNGenerator::Generate ( void  ) const
throw (
)
virtual

Generate a new individual.

Returns
IDNA *

Implements GA::IGenerator.

GA::IDNA * GANN::ANNGenerator::Generate ( void  ) const
throw (
)
virtual

Generate a new neural network.

Returns
GA::IDNA *

Implements GA::IGenerator.

ANNLayer::FActivate GANN::ANNGenerator::getActivation ( void  ) const
throw (
)

Get the activation function pointer of the intern layers.

Returns
ANNLayer::FActivate
double GANN::ANNGenerator::getCrossingRate ( void  ) const
throw (
)

Get the crossing rate of the neural network.

Returns
double
std::vector< unsigned int > const & GANN::ANNGenerator::getInfos ( void  ) const
throw (
)

Get the topology of the neural network.

Returns
std::vector<unsigned int> const&
ANN::ActivationType GANN::ANNGenerator::getLayerType ( void  ) const
throw (
)

Get the activaton function's type of the output layer.

Returns
ANN::ActivationType
ANNLayer::FActivate GANN::ANNGenerator::getOutputsActivation ( void  ) const
throw (
)

Get the activation function pointer of the output layer.

Returns
ANNLayer::FActivate
ANN::ActivationType GANN::ANNGenerator::getOutputType ( void  ) const
throw (
)

Get the activation function's type of the intern layers.

Returns
ANN::ActivationType
double GANN::ANNGenerator::getRandomMax ( void  ) const
throw (
)

Get the maximum value of the randomization range.

Returns
double
double GANN::ANNGenerator::getRandomMin ( void  ) const
throw (
)

Get the minimum value of the randomization range.

Returns
double
void GANN::ANNGenerator::init ( std::vector< unsigned int > const &  infos,
double  crossing_rate 
)
throw (
)

Initialize the generator.

Parameters
infos: Contains the topology of the neural network.
crossing_rate: Contains the crossing rate of the neural network.
void GANN::ANNGenerator::setActivationFunction ( ANNLayer::FActivate  function,
ANN::ActivationType  type 
)
throw (
)

Set the activation function of the intern layers.

Parameters
function: function pointer of the activation function.
type: the type of the activation function.
void GANN::ANNGenerator::setOutputsActivation ( ANNLayer::FActivate  function,
ANN::ActivationType  type 
)
throw (
)

Set the activation function of the output layer.

Parameters
function: function pointer of the activation function.
type: the type of the activation function.
void GANN::ANNGenerator::setRandomize ( double  min,
double  max 
)
throw (
)

Set the range of the randomization.

Parameters
min: the minimum value of the range.
max: the maximum value of the range.

The documentation for this class was generated from the following files: