ca.nengo.util.impl
Class SpikePatternImpl

java.lang.Object
  extended by ca.nengo.util.impl.SpikePatternImpl
All Implemented Interfaces:
SpikePattern, java.io.Serializable, java.lang.Cloneable

public class SpikePatternImpl
extends java.lang.Object
implements SpikePattern

Default implementation of SpikePattern.

Author:
Bryan Tripp
See Also:
Serialized Form

Constructor Summary
SpikePatternImpl(int neurons)
           
 
Method Summary
 void addSpike(int neuron, float time)
           
 SpikePattern clone()
           
 int getNumNeurons()
           
 float[] getSpikeTimes(int neuron)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpikePatternImpl

public SpikePatternImpl(int neurons)
Parameters:
neurons - Number of neurons in the Ensemble that this SpikePattern belongs to
Method Detail

addSpike

public void addSpike(int neuron,
                     float time)
Parameters:
neuron - Index of neuron
time - Spike time

getNumNeurons

public int getNumNeurons()
Specified by:
getNumNeurons in interface SpikePattern
Returns:
Number of neurons in the ensemble
See Also:
SpikePattern.getNumNeurons()

getSpikeTimes

public float[] getSpikeTimes(int neuron)
Specified by:
getSpikeTimes in interface SpikePattern
Parameters:
neuron - Index of a neuron in the ensemble (from 0)
Returns:
Times at which neuron spiked since the Ensemble was last reset
See Also:
SpikePattern.getSpikeTimes(int)

clone

public SpikePattern clone()
                   throws java.lang.CloneNotSupportedException
Specified by:
clone in interface SpikePattern
Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException