The Physiologist's Friend Simulation API

ch.unizh.ini.friend.simulation.synapses
Class ScalingSynapse

java.lang.Object
  extended by ch.unizh.ini.friend.simulation.AbstractAcceptsInput
      extended by ch.unizh.ini.friend.simulation.synapses.AbstractSynapse
          extended by ch.unizh.ini.friend.simulation.synapses.ScalingSynapse
All Implemented Interfaces:
AcceptsInput, ServesOutput, Serializable

public class ScalingSynapse
extends AbstractSynapse

A simple scaling synapse.

Version:
$Revision: 1.4 $
Author:
Christof Marti
See Also:
Serialized Form

Field Summary
static float DEFAULT_WEIGHT
          The default weight with which the input will be multiplied.
protected  float weight
          The weight with which the input will be multiplied.
 
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
inputs
 
Constructor Summary
ScalingSynapse()
          Creates a new instance with currently no inputs and the default weight.
ScalingSynapse(Collection inputs, float weight)
          Creates a new instance with the given collection of inputs and weight.
ScalingSynapse(float weight)
          Creates a new instance with currently no inputs and the given scaling factor.
ScalingSynapse(ServesOutput input, float weight)
          Creates a new instance with the given input and weight.
 
Method Summary
 float getWeight()
          Returns the weight with which the input will be multiplied.
 float output()
          Returns the current output value of the component.
 void setWeight(float weight)
          Sets the weight with which the input will be multiplied.
 
Methods inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
averageInputs, cloneObject, connectOneToAll, connectOneToOne, getCollectionInstance, getInput, getInputs, integrateInputs, setInput, setInputs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_WEIGHT

public static float DEFAULT_WEIGHT
The default weight with which the input will be multiplied.


weight

protected float weight
The weight with which the input will be multiplied.

Constructor Detail

ScalingSynapse

public ScalingSynapse(float weight)
Creates a new instance with currently no inputs and the given scaling factor.

Parameters:
weight - The scaling factor/weight.

ScalingSynapse

public ScalingSynapse()
Creates a new instance with currently no inputs and the default weight.


ScalingSynapse

public ScalingSynapse(Collection inputs,
                      float weight)
Creates a new instance with the given collection of inputs and weight.

Parameters:
inputs - The collection of inputs.
weight - The scaling factor/weight.

ScalingSynapse

public ScalingSynapse(ServesOutput input,
                      float weight)
Creates a new instance with the given input and weight.

Parameters:
input - The input.
weight - The scaling factor/weight.
Method Detail

output

public float output()
Returns the current output value of the component.

Returns:
The ouput value (current / potential).

getWeight

public float getWeight()
Returns the weight with which the input will be multiplied.

Returns:
The weight.

setWeight

public void setWeight(float weight)
Sets the weight with which the input will be multiplied.

Parameters:
weight - New weight.

http://www.ini.unizh.ch/~tobi/friend