\section{neuralpp::Layer Class Reference} \label{classneuralpp_1_1Layer}\index{neuralpp::Layer@{neuralpp::Layer}} Class for managing layers of neurons. {\tt \#include $<$neural++.hpp$>$} \subsection*{Public Member Functions} \begin{CompactItemize} \item {\bf Layer} (size\_\-t sz, double($\ast$a)(double), double th=0.0) \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item {\bf Layer} (std::vector$<$ {\bf Neuron} $>$ \&neurons, double($\ast$a)(double), double th=0.0) \begin{CompactList}\small\item\em Alternative constructor. \item\end{CompactList}\item {\bf Neuron} \& {\bf operator[$\,$]} (size\_\-t i) throw (NetworkIndexOutOfBoundsException) \begin{CompactList}\small\item\em Redefinition for operator []. \item\end{CompactList}\item void {\bf link} ({\bf Layer} \&l) \begin{CompactList}\small\item\em It links a layer to another. \item\end{CompactList}\item void {\bf setInput} (std::vector$<$ double $>$ v) \begin{CompactList}\small\item\em Set the input values for the neurons of the layer (just use it for the input layer). \item\end{CompactList}\item void {\bf propagate} () \begin{CompactList}\small\item\em It propagates its activation values to the output layers. \item\end{CompactList}\item size\_\-t {\bf size} () const \end{CompactItemize} \subsection*{Private Attributes} \begin{CompactItemize} \item std::vector$<$ {\bf Neuron} $>$ {\bf elements} \item double {\bf threshold} \item void($\ast$ {\bf update\_\-weights} )() \item double($\ast$ {\bf actv\_\-f} )(double) \end{CompactItemize} \subsection{Detailed Description} Class for managing layers of 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::Layer@{neuralpp::Layer}!Layer@{Layer}} \index{Layer@{Layer}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (size\_\-t {\em sz}, \/ double($\ast$)(double) {\em a}, \/ double {\em th} = {\tt 0.0})}\label{classneuralpp_1_1Layer_a235767701b5e9dcf28c5e9e0d04cb0b} Constructor. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em sz}]Size of the layer \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} \end{Desc} \index{neuralpp::Layer@{neuralpp::Layer}!Layer@{Layer}} \index{Layer@{Layer}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[Layer]{\setlength{\rightskip}{0pt plus 5cm}neuralpp::Layer::Layer (std::vector$<$ {\bf Neuron} $>$ \& {\em neurons}, \/ double($\ast$)(double) {\em a}, \/ double {\em th} = {\tt 0.0})}\label{classneuralpp_1_1Layer_d79f684523f8a6e086b962c8eef37623} Alternative constructor. It directly gets a vector of neurons to build the layer \begin{Desc} \item[Parameters:] \begin{description} \item[{\em neurons}]Vector of neurons to be included in the layer \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} \end{Desc} \subsection{Member Function Documentation} \index{neuralpp::Layer@{neuralpp::Layer}!operator[]@{operator[]}} \index{operator[]@{operator[]}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[operator[]]{\setlength{\rightskip}{0pt plus 5cm}{\bf Neuron}\& neuralpp::Layer::operator[$\,$] (size\_\-t {\em i}) throw ({\bf NetworkIndexOutOfBoundsException})}\label{classneuralpp_1_1Layer_45ff7554830558155c6fbce3b6827122} Redefinition for operator []. It gets the neuron at {\em i\/} \begin{Desc} \item[Parameters:] \begin{description} \item[{\em i}]Index of the neuron to get in the layer \end{description} \end{Desc} \begin{Desc} \item[Returns:]Reference to the i-th neuron \end{Desc} \index{neuralpp::Layer@{neuralpp::Layer}!link@{link}} \index{link@{link}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[link]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Layer::link ({\bf Layer} \& {\em l})}\label{classneuralpp_1_1Layer_ac33444fde14633fa1ad4acb024ad150} It links a layer to another. \begin{Desc} \item[Parameters:] \begin{description} \item[{\em l}]\doxyref{Layer}{p.}{classneuralpp_1_1Layer} to connect to the current as input layer \end{description} \end{Desc} \index{neuralpp::Layer@{neuralpp::Layer}!setInput@{setInput}} \index{setInput@{setInput}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[setInput]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Layer::setInput (std::vector$<$ double $>$ {\em v})}\label{classneuralpp_1_1Layer_88ceffc23f02a9dc24d4355767b7cca7} Set the input values for the neurons of the layer (just use it for the input layer). \begin{Desc} \item[Parameters:] \begin{description} \item[{\em v}]Vector containing the input values \end{description} \end{Desc} \index{neuralpp::Layer@{neuralpp::Layer}!propagate@{propagate}} \index{propagate@{propagate}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[propagate]{\setlength{\rightskip}{0pt plus 5cm}void neuralpp::Layer::propagate ()}\label{classneuralpp_1_1Layer_fcfd306039dbaf91c9e2dcc8fc1f1ce1} It propagates its activation values to the output layers. \index{neuralpp::Layer@{neuralpp::Layer}!size@{size}} \index{size@{size}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[size]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t neuralpp::Layer::size () const}\label{classneuralpp_1_1Layer_7ca71ed62fbe9c1e9c0fb6a8dcaf76f0} \begin{Desc} \item[Returns:]Number of neurons in the layer \end{Desc} \subsection{Member Data Documentation} \index{neuralpp::Layer@{neuralpp::Layer}!elements@{elements}} \index{elements@{elements}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[elements]{\setlength{\rightskip}{0pt plus 5cm}std::vector$<${\bf Neuron}$>$ {\bf neuralpp::Layer::elements}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_8188cb5c264e6021cee9979b968a0305} \index{neuralpp::Layer@{neuralpp::Layer}!threshold@{threshold}} \index{threshold@{threshold}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[threshold]{\setlength{\rightskip}{0pt plus 5cm}double {\bf neuralpp::Layer::threshold}\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_02cf4efe1da02a7404d25375c85ed71f} \index{neuralpp::Layer@{neuralpp::Layer}!update\_\-weights@{update\_\-weights}} \index{update\_\-weights@{update\_\-weights}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[update\_\-weights]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ {\bf neuralpp::Layer::update\_\-weights})()\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_c023a15a16353d0b4f44060a159f550f} \index{neuralpp::Layer@{neuralpp::Layer}!actv\_\-f@{actv\_\-f}} \index{actv\_\-f@{actv\_\-f}!neuralpp::Layer@{neuralpp::Layer}} \subsubsection[actv\_\-f]{\setlength{\rightskip}{0pt plus 5cm}double($\ast$ {\bf neuralpp::Layer::actv\_\-f})(double)\hspace{0.3cm}{\tt [private]}}\label{classneuralpp_1_1Layer_824367da29f92253a027a7c5b4a4405e} The documentation for this class was generated from the following file:\begin{CompactItemize} \item {\bf neural++.hpp}\end{CompactItemize}