ca.nengo.model.nef
Interface NEFEnsemble

All Superinterfaces:
java.lang.Cloneable, DecodableEnsemble, Ensemble, Node, PlasticEnsemble, Probeable, Resettable, java.io.Serializable, SimulationMode.ModeConfigurable, VisiblyMutable
All Known Implementing Classes:
NEFEnsembleImpl

public interface NEFEnsemble
extends DecodableEnsemble

A group of Nodes that represent a scalar, vector, or function, as characterized in Eliasmith & Anderson's Neural Engineering Framework.

All Nodes in an NEFEnsemble must be NEFNodes.

Author:
Bryan Tripp

Nested Class Summary
 
Nested classes/interfaces inherited from interface ca.nengo.util.VisiblyMutable
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent, VisiblyMutable.NodeRemovedEvent
 
Field Summary
static java.lang.String X
          Standard name for the Origin corresponding to the decoded estimate of the state variables that Ensemble represents (X is a standard name for state variables in state-space models).
 
Method Summary
 BiasOrigin addBiasOrigin(Origin existing, int numInterneurons, java.lang.String name, boolean excitatory)
          Adds a BiasOrigin, which operates in parallel with an existing Origin, such that the effective weights of the two origins together are all of the same sign (as is normally the case with synaptic weights in the brain).
 BiasTermination[] addBiasTerminations(DecodedTermination baseTermination, float interneuronTauPSC, float[][] biasDecoder, float[][] functionDecoders)
          Adds BiasTerminations, which are meant to receive projections from BiasOrigins.
 Origin addDecodedOrigin(java.lang.String name, Function[] functions, java.lang.String nodeOrigin)
          Adds an Origin that corresponds to a decoding of the activities of Nodes in this Ensemble.
 Termination addDecodedTermination(java.lang.String name, float[][] matrix, float[] tfNumerator, float[] tfDenominator, float passthrough, boolean isModulatory)
          As above but with arbitrary single-input-single-output PSC dynamics.
 Termination addDecodedTermination(java.lang.String name, float[][] matrix, float tauPSC, boolean isModulatory)
          Adds a new Termination into this Ensemble, at which information is to be received in the form of decoded state variables rather than spikes, etc.
 int getDimension()
           
 float[][] getEncoders()
           
 NEFEnsembleFactory getEnsembleFactory()
           
 int getNodeCount()
          For changing the number of neurons in the ensemble
 float[] getRadii()
           
 void releaseMemory()
          Releases any memory that can be freed.
 void removeDecodedTermination(java.lang.String name)
           
 void setEnsembleFactory(NEFEnsembleFactory factory)
          Gives the ensemble a reference to the factory used to created it (useful for adding more neurons later)
 void setNodeCount(int value)
           
 
Methods inherited from interface ca.nengo.model.nef.DecodableEnsemble
addDecodedOrigin, addDecodedOrigin, doneOrigins, removeDecodedOrigin
 
Methods inherited from interface ca.nengo.model.PlasticEnsemble
getPlasticityInterval, getPlasticityRule, setPlasticityInterval, setPlasticityRule
 
Methods inherited from interface ca.nengo.model.Ensemble
collectSpikes, getNodes, getSpikePattern, isCollectingSpikes, redefineNodes
 
Methods inherited from interface ca.nengo.model.Node
clone, getDocumentation, getName, getOrigin, getOrigins, getTermination, getTerminations, run, setDocumentation, setName
 
Methods inherited from interface ca.nengo.model.Resettable
reset
 
Methods inherited from interface ca.nengo.model.SimulationMode.ModeConfigurable
getMode, setMode
 
Methods inherited from interface ca.nengo.util.VisiblyMutable
addChangeListener, removeChangeListener
 
Methods inherited from interface ca.nengo.model.Probeable
getHistory, listStates
 

Field Detail

X

static final java.lang.String X
Standard name for the Origin corresponding to the decoded estimate of the state variables that Ensemble represents (X is a standard name for state variables in state-space models).

See Also:
Constant Field Values
Method Detail

getDimension

int getDimension()
Returns:
Dimension of represented state space (eg 1 for scalar representation)

getEncoders

float[][] getEncoders()
Returns:
List of encoders for each Node (each item is the encoding vector for a Node).

getRadii

float[] getRadii()
Returns:
Radius of encoded region in each dimension

addDecodedOrigin

Origin addDecodedOrigin(java.lang.String name,
                        Function[] functions,
                        java.lang.String nodeOrigin)
                        throws StructuralException
Adds an Origin that corresponds to a decoding of the activities of Nodes in this Ensemble.

Parameters:
name - Name of decoding
functions - Functions that define the decoding (one function for each dimension of output). All functions must have an input dimension equal to the dimension of this NEFEnsemble.
nodeOrigin - Name of the Node-level Origins from which this Ensemble-level Origin is derived (often Neuron.AXON)
Throws:
StructuralException - if functions do not all have the same input dimension as the dimension of this ensemble

