2009-08-09 11:17:39 +02:00
\section { neuralpp::Neuron Class Reference}
\label { classneuralpp_ 1_ 1Neuron} \index { neuralpp::Neuron@{ neuralpp::Neuron} }
Class for managing neurons.
{ \tt \# include $ < $ neural++.hpp$ > $ }
\subsection * { Public Member Functions}
\begin { CompactItemize}
\item
2009-08-16 20:57:15 +02:00
{ \bf Neuron} (double($ \ast $ a)(double), double th=0.0)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Constructor. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
{ \bf Neuron} (std::vector$ < $ { \bf Synapsis} $ > $ { \bf in} , std::vector$ < $ { \bf Synapsis} $ > $ { \bf out} , double($ \ast $ a)(double), double th=0.0)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Alternative constructor, that gets also the synapsis linked to the neuron. \item \end { CompactList} \item
{ \bf Synapsis} \& { \bf synIn} (size\_ \- t i)
\begin { CompactList} \small \item \em Get the i-th synapsis connected on the input of the neuron. \item \end { CompactList} \item
{ \bf Synapsis} \& { \bf synOut} (size\_ \- t i)
\begin { CompactList} \small \item \em Get the i-th synapsis connected on the output of the neuron. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
void { \bf push\_ \- in} ({ \bf Synapsis} s)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em It pushes a new input synapsis. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
void { \bf push\_ \- out} ({ \bf Synapsis} s)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em It pushes a new output synapsis. \item \end { CompactList} \item
void { \bf setActv} (double a)
\begin { CompactList} \small \item \em Change the activation value of the neuron. \item \end { CompactList} \item
void { \bf setProp} (double p)
\begin { CompactList} \small \item \em Change the propagation value of the neuron. \item \end { CompactList} \item
double { \bf getActv} ()
\begin { CompactList} \small \item \em Get the activation value of the neuron. \item \end { CompactList} \item
double { \bf getProp} ()
\begin { CompactList} \small \item \em Get the propagation value of the neuron. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
void { \bf propagate} ()
\begin { CompactList} \small \item \em Compute the propagation value of the neuron and set it. \item \end { CompactList} \item
2009-08-09 11:17:39 +02:00
size\_ \- t { \bf nIn} ()
\begin { CompactList} \small \item \em Get the number of input synapsis for the neuron. \item \end { CompactList} \item
size\_ \- t { \bf nOut} ()
\begin { CompactList} \small \item \em Get the number of output synapsis for the neuron. \item \end { CompactList} \item
void { \bf synClear} ()
\begin { CompactList} \small \item \em Remove input and output synapsis from a neuron. \item \end { CompactList} \end { CompactItemize}
\subsection * { Private Attributes}
\begin { CompactItemize}
\item
double { \bf actv\_ \- val}
\item
double { \bf prop\_ \- val}
\item
2009-08-16 20:57:15 +02:00
double { \bf threshold}
2009-08-09 11:17:39 +02:00
\item
2009-08-16 20:57:15 +02:00
std::vector$ < $ { \bf Synapsis} $ > $ { \bf in}
\item
std::vector$ < $ { \bf Synapsis} $ > $ { \bf out}
2009-08-09 11:17:39 +02:00
\item
double($ \ast $ { \bf actv\_ \- f} )(double)
\end { CompactItemize}
\subsection { Detailed Description}
Class for managing neurons.
Don't use this class directly unless you know what you're doing, use \doxyref { NeuralNet} { p.} { classneuralpp_ 1_ 1NeuralNet} instead
\subsection { Constructor \& Destructor Documentation}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !Neuron@{ Neuron} }
\index { Neuron@{ Neuron} !neuralpp::Neuron@{ neuralpp::Neuron} }
2009-08-16 20:57:15 +02:00
\subsubsection [Neuron] { \setlength { \rightskip } { 0pt plus 5cm} neuralpp::Neuron::Neuron (double($ \ast $ )(double) { \em a} , \/ double { \em th} = { \tt 0.0} )} \label { classneuralpp_ 1_ 1Neuron_ c9bd4f5f618fcf1adcebf1ab63ee0960}
2009-08-09 11:17:39 +02:00
Constructor.
\begin { Desc}
\item [Parameters:]
\begin { description}
2009-08-16 20:57:15 +02:00
\item [{\em a}] Activation function \item [{\em th}] Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end { description}
2009-08-09 11:17:39 +02:00
\end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !Neuron@{ Neuron} }
\index { Neuron@{ Neuron} !neuralpp::Neuron@{ neuralpp::Neuron} }
2009-08-16 20:57:15 +02:00
\subsubsection [Neuron] { \setlength { \rightskip } { 0pt plus 5cm} neuralpp::Neuron::Neuron (std::vector$ < $ { \bf Synapsis} $ > $ { \em in} , \/ std::vector$ < $ { \bf Synapsis} $ > $ { \em out} , \/ double($ \ast $ )(double) { \em a} , \/ double { \em th} = { \tt 0.0} )} \label { classneuralpp_ 1_ 1Neuron_ d15e96b0316d880953288cc6e2550bec}
2009-08-09 11:17:39 +02:00
Alternative constructor, that gets also the synapsis linked to the neuron.
\begin { Desc}
\item [Parameters:]
\begin { description}
2009-08-16 20:57:15 +02:00
\item [{\em in}] Input synapses \item [{\em out}] Output synapses \item [{\em a}] Activation function \item [{\em th}] Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end { description}
2009-08-09 11:17:39 +02:00
\end { Desc}
\subsection { Member Function Documentation}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !synIn@{ synIn} }
\index { synIn@{ synIn} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [synIn] { \setlength { \rightskip } { 0pt plus 5cm} { \bf Synapsis} \& neuralpp::Neuron::synIn (size\_ \- t { \em i} )} \label { classneuralpp_ 1_ 1Neuron_ 29f2d9dcc4ca34f224d4dc39bb2f180a}
Get the i-th synapsis connected on the input of the neuron.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em i}] Index of the input synapsis to get \end { description}
\end { Desc}
\begin { Desc}
\item [Returns:] Reference to the i-th synapsis \end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !synOut@{ synOut} }
\index { synOut@{ synOut} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [synOut] { \setlength { \rightskip } { 0pt plus 5cm} { \bf Synapsis} \& neuralpp::Neuron::synOut (size\_ \- t { \em i} )} \label { classneuralpp_ 1_ 1Neuron_ 655f1637e1b754461413ac7fc2ffeebe}
Get the i-th synapsis connected on the output of the neuron.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em i}] Index of the output synapsis to get \end { description}
\end { Desc}
\begin { Desc}
\item [Returns:] Reference to the i-th synapsis \end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !push\_ \- in@{ push\_ \- in} }
\index { push\_ \- in@{ push\_ \- in} !neuralpp::Neuron@{ neuralpp::Neuron} }
2009-08-16 20:57:15 +02:00
\subsubsection [push\_\-in] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Neuron::push\_ \- in ({ \bf Synapsis} { \em s} )} \label { classneuralpp_ 1_ 1Neuron_ 4d252151c35839975838539d846d70be}
2009-08-09 11:17:39 +02:00
It pushes a new input synapsis.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em s}] \doxyref { Synapsis} { p.} { classneuralpp_ 1_ 1Synapsis} to be pushed \end { description}
\end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !push\_ \- out@{ push\_ \- out} }
\index { push\_ \- out@{ push\_ \- out} !neuralpp::Neuron@{ neuralpp::Neuron} }
2009-08-16 20:57:15 +02:00
\subsubsection [push\_\-out] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Neuron::push\_ \- out ({ \bf Synapsis} { \em s} )} \label { classneuralpp_ 1_ 1Neuron_ 2c0acb0e6d413c4e0fc9e7939da1a684}
2009-08-09 11:17:39 +02:00
It pushes a new output synapsis.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em s}] \doxyref { Synapsis} { p.} { classneuralpp_ 1_ 1Synapsis} to be pushed \end { description}
\end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !setActv@{ setActv} }
\index { setActv@{ setActv} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [setActv] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Neuron::setActv (double { \em a} )} \label { classneuralpp_ 1_ 1Neuron_ ddf00ffef030b27ed11901aad08822bd}
Change the activation value of the neuron.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em a}] Activation value \end { description}
\end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !setProp@{ setProp} }
\index { setProp@{ setProp} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [setProp] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Neuron::setProp (double { \em p} )} \label { classneuralpp_ 1_ 1Neuron_ aa6e58f073a76b3481fea9115a4e6ea6}
Change the propagation value of the neuron.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em p}] Propagation value \end { description}
\end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !getActv@{ getActv} }
\index { getActv@{ getActv} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [getActv] { \setlength { \rightskip } { 0pt plus 5cm} double neuralpp::Neuron::getActv ()} \label { classneuralpp_ 1_ 1Neuron_ 55993867179f0ac7d1e0e2c460ceb611}
Get the activation value of the neuron.
\begin { Desc}
\item [Returns:] Activation value for the neuron \end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !getProp@{ getProp} }
\index { getProp@{ getProp} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [getProp] { \setlength { \rightskip } { 0pt plus 5cm} double neuralpp::Neuron::getProp ()} \label { classneuralpp_ 1_ 1Neuron_ 57c022f82213f662e2a263fc134a3fc9}
Get the propagation value of the neuron.
\begin { Desc}
\item [Returns:] Propagation value for the neuron \end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !propagate@{ propagate} }
\index { propagate@{ propagate} !neuralpp::Neuron@{ neuralpp::Neuron} }
2009-08-16 20:57:15 +02:00
\subsubsection [propagate] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Neuron::propagate ()} \label { classneuralpp_ 1_ 1Neuron_ 928d9bf5aed600119c640779e4034f30}
2009-08-09 11:17:39 +02:00
2009-08-16 20:57:15 +02:00
Compute the propagation value of the neuron and set it.
2009-08-09 11:17:39 +02:00
\index { neuralpp::Neuron@{ neuralpp::Neuron} !nIn@{ nIn} }
\index { nIn@{ nIn} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [nIn] { \setlength { \rightskip } { 0pt plus 5cm} size\_ \- t neuralpp::Neuron::nIn ()} \label { classneuralpp_ 1_ 1Neuron_ ad97f1a082d5f969eb4c69ab454ecfbb}
Get the number of input synapsis for the neuron.
\begin { Desc}
\item [Returns:] Number of input synapsis \end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !nOut@{ nOut} }
\index { nOut@{ nOut} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [nOut] { \setlength { \rightskip } { 0pt plus 5cm} size\_ \- t neuralpp::Neuron::nOut ()} \label { classneuralpp_ 1_ 1Neuron_ fe458021e3b20d58dc608fb94ae2135b}
Get the number of output synapsis for the neuron.
\begin { Desc}
\item [Returns:] Number of output synapsis \end { Desc}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !synClear@{ synClear} }
\index { synClear@{ synClear} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [synClear] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Neuron::synClear ()} \label { classneuralpp_ 1_ 1Neuron_ 2e2ccb69277fc3d992a3a3f2360ed154}
Remove input and output synapsis from a neuron.
\subsection { Member Data Documentation}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !actv\_ \- val@{ actv\_ \- val} }
\index { actv\_ \- val@{ actv\_ \- val} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [actv\_\-val] { \setlength { \rightskip } { 0pt plus 5cm} double { \bf neuralpp::Neuron::actv\_ \- val} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Neuron_ eec680c47272b2465e8d8a998c359853}
\index { neuralpp::Neuron@{ neuralpp::Neuron} !prop\_ \- val@{ prop\_ \- val} }
\index { prop\_ \- val@{ prop\_ \- val} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [prop\_\-val] { \setlength { \rightskip } { 0pt plus 5cm} double { \bf neuralpp::Neuron::prop\_ \- val} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Neuron_ da75259de98b1a893c736666af6bfdc3}
2009-08-16 20:57:15 +02:00
\index { neuralpp::Neuron@{ neuralpp::Neuron} !threshold@{ threshold} }
\index { threshold@{ threshold} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [threshold] { \setlength { \rightskip } { 0pt plus 5cm} double { \bf neuralpp::Neuron::threshold} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Neuron_ 7b16632868821d73dedcb8edaf6dbbef}
2009-08-09 11:17:39 +02:00
\index { neuralpp::Neuron@{ neuralpp::Neuron} !in@{ in} }
\index { in@{ in} !neuralpp::Neuron@{ neuralpp::Neuron} }
2009-08-16 20:57:15 +02:00
\subsubsection [in] { \setlength { \rightskip } { 0pt plus 5cm} std::vector$ < $ { \bf Synapsis} $ > $ { \bf neuralpp::Neuron::in} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Neuron_ bd07357465bb7b29bb344400e9e08710}
2009-08-09 11:17:39 +02:00
\index { neuralpp::Neuron@{ neuralpp::Neuron} !out@{ out} }
\index { out@{ out} !neuralpp::Neuron@{ neuralpp::Neuron} }
2009-08-16 20:57:15 +02:00
\subsubsection [out] { \setlength { \rightskip } { 0pt plus 5cm} std::vector$ < $ { \bf Synapsis} $ > $ { \bf neuralpp::Neuron::out} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Neuron_ 982aceef324b7764e778d5949720bc55}
2009-08-09 11:17:39 +02:00
\index { neuralpp::Neuron@{ neuralpp::Neuron} !actv\_ \- f@{ actv\_ \- f} }
\index { actv\_ \- f@{ actv\_ \- f} !neuralpp::Neuron@{ neuralpp::Neuron} }
\subsubsection [actv\_\-f] { \setlength { \rightskip } { 0pt plus 5cm} double($ \ast $ { \bf neuralpp::Neuron::actv\_ \- f} )(double)\hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Neuron_ 198ddd0d11a26d0052d52b787d6a0df0}
The documentation for this class was generated from the following file:\begin { CompactItemize}
\item
{ \bf neural++.hpp} \end { CompactItemize}