# nn_base.h header file

This file declares all the elements needed to create and use generic (acyclic, non-recurrent) neural networks.

## Classes:

`class Weight: public Link`

- a weight in a neural network: it can calculate its output and the partial derivative of the network with respect to itself (using BP)
`class Neuron: public Node`

- a neuron: holds the couple (activation function, derivative) and implements BP
`class InputTerminal: public Neuron`

- an input terminal is a neuron without incoming links: it has a value of its own, and is used to feed input into neurla networks
`class NeuralNet: public Graph`

- this holds neurons and weights, with methods to set the input and retrieve the output
`class NeuronInserter`

- helper class to load neurons from a stream: inserts them into a set and a vector
`class ITInserter`

- helper class to load input terminals from a stream: inserts them into a set and a vector

## Functions:

- Function Streaming
`registerFun()`

- associates a function with a name, so as to assign to each function a representation invariant between runs of the program
`getFun()`

- returns the function pointer associated with the given name
`getName()`

- returns the name associated with the given function pointer
`registerDefault()`

- performs the predefined associations between to functions below and their names

- Standard Activation Functions
`id()`

- identity function (used for input terminals)
`one()`

- costant 1 function (derivative of the above)
`sigmoid()`

- sigmoid function (asymmetric)
`dsigmoid()`

- derivative of the above