ca.nengo.model.impl
Class ProjectionImpl
java.lang.Object
ca.nengo.model.impl.ProjectionImpl
- All Implemented Interfaces:
- Projection, java.io.Serializable
public class ProjectionImpl
- extends java.lang.Object
- implements Projection
Default implementation of Projection
.
TODO: unit tests
- Author:
- Bryan Tripp
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProjectionImpl
public ProjectionImpl(Origin origin,
Termination termination,
Network network)
- Parameters:
origin
- The Origin at the start of this Projectiontermination
- The Termination at the end of this Projectionnetwork
- The Network of which this Projection is a part
getOrigin
public Origin getOrigin()
- Specified by:
getOrigin
in interface Projection
- Returns:
- Origin of this Projection (where information comes from)
- See Also:
Projection.getOrigin()
getTermination
public Termination getTermination()
- Specified by:
getTermination
in interface Projection
- Returns:
- Termination of this Projection (where information goes)
- See Also:
Projection.getTermination()
biasIsEnabled
public boolean biasIsEnabled()
- Specified by:
biasIsEnabled
in interface Projection
- Returns:
- true if bias is enabled
- See Also:
Projection.biasIsEnabled()
enableBias
public void enableBias(boolean enable)
- Specified by:
enableBias
in interface Projection
- Parameters:
enable
- If true, and initializeBias(...) has been called, then bias is enabled; if false it is disabled (default true)- See Also:
Projection.enableBias(boolean)
getNetwork
public Network getNetwork()
- Specified by:
getNetwork
in interface Projection
- Returns:
- The Network to which this Projection belongs
- See Also:
Projection.getNetwork()
addBias
public void addBias(int numInterneurons,
float tauInterneurons,
float tauBias,
boolean excitatory,
boolean optimize)
throws StructuralException
- Description copied from interface:
Projection
- Makes all the synaptic weights in the projection either positive or negative, so that the projection
accords with Dale's principle. This introduces a bias current postsynaptically, which is a function
of presynaptic activity. This bias is removed by projecting the same function through an ensemble
of interneurons. See Parisien, Anderson & Eliasmith, 2007, Neural Computation for more detail.
- Specified by:
addBias
in interface Projection
- Parameters:
numInterneurons
- Number of interneurons through which bias function is projectedtauInterneurons
- Time constant of post-synaptic current in projection from presynaptic ensemble to interneurons (typically short)tauBias
- Time constant of post-synaptic current in projection from interneurons to postsynaptic ensembleexcitatory
- If true, synapses in main projection are made excitatory; if false, inhibitoryoptimize
- If true, performs optimizations to minimize distortion in the parallel projection through interneurons
- Throws:
StructuralException
- See Also:
Projection.addBias(int, float, float, boolean, boolean)
removeBias
public void removeBias()
- Description copied from interface:
Projection
- Deletes bias-related interneurons, projections, origins, and terminations.
- Specified by:
removeBias
in interface Projection
- See Also:
Projection.removeBias()
getWeights
public float[][] getWeights()
- Specified by:
getWeights
in interface Projection
- Returns:
- Matrix of weights in this Projection (if there are neurons on each end, then these are synaptic weights)
- See Also:
Projection.getWeights()