|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.nengo.model.impl.AbstractEnsemble
public abstract class AbstractEnsemble
Abstract class that can be used as a basis for Ensemble implementations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface ca.nengo.util.VisiblyMutable |
|---|
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent |
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,EnsembleTermination> |
myTerminations
|
| Constructor Summary | |
|---|---|
AbstractEnsemble(java.lang.String name,
Node[] nodes)
Note that setMode(SimulationMode.DEFAULT) is called at construction time. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(VisiblyMutable.Listener listener)
|
Ensemble |
clone()
|
void |
collectSpikes(boolean collect)
|
static java.util.List<java.lang.String> |
findCommon1DOrigins(Node[] nodes)
|
protected void |
fireVisibleChangeEvent()
Called by subclasses when properties have changed in such a way that the display of the ensemble may need updating. |
int |
getCollectSpikesRatio()
|
java.lang.String |
getDocumentation()
|
TimeSeries |
getHistory(java.lang.String stateName)
Note that the units of TimeSeries' for a given state do not change over time (ie at different time steps). |
SimulationMode |
getMode()
Note that this reflects the latest mode requested of the Ensemble, and that individual Neurons may run in different modes (see setMode). |
java.lang.String |
getName()
|
Node[] |
getNodes()
|
Origin |
getOrigin(java.lang.String name)
|
Origin[] |
getOrigins()
|
SpikePattern |
getSpikePattern()
This method provides a means of efficiently storing the output of an Ensemble if the component Nodes have Origins that produce SpikeOutput. |
Termination |
getTermination(java.lang.String name)
|
Termination[] |
getTerminations()
|
boolean |
isCollectingSpikes()
|
java.util.Properties |
listStates()
|
void |
removeChangeListener(VisiblyMutable.Listener listener)
|
void |
reset(boolean randomize)
Resets each Node in this Ensemble. |
void |
run(float startTime,
float endTime)
Runs each neuron in the Ensemble. |
void |
setCollectSpikesRatio(int n)
|
void |
setDocumentation(java.lang.String text)
|
void |
setMode(SimulationMode mode)
When this method is called, setMode(...) is called on each Node in the Ensemble. |
void |
setName(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,EnsembleTermination> myTerminations
| Constructor Detail |
|---|
public AbstractEnsemble(java.lang.String name,
Node[] nodes)
name - Unique name of Ensemblenodes - Nodes that Ensemble contains| Method Detail |
|---|
public java.lang.String getName()
getName in interface NodeNode.getName()
public void setName(java.lang.String name)
throws StructuralException
setName in interface Nodename - The new name
StructuralExceptionpublic Node[] getNodes()
getNodes in interface EnsembleEnsemble.getNodes()public void setMode(SimulationMode mode)
setMode in interface SimulationMode.ModeConfigurablemode - SimulationMode in which it is desired that the object runs.SimulationMode.ModeConfigurable.setMode(ca.nengo.model.SimulationMode)public SimulationMode getMode()
getMode in interface SimulationMode.ModeConfigurableSimulationMode.ModeConfigurable.getMode()
public void run(float startTime,
float endTime)
throws SimulationException
run in interface NodestartTime - simulation time at which running starts (s)endTime - simulation time at which running ends (s)
SimulationException - if a problem is encountered while trying to runNode.run(float, float)public void reset(boolean randomize)
reset in interface Resettablerandomize - 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 Origin getOrigin(java.lang.String name)
throws StructuralException
getOrigin in interface Nodename - Name of an Origin on this Node
StructuralException - if the named Origin does not existNode.getOrigin(java.lang.String)
public Termination getTermination(java.lang.String name)
throws StructuralException
getTermination in interface Nodename - Name of a Termination onto this Node
StructuralException - if the named Termination does not existNode.getTermination(java.lang.String)public Origin[] getOrigins()
getOrigins in interface NodeNode.getOrigins()public Termination[] getTerminations()
getTerminations in interface NodeNode.getTerminations()public void collectSpikes(boolean collect)
collectSpikes in interface Ensemblecollect - If true, the spike pattern is recorded in subsequent runs and
is available through getSpikePattern() (defaults to false)Ensemble.collectSpikes(boolean)public boolean isCollectingSpikes()
isCollectingSpikes in interface EnsembleEnsemble.isCollectingSpikes()public int getCollectSpikesRatio()
public void setCollectSpikesRatio(int n)
n - Inverse of the proportion of nodes from which to collect spikespublic SpikePattern getSpikePattern()
Ensemble
getSpikePattern in interface EnsembleEnsemble.getSpikePattern()
public TimeSeries getHistory(java.lang.String stateName)
throws SimulationException
Probeable
getHistory in interface ProbeablestateName - A state variable name
SimulationException - if the Probeable does not have the requested stateProbeable.getHistory(java.lang.String)public java.util.Properties listStates()
listStates in interface ProbeableProbeable.listStates()public static java.util.List<java.lang.String> findCommon1DOrigins(Node[] nodes)
nodes - A list of Nodes
public java.lang.String getDocumentation()
getDocumentation in interface NodeNode.getDocumentation()public void setDocumentation(java.lang.String text)
setDocumentation in interface Nodetext - New user-specified documentation for the NodeNode.setDocumentation(java.lang.String)public void addChangeListener(VisiblyMutable.Listener listener)
addChangeListener in interface VisiblyMutablelistener - Listener to addVisiblyMutable.addChangeListener(ca.nengo.util.VisiblyMutable.Listener)public void removeChangeListener(VisiblyMutable.Listener listener)
removeChangeListener in interface VisiblyMutablelistener - Listener to removeVisiblyMutable.removeChangeListener(ca.nengo.util.VisiblyMutable.Listener)protected void fireVisibleChangeEvent()
public Ensemble clone()
throws java.lang.CloneNotSupportedException
clone in interface Nodeclone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||