ca.nengo.model.impl
Class PlasticEnsembleImpl
java.lang.Object
ca.nengo.model.impl.AbstractEnsemble
ca.nengo.model.impl.EnsembleImpl
ca.nengo.model.impl.PlasticEnsembleImpl
- All Implemented Interfaces:
- Ensemble, ExpandableNode, Node, Probeable, Resettable, SimulationMode.ModeConfigurable, VisiblyMutable, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- DecodableEnsembleImpl
public class PlasticEnsembleImpl
- extends EnsembleImpl
An extension of the default ensemble; connection weights can be modified
by a plasticity rule.
TODO: test
- Author:
- Trevor Bekolay
- See Also:
- Serialized Form
Methods inherited from class ca.nengo.model.impl.AbstractEnsemble |
addChangeListener, collectSpikes, findCommon1DOrigins, fireVisibleChangeEvent, getCollectSpikesRatio, getDocumentation, getHistory, getMode, getName, getNodes, getOrigin, getOrigins, getSpikePattern, isCollectingSpikes, listStates, redefineNodes, removeChangeListener, setCollectSpikesRatio, setDocumentation, setName, setSpikePattern |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlasticEnsembleImpl
public PlasticEnsembleImpl(java.lang.String name,
Node[] nodes)
throws StructuralException
- Parameters:
name
- Name of Ensemblenodes
- Nodes that make up the Ensemble
- Throws:
StructuralException
- if the given Nodes contain Terminations with the same
name but different dimensions
PlasticEnsembleImpl
public PlasticEnsembleImpl(java.lang.String name,
NodeFactory factory,
int n)
throws StructuralException
- Throws:
StructuralException
reset
public void reset(boolean randomize)
- Description copied from class:
AbstractEnsemble
- Resets each Node in this Ensemble.
- Specified by:
reset
in interface Resettable
- Overrides:
reset
in class AbstractEnsemble
- Parameters:
randomize
- True indicates that the object should be reset to a
randomly selected initial state (the object must be aware of the
distribution from which to draw from). False indicates that the
object should be reset to a fixed initial state (which it must
also know). Some objects may not support randomization of the initial
state, in which case a fixed state will be used in either case.- See Also:
Resettable.reset(boolean)
setLearning
public void setLearning(boolean learning)
- See Also:
Resettable.reset(boolean)
addTermination
public Termination addTermination(java.lang.String name,
float[][] weights,
float tauPSC,
boolean modulatory)
throws StructuralException
- Description copied from interface:
ExpandableNode
- Adds a new Termination onto this Node.
- Specified by:
addTermination
in interface ExpandableNode
- Overrides:
addTermination
in class EnsembleImpl
- Parameters:
weights
- Each row is used as a 1 by m matrix of weights in a new termination on the nth expandable nodename
- Unique name for the Termination (in the scope of this Node)tauPSC
- Time constant with which incoming signals are filtered. (All Terminations have
this property, but it may have slightly different interpretations per implementation.)modulatory
- If true, inputs to the Termination are not summed with other inputs (they
only have modulatory effects, eg on plasticity, which must be defined elsewhere).
- Returns:
- resulting Termination
- Throws:
StructuralException
- if length of weights doesn't equal getDimension(),
or if there are different numbers of weights given in different rows.- See Also:
ExpandableNode.addTermination(java.lang.String, float[][], float, boolean)
setPlasticityRule
public void setPlasticityRule(java.lang.String terminationName,
PlasticityRule rule)
throws StructuralException
- Sets the given plasticity rule for this Ensemble. Termination must be plastic.
- Throws:
StructuralException
- See Also:
PlasticEnsemble.setPlasticityRule(java.lang.String, ca.nengo.model.plasticity.PlasticityRule)
setPlasticityInterval
public void setPlasticityInterval(float time)
- See Also:
PlasticEnsemble.setPlasticityInterval(float)
getPlasticityInterval
public float getPlasticityInterval()
- See Also:
PlasticEnsemble.getPlasticityInterval()
getPlasticityRule
public PlasticityRule getPlasticityRule(java.lang.String terminationName)
throws StructuralException
- Throws:
StructuralException
- See Also:
PlasticEnsemble.getPlasticityRule(java.lang.String)
run
public void run(float startTime,
float endTime)
throws SimulationException
- Description copied from class:
AbstractEnsemble
- Runs each neuron in the Ensemble.
- Specified by:
run
in interface Node
- Overrides:
run
in class AbstractEnsemble
- Parameters:
startTime
- simulation time at which running starts (s)endTime
- simulation time at which running ends (s)
- Throws:
SimulationException
- if a problem is encountered while trying to run- See Also:
Node.run(float, float)
clone
public Ensemble clone()
throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interface Node
- Overrides:
clone
in class EnsembleImpl
- Returns:
- An independent copy of the Node
- Throws:
java.lang.CloneNotSupportedException