|
Nengo.ca | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.nengo.model.impl.NetworkImpl
ca.nengo.model.impl.NetworkArrayImpl
public class NetworkArrayImpl
Default implementation of Network Array.
Nested Class Summary | |
---|---|
class |
NetworkArrayImpl.ArrayOrigin
Origin representing the concatenation of origins on each of the ensembles within the network array. |
static interface |
NetworkArrayImpl.WeightFunc
|
Nested classes/interfaces inherited from class ca.nengo.model.impl.NetworkImpl |
---|
NetworkImpl.OriginWrapper, NetworkImpl.TerminationWrapper |
Nested classes/interfaces inherited from interface ca.nengo.util.VisiblyMutable |
---|
VisiblyMutable.Event, VisiblyMutable.Listener, VisiblyMutable.NameChangeEvent, VisiblyMutable.NodeRemovedEvent |
Field Summary |
---|
Fields inherited from class ca.nengo.model.impl.NetworkImpl |
---|
DEFAULT_NAME, myNumGPU, myNumJavaThreads, myUseGPU |
Constructor Summary | |
---|---|
NetworkArrayImpl(java.lang.String name,
NEFEnsembleImpl[] nodes)
Create a network holding an array of nodes. |
Method Summary | |
---|---|
Origin |
addDecodedOrigin(java.lang.String name,
Function[] functions,
java.lang.String nodeOrigin)
Create a new Origin. |
Termination |
addDecodedTermination(java.lang.String name,
float[][] matrix,
float tauPSC)
Create a new decoded termination. |
Termination |
addDecodedTermination(java.lang.String name,
float[][] matrix,
float tauPSC,
boolean modulatory)
|
Termination |
addIndexTermination(java.lang.String name,
float[][] matrix,
float tauPSC)
Create a new termination. |
Termination |
addIndexTermination(java.lang.String name,
float[][] matrix,
float tauPSC,
boolean isModulatory)
|
Termination |
addIndexTermination(java.lang.String name,
float[][] matrix,
float tauPSC,
boolean isModulatory,
int[] index)
|
Termination |
addIndexTermination(java.lang.String name,
float[][] matrix,
float tauPSC,
int[] index)
|
Termination |
addPlasticTermination(java.lang.String name,
float[][] weights,
float tauPSC,
float[][] decoders)
|
Termination |
addPlasticTermination(java.lang.String name,
float[][] weights,
float tauPSC,
float[][] decoders,
NetworkArrayImpl.WeightFunc weightFunc)
Create a new plastic termination. |
Termination |
addTermination(java.lang.String name,
float[][][] matrix,
float tauPSC)
Create a new termination. |
Termination |
addTermination(java.lang.String name,
float[][][] weights,
float tauPSC,
boolean modulatory)
|
Termination |
addTermination(java.lang.String name,
float[][] matrix,
float tauPSC)
Create a new termination. |
Termination |
addTermination(java.lang.String name,
float[][] weights,
float tauPSC,
boolean modulatory)
|
void |
createEnsembleOrigin(java.lang.String name)
Create an Origin that concatenates the values of internal Origins. |
void |
exposeAxons()
Exposes the AXON terminations of each ensemble in the network. |
int |
getDimension()
|
float[][] |
getEncoders()
Returns the encoders for the whole network array (the encoders of each population within the array concatenated together). |
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). |
int |
getNeurons()
|
int[] |
getNodeDimension()
|
Node[] |
getNodes()
Gets the nodes in the proper order from the network array. |
Termination[] |
getTerminations()
|
void |
learn(java.lang.String learnTerm,
java.lang.String modTerm,
float rate)
Sets learning parameters on learned terminations in the array. |
void |
learn(java.lang.String learnTerm,
java.lang.String modTerm,
float rate,
boolean oja)
Sets learning parameters on learned terminations in the array. |
java.util.Properties |
listStates()
|
void |
releaseMemory()
Releases memory of all ensembles in the network. |
void |
setLearning(boolean learn)
Sets learning on/off for all ensembles in the network. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetworkArrayImpl(java.lang.String name, NEFEnsembleImpl[] nodes) throws StructuralException
name
- The name of the NetworkArray to createnodes
- The ca.nengo.model.nef.NEFEnsemble nodes to combine together
StructuralException
Method Detail |
---|
public void createEnsembleOrigin(java.lang.String name) throws StructuralException
name
- The name of the Origin to create. Each internal node must already have an Origin
with that name.
StructuralException
public int getNeurons()
public Origin addDecodedOrigin(java.lang.String name, Function[] functions, java.lang.String nodeOrigin) throws StructuralException
name
- The name of the newly created originfunctions
- A list of ca.nengo.math.Function objects to approximate at this originnodeOrigin
- Name of the base Origin to use to build this function approximation
(this will always be 'AXON' for spike-based synapses)
StructuralException
public Termination addTermination(java.lang.String name, float[][] matrix, float tauPSC) throws StructuralException
name
- The name of the newly created terminationweights
- Synaptic connection weight matrix (NxM where N is the total number of neurons in the NetworkArray)tauPSC
- Post-synaptic time constantmodulatory
- Boolean value that is False for normal connections, True for modulatory connections
(which adjust neural properties rather than the input current)
StructuralException
public Termination addTermination(java.lang.String name, float[][] weights, float tauPSC, boolean modulatory) throws StructuralException
StructuralException
public Termination addTermination(java.lang.String name, float[][][] matrix, float tauPSC) throws StructuralException
name
- The name of the newly created terminationweights
- Synaptic connection weight matrix (LxNxM where L is the number of nodes in the array,
N is the number of neurons in each node, and M is the dimensionality of each node)tauPSC
- Post-synaptic time constantmodulatory
- Boolean value that is False for normal connections, True for modulatory connections
(which adjust neural properties rather than the input current)
StructuralException
public Termination addTermination(java.lang.String name, float[][][] weights, float tauPSC, boolean modulatory) throws StructuralException
StructuralException
public Termination addDecodedTermination(java.lang.String name, float[][] matrix, float tauPSC) throws StructuralException
name
- The name of the newly created terminationmatrix
- Transformation matrix which defines a linear map on incoming information,
onto the space of vectors that can be represented by this NetworkArray. The first dimension
is taken as matrix columns, and must have the same length as the Origin that will be connected
to this Termination. The second dimension is taken as matrix rows, and must have the same
length as the encoders of this NEFEnsemble.tauPSC
- Post-synaptic time constantmodulatory
- Boolean value that is False for normal connections, True for modulatory connections
(which adjust neural properties rather than the input current)
StructuralException
public Termination addDecodedTermination(java.lang.String name, float[][] matrix, float tauPSC, boolean modulatory) throws StructuralException
StructuralException
public Termination addIndexTermination(java.lang.String name, float[][] matrix, float tauPSC) throws StructuralException
string
- name: the name of the newly created originmatrix:
- synaptic connection weight matrix (NxM where M is the total number of neurons in the ensembles to be connected)float
- tauPSC: post-synaptic time constantboolean
- isModulatory: False for normal connections, True for modulatory connections (which adjust neural
properties rather than the input current)index:
- The indexes of the ensembles to connect to. If set to None, this function behaves exactly like addTermination().
StructuralException
public Termination addIndexTermination(java.lang.String name, float[][] matrix, float tauPSC, boolean isModulatory) throws StructuralException
StructuralException
public Termination addIndexTermination(java.lang.String name, float[][] matrix, float tauPSC, int[] index) throws StructuralException
StructuralException
public Termination addIndexTermination(java.lang.String name, float[][] matrix, float tauPSC, boolean isModulatory, int[] index) throws StructuralException
StructuralException
public Node[] getNodes()
getNodes
in interface Network
getNodes
in class NetworkImpl
Network.getNodes()
public Termination[] getTerminations()
getTerminations
in interface Node
getTerminations
in class NetworkImpl
Node.getTerminations()
public Termination addPlasticTermination(java.lang.String name, float[][] weights, float tauPSC, float[][] decoders) throws StructuralException
StructuralException
public Termination addPlasticTermination(java.lang.String name, float[][] weights, float tauPSC, float[][] decoders, NetworkArrayImpl.WeightFunc weightFunc) throws StructuralException
name
- The name of the newly created PES terminationweights
- Synaptic connection weight matrix (NxM where N is the total number of neurons in the NetworkArray)tauPSC
- Post-synaptic time constant
(which adjust neural properties rather than the input current)weightFunc
- object wrapping a function that consumes a weight matrix and returns a modified weight matrix
StructuralException
public int[] getNodeDimension()
public int getDimension()
NEFEnsemble.getDimension()
public void exposeAxons() throws StructuralException
StructuralException
public java.util.Properties listStates()
listStates
in interface Probeable
listStates
in class NetworkImpl
Probeable.listStates()
public TimeSeries getHistory(java.lang.String stateName) throws SimulationException
Probeable
getHistory
in interface Probeable
getHistory
in class NetworkImpl
stateName
- A state variable name
SimulationException
- if the Probeable does not have the requested stateProbeable.getHistory(java.lang.String)
public void learn(java.lang.String learnTerm, java.lang.String modTerm, float rate)
learnTerm
- name of the learned terminationmodTerm
- name of the modulatory terminationrate
- learning ratepublic void learn(java.lang.String learnTerm, java.lang.String modTerm, float rate, boolean oja)
learnTerm
- name of the learned terminationmodTerm
- name of the modulatory terminationrate
- learning rateoja
- whether or not to use Oja smoothingpublic void setLearning(boolean learn)
learn
- true if the ensembles are learning, else falsepublic void releaseMemory()
public float[][] getEncoders()
|
Nengo.ca | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |