ca.nengo.model.impl
Class ProbeableOrigin
java.lang.Object
ca.nengo.model.impl.ProbeableOrigin
- All Implemented Interfaces:
- Origin, java.io.Serializable, java.lang.Cloneable
public class ProbeableOrigin
- extends java.lang.Object
- implements Origin
An Origin that obtains output from an underlying Probeable object.
As an example of use, suppose a Neuron has a SynapticIntegrator with a complex
dendritic morphology, and that it is desired to model a gap junction between
one of these dendrites and a dendrite on another Neuron. If the SynapticIntegrator
can provide gap-junctional Origins, there is no problem. But it might not (for
example the implementor of the SynapticIntegrator may not have anticipated this
usage). However, if the SynapticIntegrator is Probeable and can be probed for the
appropriate state variables, eg ion concentrations in the compartment of interest,
then this class (ProbeableOrigin) provides a convenient way to model an Origin
that outputs the probed information.
For a Neuron, if multi-dimensional state is to be output, it is generally better
to create multiple one-dimensional Outputs than to creat one multi-dimensional Output.
Reasons for this include the following:
- As with all Origins, all the output values at a given instant have
the same units. So, if you want to output states with different units, you must use
separate Origins.
- Ensembles may combine identically-named Ouputs of different Neurons
into a single Ensemble-level Output (with the same dimension as the number of Neurons that
have that Output). This doesn't work well with multi-dimensional Neuron Outputs. So, if your
Neurons will be grouped into an Ensemble, it's better to stick with 1-D Outputs. The
other option (which seems more convoluted) is to make sure that each Neuron's n-D Output
has a distinct name (ie distinct from the names of the correspoding Outputs of other Neurons
in the same Ensemble). Incorporating a number into the name is one way to do this.
For these reasons, this class supports only 1-dimensional Output, as a way to keep you
out of trouble. This limits its usefulness with Probeables that are Ensembles, but such
Probeables probably already provide the needed Outputs anyway.
If you really do want a Neuron to serve as a multi-dimensional Origin, you can do that,
but not with this class.
- Author:
- Bryan Tripp
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProbeableOrigin
public ProbeableOrigin(Node node,
Probeable probeable,
java.lang.String state,
int dimension,
java.lang.String name)
throws StructuralException
- Parameters:
node
- The parent nodeprobeable
- The Probeable from which to obtain state variables to outputstate
- State variable to outputdimension
- Index of the dimension of the specified state variable that is to be outputname
- Name of this Origin
- Throws:
StructuralException
- if there is a problem running an initial Probeable.getHistory() to
ascertain the units.
getName
public java.lang.String getName()
- Specified by:
getName
in interface Origin
- Returns:
- Name of this Origin (unique in the scope of a source of Origins, eg a Neuron or
Ensemble)
- See Also:
Origin.getName()
getDimensions
public int getDimensions()
- Specified by:
getDimensions
in interface Origin
- Returns:
- 1
- See Also:
Origin.getDimensions()
getValues
public InstantaneousOutput getValues()
throws SimulationException
- Specified by:
getValues
in interface Origin
- Returns:
- The final value in the TimeSeries for the state variable that is retrieved
from the underlying Probeable
- Throws:
SimulationException
- if there is any problem retrieving values
getNode
public Node getNode()
- Specified by:
getNode
in interface Origin
- Returns:
- The Node to which the Origin belongs
- See Also:
Origin.getNode()
clone
public Origin clone()
throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interface Origin
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException