#include <neuron.h>
Inheritance diagram for Neuron:
Public Types | |
enum | unitTypes |
enum | tfuncs |
Public Methods | |
virtual void | init (double r=0.0) |
void | reset () |
virtual void | transfer (ANNetwork &net) |
double | activation () const |
virtual void | setActivation (double a) |
void | operator= (double a) |
virtual double | output () const |
operator const double () const | |
double | bias () const |
void | setBias (double b) |
int | getType () const |
void | setType (int t) |
int | transferFunc () const |
void | setTFunc (int f) |
void | enable (bool s=true) |
bool | isEnabled () const |
void | copy (const Neuron &orig) |
virtual Neuron * | clone () const |
virtual void | check (int netSize) const |
Protected Attributes | |
double | mActivation |
Connection | mBias |
int | mType |
int | mTransferFunc |
bool | mExists |
Friends | |
class | NeuronContainer |
Somewhat bloated.
It handles signal transmission in reading manner (connections point to source units).
Definition at line 199 of file neuron.h.
|
Transfer functions.
|
|
Neuron types: is neuron input, hidden or output unit.
|
|
Returns the activation value. Unless overloaded, this value is identical with the Neuron::output() value.
Definition at line 230 of file neuron.h. References mActivation. Referenced by transfer(). |
|
Returns the current bias (threshold) value of the neuron.
Definition at line 253 of file neuron.h. References mBias, and Connection::weight(). |
|
Implementation for Object.
Reimplemented from BiNode. Definition at line 275 of file neuron.cc. References BiNode::check(), Connection::check(), mActivation, mBias, mTransferFunc, and mType. Referenced by ANNetwork::check(). |
|
Implementation for Object.
Definition at line 305 of file neuron.h. Referenced by ANNetwork::copyFreeNet(). |
|
Standard copy operator.
Definition at line 239 of file neuron.cc. References Connection::copy(), BiNode::copy(), mActivation, mBias, mExists, mTransferFunc, and mType. |
|
Enables (true) or disables (false) the neuron. If the neuron is disabled, it's Neuron::output() value will always be 0.0. It will also (practically) not use any computational resources.
Definition at line 291 of file neuron.h. References mExists. |
|
Returns the type of the neuron; is it an input, hidden or output unit. See Neuron::unitTypes for information on the possible values. Definition at line 264 of file neuron.h. References mType. |
|
Initialize weights and bias to random value in given range.
Definition at line 252 of file neuron.cc. References BiNode::incomings(), Connection::init(), and mBias. Referenced by GaussianInitializer::initialize(). |
|
Returns the enabledness state of the neuron.
Definition at line 297 of file neuron.h. References mExists. Referenced by ANNetwork::drawEPS(). |
|
Returns the output value of the neuron.
Definition at line 250 of file neuron.h. References mActivation. |
|
Sets the activation value of the neuron.
Definition at line 236 of file neuron.h. References mActivation. |
|
Returns the output value of the neuron. Unless overloaded, this value is identical with the Neuron::activation() value.
Definition at line 244 of file neuron.h. References mActivation. Referenced by Connection::transfer(). |
|
Resets activation (and other possible dynamic states) to 0.0.
Definition at line 213 of file neuron.h. References mActivation. |
|
Sets the activation value of the neuron.
Definition at line 233 of file neuron.h. References mActivation. |
|
Sets the bias (threshold value of the neuron to the given value.
Definition at line 256 of file neuron.h. References mBias. |
|
Sets the transfer function ID of the neuron. See Neuron::tfuncs for information about the different functions. Definition at line 282 of file neuron.h. References mTransferFunc. |
|
Sets the type of the neuron; is it an input, hidden or output unit. See Neuron::unitTypes for information on the possible values. This information is typically not very important. Definition at line 270 of file neuron.h. References mType. |
|
Updates the unit by transferring signals through the connections.
Definition at line 261 of file neuron.cc. References activation(), BiNode::incomings(), mActivation, mBias, Connection::source(), and Connection::weight(). |
|
Returns the transfer function ID of the neuron. See Neuron::tfuncs for information about the different functions. Definition at line 276 of file neuron.h. References mTransferFunc. Referenced by ANNetwork::drawEPS(). |
|
Activation value of the unit.
Definition at line 322 of file neuron.h. Referenced by activation(), check(), copy(), operator const double(), operator=(), output(), reset(), setActivation(), and transfer(). |
|
Bias (threshold).
Definition at line 325 of file neuron.h. Referenced by bias(), check(), copy(), init(), setBias(), and transfer(). |
|
Does this unit really exist or not (is it active or dormant).
Definition at line 334 of file neuron.h. Referenced by copy(), enable(), and isEnabled(). |
|
Transfer function type (or -1 if default).
Definition at line 331 of file neuron.h. Referenced by check(), copy(), setTFunc(), and transferFunc(). |
|
Unit type (see unitTypes).
|