ca.nengo.util.impl
Class ProbeImpl
java.lang.Object
ca.nengo.util.impl.ProbeImpl
- All Implemented Interfaces:
- Probe, java.io.Serializable
public class ProbeImpl
- extends java.lang.Object
- implements Probe, java.io.Serializable
Collects information from Probeable
objects.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProbeImpl
public ProbeImpl()
connect
public void connect(java.lang.String ensembleName,
Probeable target,
java.lang.String stateName,
boolean record)
throws SimulationException
- Specified by:
connect
in interface Probe
- Parameters:
ensembleName
- Name of the Ensemble the target object belongs to. Null, if
the target is a top-level node.target
- The object about which state history is to be collectedstateName
- The name of the state variable to collectrecord
- If true, getData() returns history since last connect() or
reset(), otherwise getData() returns most recent sample
- Throws:
SimulationException
- if the given target does not have the given state- See Also:
Probe.connect(java.lang.String, ca.nengo.model.Probeable, java.lang.String, boolean)
connect
public void connect(Probeable target,
java.lang.String stateName,
boolean record)
throws SimulationException
- Specified by:
connect
in interface Probe
- Parameters:
target
- The object about which state history is to be collectedstateName
- The name of the state variable to collectrecord
- If true, getData() returns history since last connect() or
reset(), otherwise getData() returns most recent sample
- Throws:
SimulationException
- if the given target does not have the given state- See Also:
Probe.connect(Probeable, String, boolean)
reset
public void reset()
- Description copied from interface:
Probe
- Clears collected data.
- Specified by:
reset
in interface Probe
- See Also:
Probe.reset()
collect
public void collect(float time)
- Description copied from interface:
Probe
- Processes new data. To be called after every Network time step.
- Specified by:
collect
in interface Probe
- See Also:
Probe.collect(float)
getData
public TimeSeries getData()
- Specified by:
getData
in interface Probe
- Returns:
- All collected data since last reset()
- See Also:
Probe.getData()
setSamplingRate
public void setSamplingRate(float rate)
- Specified by:
setSamplingRate
in interface Probe
- Parameters:
rate
- Rate in samples per second. The default is one sample per network time step, and it is
not possible to sample faster than this (specifying a higher sampling rate has no effect).- See Also:
Probe.setSamplingRate(float)
getTarget
public Probeable getTarget()
- Specified by:
getTarget
in interface Probe
- Returns:
- The object about which state history is to be collected
- See Also:
Probe.getTarget()
getStateName
public java.lang.String getStateName()
- Specified by:
getStateName
in interface Probe
- Returns:
- The name of the state variable to collect
- See Also:
Probe.getStateName()
isInEnsemble
public boolean isInEnsemble()
- Specified by:
isInEnsemble
in interface Probe
- Returns:
- Whether the target the node is attached to is inside an Ensemble
- See Also:
Probe.isInEnsemble()
getEnsembleName
public java.lang.String getEnsembleName()
- Specified by:
getEnsembleName
in interface Probe
- Returns:
- The name of the Ensemble the target the Probe is attached to is
in. Null if it's not in one
- See Also:
Probe.getEnsembleName()
getProbeTask
public ProbeTask getProbeTask()
- Specified by:
getProbeTask
in interface Probe
- Returns:
- The probe task that is runs this probe.
- See Also:
Probe.getProbeTask()