public class ProjectionImpl extends java.lang.Object implements Projection
Projection
.
TODO: unit testsConstructor and Description |
---|
ProjectionImpl(Origin origin,
Termination termination,
Network network) |
Modifier and Type | Method and Description |
---|---|
void |
addBias(int numInterneurons,
float tauInterneurons,
float tauBias,
boolean excitatory,
boolean optimize)
Makes all the synaptic weights in the projection either positive or negative, so that the projection
accords with Dale's principle.
|
boolean |
biasIsEnabled() |
void |
enableBias(boolean enable) |
Network |
getNetwork() |
Origin |
getOrigin() |
Termination |
getTermination() |
float[][] |
getWeights() |
void |
removeBias()
Deletes bias-related interneurons, projections, origins, and terminations.
|
java.lang.String |
toScript(java.util.HashMap<java.lang.String,java.lang.Object> scriptData) |
public ProjectionImpl(Origin origin, Termination termination, Network network)
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 partpublic Origin getOrigin()
getOrigin
in interface Projection
Projection.getOrigin()
public Termination getTermination()
getTermination
in interface Projection
Projection.getTermination()
public boolean biasIsEnabled()
biasIsEnabled
in interface Projection
Projection.biasIsEnabled()
public void enableBias(boolean enable)
enableBias
in interface Projection
enable
- If true, and initializeBias(...) has been called, then bias is enabled; if false it is disabled (default true)Projection.enableBias(boolean)
public Network getNetwork()
getNetwork
in interface Projection
Projection.getNetwork()
public void addBias(int numInterneurons, float tauInterneurons, float tauBias, boolean excitatory, boolean optimize) throws StructuralException
Projection
addBias
in interface Projection
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 interneuronsStructuralException
- if the origin and termination are not decodedProjection.addBias(int, float, float, boolean, boolean)
public void removeBias()
Projection
removeBias
in interface Projection
Projection.removeBias()
public float[][] getWeights()
getWeights
in interface Projection
Projection.getWeights()
public java.lang.String toScript(java.util.HashMap<java.lang.String,java.lang.Object> scriptData) throws ScriptGenException
toScript
in interface Projection
ScriptGenException