public class BasicOrigin extends java.lang.Object implements Origin, Noise.Noisy, Resettable, Configurable
Constructor and Description |
---|
BasicOrigin()
Dummy default, necessary for object "ArrayOrigin" in jython code
TODO: Still necessary?
|
BasicOrigin(Node node,
java.lang.String name,
int dimension,
Units units) |
Modifier and Type | Method and Description |
---|---|
BasicOrigin |
clone() |
BasicOrigin |
clone(Node node)
Clone method that changes necessary parameters to point to a new parent,
for use in cloning ensembles, etc.
|
Configuration |
getConfiguration() |
int |
getDimensions() |
java.lang.String |
getName() |
Node |
getNode() |
Noise |
getNoise() |
boolean |
getRequiredOnCPU() |
Units |
getUnits() |
InstantaneousOutput |
getValues() |
void |
reset(boolean randomize) |
void |
setDimensions(int dim) |
void |
setName(java.lang.String name) |
void |
setNoise(Noise noise)
Note that noise is only applied to RealOutput.
|
void |
setRequiredOnCPU(boolean val) |
void |
setUnits(Units units) |
void |
setValues(float startTime,
float endTime,
float[] values)
This method is normally called by the Node that contains this Origin, to set the input that is
read by other nodes from getValues().
|
void |
setValues(InstantaneousOutput values)
This method is normally called by the Node that contains this Origin, to set the input that is
read by other nodes from getValues().
|
public BasicOrigin()
public Configuration getConfiguration()
getConfiguration
in interface Configurable
Configurable.getConfiguration()
public void setValues(float startTime, float endTime, float[] values)
startTime
- Start time of step for which outputs are being definedendTime
- End time of step for which outputs are being definedvalues
- Values underlying RealOutput that is to be output by this Origin in subsequent
calls to getValues()public void setValues(InstantaneousOutput values)
public int getDimensions()
getDimensions
in interface Origin
Origin.getDimensions()
public void setDimensions(int dim)
dim
- Origin dimensionalitypublic java.lang.String getName()
getName
in interface Origin
Origin.getName()
public void setName(java.lang.String name)
name
- Origin namepublic Units getUnits()
public void setUnits(Units units)
units
- Units used by this originpublic InstantaneousOutput getValues() throws SimulationException
getValues
in interface Origin
SimulationException
- if there is any problem retrieving valuesOrigin.getValues()
public Noise getNoise()
getNoise
in interface Noise.Noisy
Noise.Noisy.getNoise()
public void setNoise(Noise noise)
setNoise
in interface Noise.Noisy
noise
- New noise modelNoise.Noisy.setNoise(ca.nengo.model.Noise)
public Node getNode()
getNode
in interface Origin
Origin.getNode()
public BasicOrigin clone() throws java.lang.CloneNotSupportedException
public BasicOrigin clone(Node node) throws java.lang.CloneNotSupportedException
Origin
public void reset(boolean randomize)
reset
in interface Resettable
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.Resettable.reset(boolean)
public void setRequiredOnCPU(boolean val)
setRequiredOnCPU
in interface Origin
public boolean getRequiredOnCPU()
getRequiredOnCPU
in interface Origin