Nengo.ca

ca.nengo.model.impl
Class NetworkImpl.TerminationWrapper

java.lang.Object
  extended by ca.nengo.model.impl.NetworkImpl.TerminationWrapper
All Implemented Interfaces:
Resettable, Termination, java.io.Serializable, java.lang.Cloneable
Enclosing class:
NetworkImpl

public class NetworkImpl.TerminationWrapper
extends java.lang.Object
implements Termination

Wraps a Termination with a new name (for exposing outside Network).

See Also:
Serialized Form

Constructor Summary
NetworkImpl.TerminationWrapper(Node node, Termination wrapped, java.lang.String name)
           
 
Method Summary
 NetworkImpl.TerminationWrapper clone()
           
 NetworkImpl.TerminationWrapper clone(Node node)
          Clone method that changes necessary parameters to point to a new parent, for use in cloning ensembles, etc.
 Termination getBaseTermination()
          Unwraps terminations until it finds one that isn't wrapped
 int getDimensions()
           
 InstantaneousOutput getInput()
           
 boolean getModulatory()
           
 java.lang.String getName()
           
 Node getNode()
           
 float getTau()
           
 Termination getWrappedTermination()
           
 void reset(boolean randomize)
           
 void setModulatory(boolean modulatory)
           
 void setTau(float tau)
           
 void setValues(InstantaneousOutput values)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkImpl.TerminationWrapper

public NetworkImpl.TerminationWrapper(Node node,
                                      Termination wrapped,
                                      java.lang.String name)
Parameters:
node - Parent node
wrapped - Termination being wrapped
name - New name
Method Detail

getWrappedTermination

public Termination getWrappedTermination()
Returns:
Wrapped Termination

getBaseTermination

public Termination getBaseTermination()
Unwraps terminations until it finds one that isn't wrapped

Returns:
Underlying Termination, not wrapped

getName

public java.lang.String getName()
Specified by:
getName in interface Termination
Returns:
Name of this Termination (unique in the scope of the object the which the Termination is connected, eg the Neuron or Ensemble).

getDimensions

public int getDimensions()
Specified by:
getDimensions in interface Termination
Returns:
Dimensionality of information entering this Termination (eg number of axons, or dimension of decoded function of variables represented by sending Ensemble)

setValues

public void setValues(InstantaneousOutput values)
               throws SimulationException
Specified by:
setValues in interface Termination
Parameters:
values - InstantaneousOutput (eg from another Ensemble) to apply to this Termination.
Throws:
SimulationException - if the given values have the wrong dimension

getNode

public Node getNode()
Specified by:
getNode in interface Termination
Returns:
The Node to which this Termination belongs

getModulatory

public boolean getModulatory()
Specified by:
getModulatory in interface Termination
Returns:
Whether the Termination is modulatory, in the sense of neuromodulation, ie true if input via this Termination is not summed to drive a node, but influences node activity in some other way

getTau

public float getTau()
Specified by:
getTau in interface Termination
Returns:
Time constant of dominant dynamics

setModulatory

public void setModulatory(boolean modulatory)
Specified by:
setModulatory in interface Termination
Parameters:
modulatory - True if the Termination is to be modulatory

setTau

public void setTau(float tau)
            throws StructuralException
Specified by:
setTau in interface Termination
Parameters:
tau - Time constant of dominant dynamics
Throws:
StructuralException - if the time constant cannot be changed

getInput

public InstantaneousOutput getInput()
Specified by:
getInput in interface Termination
Returns:
Extract the input to the termination.

reset

public void reset(boolean randomize)
Specified by:
reset in interface Resettable
Parameters:
randomize - 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.
See Also:
Resettable.reset(boolean)

clone

public NetworkImpl.TerminationWrapper clone()
                                     throws java.lang.CloneNotSupportedException
Specified by:
clone in interface Termination
Overrides:
clone in class java.lang.Object
Returns:
Valid clone
Throws:
java.lang.CloneNotSupportedException - if clone can't be made

clone

public NetworkImpl.TerminationWrapper clone(Node node)
                                     throws java.lang.CloneNotSupportedException
Description copied from interface: Termination
Clone method that changes necessary parameters to point to a new parent, for use in cloning ensembles, etc.

Specified by:
clone in interface Termination
Parameters:
node - New parent node
Returns:
A clone of the termination for the new parent ensemble
Throws:
java.lang.CloneNotSupportedException - if clone cannot be made

Nengo.ca