org.neuroph.nnet.comp.neuron
Class CompetitiveNeuron
- java.lang.Object
-
- org.neuroph.core.Neuron
-
- org.neuroph.nnet.comp.neuron.DelayedNeuron
-
- org.neuroph.nnet.comp.neuron.CompetitiveNeuron
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable
public class CompetitiveNeuron extends DelayedNeuron
Provides neuron behaviour specific for competitive neurons which are used in competitive layers, and networks with competitive learning.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description CompetitiveNeuron(InputFunction inputFunction, TransferFunction transferFunction)Creates an instance of CompetitiveNeuron with specified input and transfer functions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddInputConnection(Connection connection)Adds input connection for this competitive neuronvoidcalculate()Calculates neuron's outputjava.util.List<Connection>getConnectionsFromOtherLayers()Returns collection of connections from other layersbooleanisCompeting()Retruns true if this neuron is in competing mode, false otherwisevoidreset()Resets the input, output and mode for this neuronvoidsetIsCompeting(boolean isCompeting)Sets the flag to indicate that this neuron is in competing mode-
Methods inherited from class org.neuroph.nnet.comp.neuron.DelayedNeuron
getOutput
-
Methods inherited from class org.neuroph.core.Neuron
addInputConnection, addInputConnection, clone, getConnectionFrom, getDelta, getError, getInputConnections, getInputFunction, getLabel, getNetInput, getOutConnections, getOutput, getParentLayer, getTransferFunction, getWeights, hasInputConnectionFrom, hasInputConnections, hasOutputConnectionTo, initializeWeights, removeAllConnections, removeAllInputConnections, removeAllOutputConnections, removeInputConnectionFrom, removeOutputConnectionTo, setDelta, setError, setInput, setInputFunction, setLabel, setOutput, setParentLayer, setTransferFunction
-
-
-
-
Constructor Detail
-
CompetitiveNeuron
public CompetitiveNeuron(InputFunction inputFunction, TransferFunction transferFunction)
Creates an instance of CompetitiveNeuron with specified input and transfer functions- Parameters:
inputFunction- neuron input functiontransferFunction- neuron ransfer function
-
-
Method Detail
-
calculate
public void calculate()
Description copied from class:NeuronCalculates neuron's output- Overrides:
calculatein classDelayedNeuron
-
addInputConnection
public void addInputConnection(Connection connection)
Adds input connection for this competitive neuron- Overrides:
addInputConnectionin classNeuron- Parameters:
connection- input connection
-
getConnectionsFromOtherLayers
public java.util.List<Connection> getConnectionsFromOtherLayers()
Returns collection of connections from other layers- Returns:
- collection of connections from other layers
-
reset
public void reset()
Resets the input, output and mode for this neuron
-
isCompeting
public boolean isCompeting()
Retruns true if this neuron is in competing mode, false otherwise- Returns:
- true if this neuron is in competing mode, false otherwise
-
setIsCompeting
public void setIsCompeting(boolean isCompeting)
Sets the flag to indicate that this neuron is in competing mode- Parameters:
isCompeting- value for the isCompeting flag
-
-
DMelt 3.0 © DataMelt by jWork.ORG