OutputFunction Class Reference
OutputFunction Class. More...

Public Member Functions | |
OutputFunction () | |
Constructor. | |
virtual | ~OutputFunction () |
Destructor. | |
double | apply (double input) |
Calculate the outputs of a single neuron. | |
virtual void | apply (DoubleVector &inputs, DoubleVector &outputs)=0 |
Calculate the outputs of neurons by the net inputs given. | |
virtual bool | derivate (const DoubleVector &inputs, const DoubleVector &outputs, DoubleVector &derivates) const |
Compute the derivate of the function represent Given the input of neurons and the corresponding output of neurons, it calculate the derivate. | |
void | setCluster (Cluster *cl) |
Set the Cluster which it is inserted This is automatically called, and in normal case you don't have to call it directly. | |
Protected Member Functions | |
virtual void | clusterSetted () |
The method setCluster will call clusterSetted to inform subclasses that the OutputFunction has been inserted into a Cluster. | |
Protected Attributes | |
Cluster * | clusterv |
Cluster on which the OutputFunction is inserted. |
Detailed Description
Constructor & Destructor Documentation
OutputFunction | ( | ) | [inline] |
Constructor.
Definition at line 42 of file outputfunction.h.
virtual ~OutputFunction | ( | ) | [inline, virtual] |
Destructor.
Definition at line 44 of file outputfunction.h.
Member Function Documentation
virtual void apply | ( | DoubleVector & | inputs, |
DoubleVector & | outputs | ||
) | [pure virtual] |
Calculate the outputs of neurons by the net inputs given.
Implemented in WinnerTakeAllFunction, IdentityFunction, ScaleFunction, GainFunction, SigmoidFunction, FakeSigmoidFunction, ScaledSigmoidFunction, RampFunction, LinearFunction, StepFunction, LeakyIntegratorFunction, LogLikeFunction, CompositeFunction, LinearComboFunction, PeriodicFunction, SawtoothFunction, TriangleFunction, SinFunction, PseudoGaussFunction, and GaussFunction.
Referenced by SimpleCluster::update(), DDECluster::update(), and BiasedCluster::update().
double apply | ( | double | input | ) | [inline] |
Calculate the outputs of a single neuron.
Definition at line 48 of file outputfunction.h.
virtual void clusterSetted | ( | ) | [inline, protected, virtual] |
The method setCluster will call clusterSetted to inform subclasses that the OutputFunction has been inserted into a Cluster.
Reimplemented in LeakyIntegratorFunction, CompositeFunction, and LinearComboFunction.
Definition at line 77 of file outputfunction.h.
virtual bool derivate | ( | const DoubleVector & | inputs, |
const DoubleVector & | outputs, | ||
DoubleVector & | derivates | ||
) | const [inline, virtual] |
Compute the derivate of the function represent
Given the input of neurons and the corresponding output of neurons, it calculate the derivate.
- Returns:
- if it return false, then the OutputFunction is not derivable, and the derivates DoubleVector can contains trash data.
Reimplemented in IdentityFunction, ScaleFunction, GainFunction, SigmoidFunction, FakeSigmoidFunction, ScaledSigmoidFunction, RampFunction, LinearFunction, StepFunction, and GaussFunction.
Definition at line 59 of file outputfunction.h.
void setCluster | ( | Cluster * | cl | ) | [inline] |
Set the Cluster which it is inserted
This is automatically called, and in normal case you don't have to call it directly.
Definition at line 68 of file outputfunction.h.
Member Data Documentation
Cluster on which the OutputFunction is inserted.
Definition at line 77 of file outputfunction.h.
Referenced by LinearComboFunction::clusterSetted(), CompositeFunction::clusterSetted(), LeakyIntegratorFunction::clusterSetted(), LinearComboFunction::setFirstFunction(), CompositeFunction::setFirstFunction(), LinearComboFunction::setSecondFunction(), and CompositeFunction::setSecondFunction().
The documentation for this class was generated from the following file:
- nnfw/include/outputfunction.h