neuralpp::Neuron Class Reference

Class for managing neurons. More...

#include <neural++.hpp>

List of all members.

Public Member Functions

 Neuron (double(*a)(double))
 Constructor.
 Neuron (vector< Synapsis > in, vector< Synapsis > out, double(*a)(double))
 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.
double propagate ()
 It propagates its activation value to the connected neurons.
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
vector< Synapsisin
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  ) 

Constructor.

Parameters:
a Activation function

neuralpp::Neuron::Neuron ( vector< Synapsis in,
vector< Synapsis out,
double(*)(double)  a 
)

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

Parameters:
in Input synapses
out Output synapses
a Activation function


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

double neuralpp::Neuron::propagate (  ) 

It propagates its activation value to the connected neurons.

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]

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

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 Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6