org.simnet.networks
Class Competitive

java.lang.Object
  extended by org.simnet.interfaces.Network
      extended by org.simnet.networks.Competitive
All Implemented Interfaces:
EventListener, WorldListener

public class Competitive
extends Network

Competitive implements a Competitive network.

Author:
Jeff Yoshimi

Field Summary
 
Fields inherited from class org.simnet.interfaces.Network
CONTINUOUS, DISCRETE
 
Constructor Summary
Competitive()
          Default constructor used by Castor.
Competitive(int numNeurons, Layout layout)
          Constructs a competitive network with specified number of neurons.
 
Method Summary
 double getEpsilon()
          Return the epsilon.
 double getLeakyEpsilon()
          Return leaky epsilon value.
 double getLoseValue()
          Return the loser value.
 boolean getNormalizeInputs()
          Return the normalize inputs value.
 int getNumNeurons()
           
 boolean getUseLeakyLearning()
          Return the leaky learning value.
 double getWinValue()
          Return the winner value.
 void normalizeAllIncomingWeights()
          Normalize all weights coming in to this network.
 void normalizeIncomingWeights()
          Normalize weights coming in to this network, separtely for each neuron.
 void randomize()
          Randomize and normalize weights.
 void randomizeIncomingWeights()
          Randomize all weights coming in to this network.
 void setEpsilon(double epsilon)
          Sets epsilon.
 void setLeakyEpsilon(double leakyEpsilon)
          Sets the leaky epsilon value.
 void setLoseValue(double loseValue)
          Sets the loser value.
 void setNormalizeInputs(boolean normalizeInputs)
          Sets the normalize inputs value.
 void setUseLeakyLearning(boolean useLeakyLearning)
          Sets the leaky learning value.
 void setWinValue(double winValue)
          Sets the winner value.
 void update()
          Update the network.
 
Methods inherited from class org.simnet.interfaces.Network
addNetwork, addNetworkList, addNetworkListener, addNeuron, addNeuron, addNeuronList, addWeight, addWeight, changeNeuron, changeSynapse, checkAllBounds, clearActivations, clearInputs, close, deleteNetwork, deleteNeuron, deleteNeuron, deleteWeight, deleteWeight, fireClampChanged, fireCouplingChanged, fireNetworkChanged, fireNeuronAdded, fireNeuronChanged, fireNeuronDeleted, fireSubnetAdded, fireSubnetDeleted, fireSynapseAdded, fireSynapseChanged, fireSynapseDeleted, getClampNeurons, getClampWeights, getCouplingList, getDepth, getFlatNetworkList, getFlatNeuronList, getFlatSynapseList, getId, getIndents, getInputNeurons, getInteractionMode, getListenerList, getNetwork, getNetworkList, getNetworkParent, getNetworkThread, getNeuron, getNeuron, getNeuronCount, getNeuronList, getOutputNeurons, getPrecision, getRoot, getRoundingOff, getState, getSynapse, getTime, getTimeLabel, getTimeStep, getTimeType, getType, getUnits, getWeight, getWeight, getWeight, getWeightCount, getWeightList, getWorkspace, init, initNeurons, initParents, initWeights, isRoot, isRoundOffActivationValues, isUpdateCompleted, randomizeNeurons, randomizeWeights, removeNetworkListener, round, roundAll, setClampNeurons, setClampWeights, setId, setInteractionMode, setLowerBounds, setNetworkList, setNetworkParent, setNetworkThread, setNeuronList, setPrecision, setRoundingOff, setRoundOffActivationValues, setTime, setTimeStep, setUpdateCompleted, setUpperBounds, setWeightList, setWeightsToZero, setWorkspace, toString, updateAllNetworks, updateAllNeurons, updateAllWeights, updateIds, updateInputs, updateTime, updateTimeType, updateTopLevel, updateWorldListeners, updateWorlds, worldChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Competitive

public Competitive()
Default constructor used by Castor.


Competitive

public Competitive(int numNeurons,
                   Layout layout)
Constructs a competitive network with specified number of neurons.

Parameters:
numNeurons - size of this network in neurons
layout - Defines how neurons are to be layed out
Method Detail

update

public void update()
Update the network.

Specified by:
update in class Network

normalizeIncomingWeights

public void normalizeIncomingWeights()
Normalize weights coming in to this network, separtely for each neuron.


normalizeAllIncomingWeights

public void normalizeAllIncomingWeights()
Normalize all weights coming in to this network.


randomizeIncomingWeights

public void randomizeIncomingWeights()
Randomize all weights coming in to this network.


randomize

public void randomize()
Randomize and normalize weights.


getEpsilon

public double getEpsilon()
Return the epsilon.

Returns:
the epsilon value.

setEpsilon

public void setEpsilon(double epsilon)
Sets epsilon.

Parameters:
epsilon - The new epsilon value.

getLoseValue

public final double getLoseValue()
Return the loser value.

Returns:
the loser Value

setLoseValue

public final void setLoseValue(double loseValue)
Sets the loser value.

Parameters:
loseValue - The new loser value

getWinValue

public final double getWinValue()
Return the winner value.

Returns:
the winner value

setWinValue

public final void setWinValue(double winValue)
Sets the winner value.

Parameters:
winValue - The new winner value

getNumNeurons

public int getNumNeurons()
Returns:
The initial number of neurons.

getLeakyEpsilon

public double getLeakyEpsilon()
Return leaky epsilon value.

Returns:
Leaky epsilon value

setLeakyEpsilon

public void setLeakyEpsilon(double leakyEpsilon)
Sets the leaky epsilon value.

Parameters:
leakyEpsilon - Leaky epsilon value to set

getNormalizeInputs

public boolean getNormalizeInputs()
Return the normalize inputs value.

Returns:
the normailize inputs value

setNormalizeInputs

public void setNormalizeInputs(boolean normalizeInputs)
Sets the normalize inputs value.

Parameters:
normalizeInputs - Normalize inputs value to set

getUseLeakyLearning

public boolean getUseLeakyLearning()
Return the leaky learning value.

Returns:
the leaky learning value

setUseLeakyLearning

public void setUseLeakyLearning(boolean useLeakyLearning)
Sets the leaky learning value.

Parameters:
useLeakyLearning - The leaky learning value to set