public class SpikeEventBuffer extends SpikeEventQueue
SpikingNeuralNet that holds the events generated by the neurons
and links inside the network.| Constructor and Description |
|---|
SpikeEventBuffer()
Create a new
SpikeEventBuffer, with an infinite horizon. |
SpikeEventBuffer(double horizon)
Create a new
SpikeEventBuffer, with the specified horizon. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(SpikeEvent spikeEvent)
Insert the specified
SpikeEvent into this buffer, and notify
all threads waiting on this object's monitor. |
void |
clear()
Atomically removes all of the elements from this queue.
|
double |
getLatestTime()
Returns the latest spike time of all spikes in the buffer.
|
SpikeEvent |
getPreviousHead()
Return the element removed as a result of the most recent
call to
poll(), remove() or take(),
or return null if no such element exists. |
void |
setPreviousHead(SpikeEvent prevHead)
Set the element removed as a result of the most recent
call to
poll(), remove() or take(). |
getHorizon, setHorizon, toString, updatecomparator, contains, drainTo, drainTo, iterator, offer, offer, peek, poll, poll, put, remainingCapacity, remove, size, spliterator, take, toArray, toArraycontainsAll, isEmpty, removeAll, retainAllclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic SpikeEventBuffer()
SpikeEventBuffer, with an infinite horizon.public SpikeEventBuffer(double horizon)
SpikeEventBuffer, with the specified horizon.public SpikeEvent getPreviousHead()
poll(), remove() or take(),
or return null if no such element exists.null if no such element existspublic double getLatestTime()
public void setPreviousHead(SpikeEvent prevHead)
poll(), remove() or take().prevHead - the previous head of this queuepublic boolean add(SpikeEvent spikeEvent)
SpikeEvent into this buffer, and notify
all threads waiting on this object's monitor.add in interface java.util.Collection<SpikeEvent>add in interface java.util.concurrent.BlockingQueue<SpikeEvent>add in interface java.util.Queue<SpikeEvent>add in class java.util.concurrent.PriorityBlockingQueue<SpikeEvent>spikeEvent - the element to addtrue if this buffer changed as a result of the callpublic void clear()
clear in interface java.util.Collection<SpikeEvent>clear in class java.util.concurrent.PriorityBlockingQueue<SpikeEvent>