ca.nengo.model.plasticity.impl
Class AbstractRealLearningFunction

java.lang.Object
  extended by ca.nengo.math.impl.AbstractFunction
      extended by ca.nengo.model.plasticity.impl.AbstractRealLearningFunction
All Implemented Interfaces:
Function, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ErrorLearningFunction

public abstract class AbstractRealLearningFunction
extends AbstractFunction

Defines the input available to a real-valued learning rule function.

Author:
Trevor Bekolay
See Also:
Serialized Form

Field Summary
protected  float myLearningRate
           
 
Fields inherited from class ca.nengo.math.impl.AbstractFunction
DIMENSION_PROPERTY
 
Constructor Summary
AbstractRealLearningFunction()
          Ensures that the function is of the correct dimension.
 
Method Summary
 AbstractRealLearningFunction clone()
           
protected abstract  float deltaOmega(float input, float time, float currentWeight, float modInput, float originState, int postIndex, int preIndex, int dim)
          A learning rule that defines how the connection weight changes on each timestep (or longer, depending on the plasticity interval).
 float getLearningRate()
           
 float map(float[] from)
          Calls deltaOmega.
 void setLearningRate(float rate)
           
 
Methods inherited from class ca.nengo.math.impl.AbstractFunction
getDimension, multiMap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myLearningRate

protected float myLearningRate
Constructor Detail

AbstractRealLearningFunction

public AbstractRealLearningFunction()
Ensures that the function is of the correct dimension.

Method Detail

map

public float map(float[] from)
Calls deltaOmega.

Specified by:
map in interface Function
Specified by:
map in class AbstractFunction
Parameters:
from - Must have same length as getDimension()
Returns:
result of function operation on arg
See Also:
Function.map(float[])

deltaOmega

protected abstract float deltaOmega(float input,
                                    float time,
                                    float currentWeight,
                                    float modInput,
                                    float originState,
                                    int postIndex,
                                    int preIndex,
                                    int dim)
A learning rule that defines how the connection weight changes on each timestep (or longer, depending on the plasticity interval).

Parameters:
input - The activity coming into the synapse from its inputs
time - The current simulation time
currentWeight - The current connection weight between the pre and post neurons
modInput - The modulatory input, for this particular dimension (see dim)
originState - The state of the origin from the postsynaptic population, for this particular dimension (see dim)
postIndex - The neuron index in the post-synaptic population
preIndex - The neuron index in the pre-synaptic population
dim - The dimension of the modulatory input and the origin state

clone

public AbstractRealLearningFunction clone()
                                   throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Function
Overrides:
clone in class AbstractFunction
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()

setLearningRate

public void setLearningRate(float rate)
Parameters:
rate - New learning rate

getLearningRate

public float getLearningRate()