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:
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.
Constructor and Description |
---|
ProbeableOrigin(Node node,
Probeable probeable,
java.lang.String state,
int dimension,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
ProbeableOrigin |
clone() |
ProbeableOrigin |
clone(Node node)
Clone method that changes necessary parameters to point to a new parent,
for use in cloning ensembles, etc.
|
int |
getDimensions() |
java.lang.String |
getName() |
Node |
getNode() |
boolean |
getRequiredOnCPU() |
InstantaneousOutput |
getValues() |
void |
setRequiredOnCPU(boolean val) |
void |
setValues(InstantaneousOutput values) |
public ProbeableOrigin(Node node, Probeable probeable, java.lang.String state, int dimension, java.lang.String name) throws StructuralException
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 OriginStructuralException
- if there is a problem running an initial Probeable.getHistory() to
ascertain the units.public java.lang.String getName()
getName
in interface Origin
Origin.getName()
public int getDimensions()
getDimensions
in interface Origin
Origin.getDimensions()
public InstantaneousOutput getValues() throws SimulationException
getValues
in interface Origin
SimulationException
- if there is any problem retrieving valuespublic void setValues(InstantaneousOutput values)
public Node getNode()
getNode
in interface Origin
Origin.getNode()
public void setRequiredOnCPU(boolean val)
setRequiredOnCPU
in interface Origin
public boolean getRequiredOnCPU()
getRequiredOnCPU
in interface Origin
public ProbeableOrigin clone() throws java.lang.CloneNotSupportedException
public ProbeableOrigin clone(Node node) throws java.lang.CloneNotSupportedException
Origin