neuralpp::Neuron Class Reference

Class for managing neurons. More...

#include <neural++.hpp>

List of all members.

Public Member Functions

 Neuron (double(*a)(double), double th=0.0)
 Constructor.
 Neuron (std::vector< Synapsis > in, std::vector< Synapsis > out, double(*a)(double), double th=0.0)
 Alternative constructor, that gets also the synapsis linked to the neuron.
SynapsissynIn (size_t i)
 Get the i-th synapsis connected on the input of the neuron.
SynapsissynOut (size_t i)
 Get the i-th synapsis connected on the output of the neuron.
void push_in (Synapsis s)
 It pushes a new input synapsis.
void push_out (Synapsis s)
 It pushes a new output synapsis.
void setActv (double a)
 Change the activation value of the neuron.
void setProp (double p)
 Change the propagation value of the neuron.
double getActv ()
 Get the activation value of the neuron.
double getProp ()
 Get the propagation value of the neuron.
void propagate ()
 Compute the propagation value of the neuron and set it.
size_t nIn ()
 Get the number of input synapsis for the neuron.
size_t nOut ()
 Get the number of output synapsis for the neuron.
void synClear ()
 Remove input and output synapsis from a neuron.

Private Attributes

double actv_val
double prop_val
double threshold
std::vector< Synapsisin
std::vector< Synapsisout
double(* actv_f )(double)


Detailed Description

Class for managing neurons.

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


Constructor & Destructor Documentation

neuralpp::Neuron::Neuron ( double(*)(double)  a,
double  th = 0.0 
)

Constructor.

Parameters:
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::Neuron::Neuron ( std::vector< Synapsis in,
std::vector< Synapsis out,
double(*)(double)  a,
double  th = 0.0 
)

Alternative constructor, that gets also the synapsis linked to the neuron.

Parameters:
in Input synapses
out Output synapses
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

Synapsis& neuralpp::Neuron::synIn ( size_t  i  ) 

Get the i-th synapsis connected on the input of the neuron.

Parameters:
i Index of the input synapsis to get
Returns:
Reference to the i-th synapsis

Synapsis& neuralpp::Neuron::synOut ( size_t  i  ) 

Get the i-th synapsis connected on the output of the neuron.

Parameters:
i Index of the output synapsis to get
Returns:
Reference to the i-th synapsis

void neuralpp::Neuron::push_in ( Synapsis  s  ) 

It pushes a new input synapsis.

Parameters:
s Synapsis to be pushed

void neuralpp::Neuron::push_out ( Synapsis  s  ) 

It pushes a new output synapsis.

Parameters:
s Synapsis to be pushed

void neuralpp::Neuron::setActv ( double  a  ) 

Change the activation value of the neuron.

Parameters:
a Activation value

void neuralpp::Neuron::setProp ( double  p  ) 

Change the propagation value of the neuron.

Parameters:
p Propagation value

double neuralpp::Neuron::getActv (  ) 

Get the activation value of the neuron.

Returns:
Activation value for the neuron

double neuralpp::Neuron::getProp (  ) 

Get the propagation value of the neuron.

Returns:
Propagation value for the neuron

void neuralpp::Neuron::propagate (  ) 

Compute the propagation value of the neuron and set it.

size_t neuralpp::Neuron::nIn (  ) 

Get the number of input synapsis for the neuron.

Returns:
Number of input synapsis

size_t neuralpp::Neuron::nOut (  ) 

Get the number of output synapsis for the neuron.

Returns:
Number of output synapsis

void neuralpp::Neuron::synClear (  ) 

Remove input and output synapsis from a neuron.


Member Data Documentation

double neuralpp::Neuron::actv_val [private]

double neuralpp::Neuron::prop_val [private]

double neuralpp::Neuron::threshold [private]

std::vector< Synapsis > neuralpp::Neuron::in [private]

std::vector< Synapsis > neuralpp::Neuron::out [private]

double(* neuralpp::Neuron::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