neuralpp::Layer Class Reference

Class for managing layers of neurons. More...

#include <neural++.hpp>

List of all members.

Public Member Functions

 Layer (size_t sz, double(*a)(double), double th=0.0)
 Constructor.
 Layer (std::vector< Neuron > &neurons, double(*a)(double), double th=0.0)
 Alternative constructor.
Neuronoperator[] (size_t i) throw (NetworkIndexOutOfBoundsException)
 Redefinition for operator [].
void link (Layer &l)
 It links a layer to another.
void setInput (std::vector< double > v)
 Set the input values for the neurons of the layer (just use it for the input layer).
void propagate ()
 It propagates its activation values to the output layers.
size_t size () const

Private Attributes

std::vector< Neuronelements
double threshold
void(* update_weights )()
double(* actv_f )(double)


Detailed Description

Class for managing layers of neurons.

Don't use this class directly unless you know what you're doing, use NeuralNet instead


Constructor & Destructor Documentation

neuralpp::Layer::Layer ( size_t  sz,
double(*)(double)  a,
double  th = 0.0 
)

Constructor.

Parameters:
sz Size of the layer
a Activation function
th Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values

neuralpp::Layer::Layer ( std::vector< Neuron > &  neurons,
double(*)(double)  a,
double  th = 0.0 
)

Alternative constructor.

It directly gets a vector of neurons to build the layer

Parameters:
neurons Vector of neurons to be included in the layer
a Activation function
th Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values


Member Function Documentation

Neuron& neuralpp::Layer::operator[] ( size_t  i  )  throw (NetworkIndexOutOfBoundsException)

Redefinition for operator [].

It gets the neuron at i

Parameters:
i Index of the neuron to get in the layer
Returns:
Reference to the i-th neuron

void neuralpp::Layer::link ( Layer l  ) 

It links a layer to another.

Parameters:
l Layer to connect to the current as input layer

void neuralpp::Layer::setInput ( std::vector< double >  v  ) 

Set the input values for the neurons of the layer (just use it for the input layer).

Parameters:
v Vector containing the input values

void neuralpp::Layer::propagate (  ) 

It propagates its activation values to the output layers.

size_t neuralpp::Layer::size (  )  const

Returns:
Number of neurons in the layer


Member Data Documentation

std::vector<Neuron> neuralpp::Layer::elements [private]

double neuralpp::Layer::threshold [private]

void(* neuralpp::Layer::update_weights)() [private]

double(* neuralpp::Layer::actv_f)(double) [private]


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

Generated on Sun Aug 16 20:53:42 2009 for Neural++ by  doxygen 1.5.6