The Physiologist's Friend Simulation API

ch.unizh.ini.friend.simulation.cells
Class AbstractCell

java.lang.Object
  extended by ch.unizh.ini.friend.simulation.AbstractAcceptsInput
      extended by ch.unizh.ini.friend.simulation.cells.AbstractCell
All Implemented Interfaces:
AcceptsInput, ServesOutput, Updateable, Serializable
Direct Known Subclasses:
AbstractSpikingCell, BipolarCell, HorizontalCell, OscillatingOutput, Photoreceptor

public abstract class AbstractCell
extends AbstractAcceptsInput
implements ServesOutput, Updateable

Default implementations for all cells.

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

Field Summary
protected  float newValue
          The new output value.
protected  float value
          The current value.
 
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
inputs
 
Constructor Summary
AbstractCell()
          Creates a new instance with currently no inputs.
AbstractCell(Collection inputs)
          Creates a new instance with the given collection of inputs.
AbstractCell(int n)
          Creates a new instance with currently no inputs and with the given initial capacity.
AbstractCell(Object input)
          Creates a new instance with the given input.
 
Method Summary
 float output()
          Returns the current output value of the component.
 void update()
          Updates the actual state to the newly computed - aka double-buffering.
 
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
 
Methods inherited from interface ch.unizh.ini.friend.simulation.Updateable
compute
 

Field Detail

value

protected float value
The current value.


newValue

protected float newValue
The new output value.

Constructor Detail

AbstractCell

public AbstractCell()
Creates a new instance with currently no inputs.


AbstractCell

public AbstractCell(int n)
Creates a new instance with currently no inputs and with the given initial capacity.

Parameters:
n - Number of initial capacity for inputs.

AbstractCell

public AbstractCell(Collection inputs)
Creates a new instance with the given collection of inputs.

Parameters:
inputs - The collection of inputs.

AbstractCell

public AbstractCell(Object input)
Creates a new instance with the given input.

Parameters:
input - The input.
Method Detail

update

public void update()
Updates the actual state to the newly computed - aka double-buffering.

Specified by:
update in interface Updateable

output

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

Specified by:
output in interface ServesOutput
Returns:
The ouput value.

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