|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.nengo.model.plasticity.impl.CompositePlasticityRule
public class CompositePlasticityRule
A PlasticityRule that delegates to underlying spike-based and rate-based rules. This enables switching between rate and spiking modes in simulations with plasticity. The spike-based rule is used whenever activity at both the plastic termination and at least one origin are of type SpikeOutput. Is either none of the origins has spiking activity, or the plastic termination doesn't receive spiking input, or both, then the rate-based rule is used. The type of input to other (potentially modulatory) terminations is not considered.
Note that using this class introduces substantial overhead. It may be worthwhile to switch rules manually, or to handle both types explicitly in a custom rule implementation.
TODO: test
| Nested Class Summary | |
|---|---|
static class |
CompositePlasticityRule.NullRule
A null plasticity rule that always returns zeros from getDerivative(). |
| Constructor Summary | |
|---|---|
CompositePlasticityRule()
Defaults to NullRules. |
|
CompositePlasticityRule(PlasticityRule spikeRule,
PlasticityRule realRule)
|
|
| Method Summary | |
|---|---|
PlasticityRule |
clone()
|
float[][] |
getDerivative(float[][] transform,
InstantaneousOutput input,
float time)
|
PlasticityRule |
getRealRule()
|
PlasticityRule |
getSpikeRule()
|
void |
setOriginState(java.lang.String name,
InstantaneousOutput state,
float time)
Provides state or functional output, which may serve as an indication of postsynaptic activity (used in Hebbian learning). |
void |
setRealRule(PlasticityRule rule)
|
void |
setSpikeRule(PlasticityRule rule)
|
void |
setTerminationState(java.lang.String name,
InstantaneousOutput state,
float time)
Provides potentially modulatory input to the rule. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CompositePlasticityRule(PlasticityRule spikeRule,
PlasticityRule realRule)
spikeRule - Rule to use when both inputs and outputs are spikingrealRule - Rule to use when either input or output is real-valuedpublic CompositePlasticityRule()
NullRules.
| Method Detail |
|---|
public PlasticityRule getSpikeRule()
public void setSpikeRule(PlasticityRule rule)
rule - Rule to use when both inputs and outputs are spikingpublic PlasticityRule getRealRule()
public void setRealRule(PlasticityRule rule)
rule - Rule to use when either input or output is real-valued
public float[][] getDerivative(float[][] transform,
InstantaneousOutput input,
float time)
getDerivative in interface PlasticityRuletransform - The present transformation matrix of a Terminationinput - The present input to the Terminationtime - Simulation time at which input arrives at site of plasticity
PlasticityRule.getDerivative(float[][], ca.nengo.model.InstantaneousOutput, float)
public void setOriginState(java.lang.String name,
InstantaneousOutput state,
float time)
PlasticityRule
setOriginState in interface PlasticityRulename - The name of a DecodedOrigin from the ensemblestate - The present value of output from the named Origintime - Simulation time at which state arrives at site of plasticityPlasticityRule.setOriginState(java.lang.String, ca.nengo.model.InstantaneousOutput, float)
public void setTerminationState(java.lang.String name,
InstantaneousOutput state,
float time)
PlasticityRule
setTerminationState in interface PlasticityRulename - The name of a DecodedTermination onto the ensemblestate - The present value of output from the named Termination (may differ
from its input in terms of dynamics and dimension)time - Simulation time at which state arrives at site of plasticityPlasticityRule.setTerminationState(java.lang.String, ca.nengo.model.InstantaneousOutput, float)
public PlasticityRule clone()
throws java.lang.CloneNotSupportedException
clone in interface PlasticityRuleclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||