addBiasOrigin

BiasOrigin addBiasOrigin(Origin existing,
                         int numInterneurons,
                         java.lang.String name,
                         boolean excitatory)
                         throws StructuralException
Adds a BiasOrigin, which operates in parallel with an existing Origin, such that the effective weights of the two origins together are all of the same sign (as is normally the case with synaptic weights in the brain). TODO: with a little work this could be pushed up to DecodableEnsemble (have to generalize constant-rate responses)

Parameters:
existing - An existing Origin on this NEFEnsemble
numInterneurons - Number of interneurons
name - Name of BiasOrigin (name of associated interneuron ensemble is also derived from this)
excitatory - If true, effective weights will be positive; if false they will be negative (inhibitory)
Returns:
Resulting BiasOrigin
Throws:
StructuralException - if given Origin is not a DecodedOrigin or if there is a construction problem

addDecodedTermination

Termination addDecodedTermination(java.lang.String name,
                                  float[][] matrix,
                                  float tauPSC,
                                  boolean isModulatory)
                                  throws StructuralException
Adds a new Termination into this Ensemble, at which information is to be received in the form of decoded state variables rather than spikes, etc.

Parameters:
name - Unique name for this Termination (in the scope of this Ensemble)
matrix - Transformation matrix which defines a linear map on incoming information, onto the space of vectors that can be represented by this NEFEnsemble. The first dimension is taken as matrix rows, and must have the same length as the Origin that will be connected to this Termination. The second dimension is taken as matrix columns, and must have the same length as the encoders of this NEFEnsemble. TODO: this is transposed?
tauPSC - Time constant of post-synaptic current decay (all Terminations have this property but it may have slightly different interpretations depending other properties of the Termination).
isModulatory - If true, inputs to this Termination do not drive Nodes in the Ensemble directly but may have modulatory influences (eg related to plasticity). If false, the transformation matrix output dimension must match the dimension of this Ensemble.
Returns:
The resulting Termination
Throws:
StructuralException - if given transformation matrix is not a matrix

addDecodedTermination

Termination addDecodedTermination(java.lang.String name,
                                  float[][] matrix,
                                  float[] tfNumerator,
                                  float[] tfDenominator,
                                  float passthrough,
                                  boolean isModulatory)
                                  throws StructuralException
As above but with arbitrary single-input-single-output PSC dynamics.

Parameters:
name - Unique name for this Termination (in the scope of this Ensemble)
matrix - Transformation matrix which defines a linear map on incoming information
tfNumerator - Coefficients of transfer function numerator (see CanonicalModel.getRealization(...) for details)
tfDenominator - Coefficients of transfer function denominator
isModulatory - If true, inputs to this Termination do not drive Nodes in the Ensemble directly but may have modulatory influences (eg related to plasticity). If false, the transformation matrix output dimension must match the dimension of this Ensemble.
Returns:
The resulting Termination
Throws:
StructuralException - if given transformation matrix is not a matrix or there is a problem with the transfer function

addBiasTerminations

BiasTermination[] addBiasTerminations(DecodedTermination baseTermination,
                                      float interneuronTauPSC,
                                      float[][] biasDecoder,
                                      float[][] functionDecoders)
                                      throws StructuralException
Adds BiasTerminations, which are meant to receive projections from BiasOrigins. A pair of BiasTerminations is returned, one to receive a projection directly from a BiasOrigin, and the other to receive a projection indirectly through an ensemble of interneurons that is associated with the BiasOrigin.

Parameters:
baseTermination - The Termination that is to be biased (so that projections to it consist of weights of a single sign)
interneuronTauPSC - Time constant of post-synaptic current decay of inhibitory termination from interneurons onto this ensemble
biasDecoder - The decoding weights of the associated BiasOrigin
functionDecoders - The decoding vectors of the BiasOrigin's associated base origin
Returns:
A pair of BiasTerminations: the first is to receive direct input from a BiasOrigin and the second is to receive input from the interneuron ensemble associated with the BiasOrigin (see BiasOrigin.getInterneurons())
Throws:
StructuralException

removeDecodedTermination

void removeDecodedTermination(java.lang.String name)
Parameters:
name - Name of Termination to remove.

setEnsembleFactory

void setEnsembleFactory(NEFEnsembleFactory factory)
Gives the ensemble a reference to the factory used to created it (useful for adding more neurons later)

Parameters:
factory -

getEnsembleFactory

NEFEnsembleFactory getEnsembleFactory()

getNodeCount

int getNodeCount()
For changing the number of neurons in the ensemble


setNodeCount

void setNodeCount(int value)
                  throws StructuralException
Throws:
StructuralException

releaseMemory

void releaseMemory()
Releases any memory that can be freed. Should be called after all origins are created for this ensemble