Inheritance diagram for Cluster:


Constructors | |
| Cluster (u_int numNeurons, const char *name="unnamed") | |
| Cluster (PropertySettings &prop) | |
| virtual | ~Cluster () |
Methods affecting whole Cluster | |
| u_int | numNeurons () const |
| bool | needReset () |
| void | setAccumulate (bool mode) |
| bool | isAccumulate () const |
| virtual void | randomize (Real min, Real max)=0 |
| Variant | numNeuronsP () |
| Variant | accumP () |
| bool | setAccumP (const Variant &b) |
Operations on Input's vector | |
| virtual void | setInput (u_int neuron, Real value) |
| virtual void | setInputs (const RealVec &inputs) |
| virtual void | setAllInputs (Real value) |
| virtual void | resetInputs () |
| virtual Real | getInput (u_int neuron) const |
| RealVec & | inputs () |
| const RealVec & | inputs () const |
| Variant | inputsP () |
| bool | setInputsP (const Variant &v) |
Operations on Output's vector | |
| virtual void | setOutput (u_int neuron, Real value) |
| virtual void | setOutputs (const RealVec &outputs) |
| virtual Real | getOutput (u_int neuron) const |
| RealVec & | outputs () |
| const RealVec & | outputs () const |
| Variant | outputsP () |
| bool | setOutputsP (const Variant &v) |
Operations on OutputFunction | |
| void | setFunction (const OutputFunction &up) |
| OutputFunction *const | getFunction () const |
| Variant | getFunctionP () |
| bool | setFunction (const Variant &outf) |
| virtual Cluster * | clone () const |
Protected Member Functions | |
| void | setNeedReset (bool b) |
// create a SimpleCluster, a specialized subclass of Cluster SimpleCluster* simple = new SimpleCluster( 10 ); // this cluster contains 10 neurons // set the SigmoidUpdater for all neurons simple->setUpdater( SigmoidUpdater( 1.0 ) );
RealVec& in = cluster->inputs(); in[2] = 3.0; // This statement will be changes the inputs of third neuron. // the above statements must be equivalent with the following cluster->setInput( 2, 3.0 );
| Properties | ||||
| Name | Type [isVector] | Access mode | Description | Class |
|---|---|---|---|---|
| typename | string | read-only | Class's type | Propertized |
| name | string | read/write | name of the object | Updatable |
| accumulate | boolean | read/write | if inputs are accumulated | this |
| inputs | RealVec | read/write | neuron's input | this |
| outfunction | OutputFunction | read/write | neuron's output function | this |
| outputs | RealVec | read/write | neuron's output | this |
| numNeurons | unsigned int | read-only | number of neurons | this |
| Cluster | ( | PropertySettings & | prop | ) |
Construct a Cluster with PropertySettings
| virtual ~Cluster | ( | ) | [virtual] |
Destructor
| u_int numNeurons | ( | ) | const [inline] |
Return the number of neurons (the length of input and output arrays)
| bool needReset | ( | ) | [inline] |
Return true if inputs needs a reset
| void setAccumulate | ( | bool | mode | ) | [inline] |
Enable/Disable accumulation mode
If accumulation is enabled (true) then linkers attached to this Cluster will never resetInput and accumulates data, otherwise the inputs will be resetted at each step of neural network
| bool isAccumulate | ( | ) | const [inline] |
return true if the Cluster will accumulates inputs
Randomize the parameters of the Cluster
The parameters randomized by this method will be specified by sub-classes
Implemented in BiasedCluster, DDECluster, FakeCluster, and SimpleCluster.
| Variant numNeuronsP | ( | ) | [inline] |
Read Access to property 'size'
| Variant accumP | ( | ) | [inline] |
Read Access to property 'accumulate'
| bool setAccumP | ( | const Variant & | b | ) | [inline] |
Write Access to property 'accumulate'
| virtual void setInputs | ( | const RealVec & | inputs | ) | [virtual] |
Set the inputs from the vector given
| virtual void setAllInputs | ( | Real | value | ) | [virtual] |
Set all the inputs with the same value Details...
| virtual void resetInputs | ( | ) | [virtual] |
Reset the inputs of this cluster, typically this means that the inputs will be set to zero. Details...
| RealVec& inputs | ( | ) | [inline] |
Get the array of inputs
Return the array of inputs, not a copy of inputs; Then you can change inputs by the pointer returned !!!
| Variant inputsP | ( | ) | [inline] |
For property 'inputs'
| bool setInputsP | ( | const Variant & | v | ) | [inline] |
setting the property 'inputs'
Force the output of the neuron at value specified
| virtual void setOutputs | ( | const RealVec & | outputs | ) | [virtual] |
Set the outputs from the vector given
| RealVec& outputs | ( | ) | [inline] |
Get the array of outputs
Return the array of outputs, not a copy of outputs; Then you can change outputs by the pointer returned !!!
| Variant outputsP | ( | ) | [inline] |
For property 'outputs'
| bool setOutputsP | ( | const Variant & | v | ) | [inline] |
setting the property 'outputs'
| void setFunction | ( | const OutputFunction & | up | ) |
Set the output function for all neurons contained
This method create an internal copy of the OutputFunction passed
| OutputFunction* const getFunction | ( | ) | const [inline] |
Get the Output function
| Variant getFunctionP | ( | ) | [inline] |
read property 'outfunction'
| bool setFunction | ( | const Variant & | outf | ) | [inline] |
sets the property 'outfunction'
| virtual Cluster* clone | ( | ) | const [virtual] |
Clone this Cluster
Reimplemented from Propertized.
Reimplemented in BiasedCluster, DDECluster, FakeCluster, and SimpleCluster.
| void setNeedReset | ( | bool | b | ) | [inline, protected] |
Set the state of 'needReset'
Used by subclassed into update implementation