The Physiologist's Friend Simulation API

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

java.lang.Object
  extended by ch.unizh.ini.friend.simulation.AbstractAcceptsInput
      extended by ch.unizh.ini.friend.simulation.cells.AbstractCell
          extended by ch.unizh.ini.friend.simulation.cells.HorizontalCell
All Implemented Interfaces:
AcceptsInput, GradedCell, ServesOutput, Updateable, Serializable

public class HorizontalCell
extends AbstractCell
implements GradedCell

Cell that averages the inputs and outputs the lowpass-filtered value. You can set the lowpass time constant with setTau(float).

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

Field Summary
protected  Filter lowPass
          A low-pass filter.
protected  float tau
          the lowpass time constant of the HorizontalCell
 
Fields inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell
newValue, value
 
Fields inherited from class ch.unizh.ini.friend.simulation.AbstractAcceptsInput
inputs
 
Constructor Summary
HorizontalCell()
          Creates a new instance with currently no inputs.
HorizontalCell(Collection inputs)
          Creates a new instance with the given collections of inputs and weights.
HorizontalCell(int n)
          Creates a new instance with currently no inputs and with the given initial capacity.
 
Method Summary
 void compute(float dt)
          Computes the new state of this component of the simulation.
 float getGradedOutput()
          returns the graded output from the cell
 float getTau()
          Getter for property tau.
 void setTau(float tau)
          Setter for property tau.
 
Methods inherited from class ch.unizh.ini.friend.simulation.cells.AbstractCell
output, update
 
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

tau

protected float tau
the lowpass time constant of the HorizontalCell


lowPass

protected Filter lowPass
A low-pass filter.

Constructor Detail

HorizontalCell

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


HorizontalCell

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

Parameters:
n - Number of initial capacity for inputs.

HorizontalCell

public HorizontalCell(Collection inputs)
Creates a new instance with the given collections of inputs and weights.

Parameters:
inputs - The collection of inputs.
Method Detail

compute

public void compute(float dt)
Computes the new state of this component of the simulation. The horizontal cell sums the inputs, so the synapses from the photoreceptors should be scaled inversely with the number of inputs to compute an average photoreceptor output.

Specified by:
compute in interface Updateable
Parameters:
dt - The time that has passed since the last invocation.

getGradedOutput

public float getGradedOutput()
returns the graded output from the cell

Specified by:
getGradedOutput in interface GradedCell

getTau

public float getTau()
Getter for property tau.

Returns:
Value of property tau.
See Also:
tau

setTau

public void setTau(float tau)
Setter for property tau.

Parameters:
tau - New value of property tau.
See Also:
tau

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