|
Nengo.ca | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.nengo.model.neuron.impl.SpikeGeneratorOrigin
public class SpikeGeneratorOrigin
An Origin that obtains output from an underlying SpikeGenerator. This is a good Origin to use as the main (axonal) output of a spiking neuron. This Origin may produce SpikeOutput or RealOutput depending on whether it is running in DEFAULT or CONSTANT_RATE SimulationMode.
Constructor Summary | |
---|---|
SpikeGeneratorOrigin(Node node,
SpikeGenerator generator)
|
Method Summary | |
---|---|
SpikeGeneratorOrigin |
clone()
|
SpikeGeneratorOrigin |
clone(Ensemble e)
Clone method that changes necessary parameters to point to a new parent, for use in cloning ensembles, etc. |
int |
getDimensions()
|
SpikeGenerator |
getGenerator()
|
java.lang.String |
getName()
|
Node |
getNode()
|
boolean |
getRequiredOnCPU()
|
InstantaneousOutput |
getValues()
Returns spike values or real-valued spike rate values, depending on whether the mode is SimulationMode.DEFAULT or SimulationMode.CONSTANT_RATE. |
void |
reset(boolean randomize)
|
void |
run(float[] times,
float[] current)
|
void |
setMode(SimulationMode mode)
Need this to fix bug where the generator's mode is changed, but myOutput is still of the type of the old mode |
void |
setName(java.lang.String name)
|
void |
setRequiredOnCPU(boolean val)
|
void |
setValues(InstantaneousOutput val)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpikeGeneratorOrigin(Node node, SpikeGenerator generator)
node
- The parent Nodegenerator
- The SpikeGenerator from which this Origin is to obtain output.Method Detail |
---|
public java.lang.String getName()
getName
in interface Origin
Origin.getName()
public void setName(java.lang.String name)
public int getDimensions()
getDimensions
in interface Origin
Origin.getDimensions()
public void run(float[] times, float[] current) throws SimulationException
times
- Passed on to the run() or runConstantRate() method of the wrapped SpikeGenerator
depending on whether the SimulationMode is DEFAULT or CONSTANT_RATE (in the latter case
only the first value is used).current
- Passed on like the times argument.
SimulationException
- Arising From the underlying SpikeGenerator, or if the given times
or values arrays have length 0 when in CONSTANT_RATE mode (the latter because the first
entries must be extracted).public InstantaneousOutput getValues()
getValues
in interface Origin
Origin.getValues()
public void setValues(InstantaneousOutput val)
setValues
in interface Origin
public Node getNode()
getNode
in interface Origin
Origin.getNode()
public SpikeGenerator getGenerator()
public void setMode(SimulationMode mode)
mode
- Target simulation modeSimulationMode.ModeConfigurable.setMode(ca.nengo.model.SimulationMode)
public SpikeGeneratorOrigin clone() throws java.lang.CloneNotSupportedException
clone
in interface Origin
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if clone cannot be madepublic SpikeGeneratorOrigin clone(Ensemble e) throws java.lang.CloneNotSupportedException
Origin
clone
in interface Origin
e
- New parent ensemble
java.lang.CloneNotSupportedException
- if clone cannot be madepublic void setRequiredOnCPU(boolean val)
setRequiredOnCPU
in interface Origin
public boolean getRequiredOnCPU()
getRequiredOnCPU
in interface Origin
public void reset(boolean randomize)
|
Nengo.ca | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |