Package no.marec.api.korona
Interface ModuleComputation
- All Known Implementing Classes:
SinglePingModuleComputation
public interface ModuleComputation
KORONA module computations that use more than just a single ping.
Only the center ping should be modified.
The buffered surrounding pings, specified by getPingBufferRadius()
, are only for reading.
Computation that do not require buffering could use SinglePingModuleComputation
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
compute
(PingBuffer pingBuffer) The computation implementation.int
The (maximum) number of pings that should be made available for reading on either side of the center ping.
-
Method Details
-
getPingBufferRadius
int getPingBufferRadius()The (maximum) number of pings that should be made available for reading on either side of the center ping. The total number of pings accessible will be up to2 × PingBufferRadius + 1
. At the beginning and end of the file fewer pings will be available, as specified by the functionsPingBuffer.getBeginIndex()
andPingBuffer.getEndIndex()
.- Returns:
- number of read-only pings on either side of the center ping
-
compute
The computation implementation.Note: Only the center ping, with index 0, should be modified.
- Parameters:
pingBuffer
- the buffer containing the accessible ping
-