Package noaa.coastwatch.util.chunk
Class CompositeMapApplicationFunction
java.lang.Object
noaa.coastwatch.util.chunk.CompositeMapApplicationFunction
- All Implemented Interfaces:
ChunkFunction
The CompositeMapApplicationFunction
class applies the
integer composite map created by the CompositeMapFunction
class
to a list of chunks representing a time series or spatial series of
partially overlapping data.
Input data chunks to this function should be combined into a list as follows:
- Short integer chunk first with map index data
- Variable data chunks
- Since:
- 3.8.1
- Author:
- Peter Hollemans
-
Constructor Summary
ConstructorDescriptionCompositeMapApplicationFunction
(int chunkCount, DataChunk protoChunk) Creates a new integer composite map application function. -
Method Summary
Modifier and TypeMethodDescriptionapply
(ChunkPosition pos, List<DataChunk> inputChunks) Applies some function to a list of chunks.long
getMemory
(ChunkPosition pos, int chunks) Estimates the memory requirements for processing a chunk of data at the specified position, not including the input and output chunk internal data arrays.static void
Tests this class.
-
Constructor Details
-
CompositeMapApplicationFunction
Creates a new integer composite map application function.- Parameters:
chunkCount
- the number of chunks that are being composited together.protoChunk
- the prototype chunk for the function result. The chunk returned by theapply(noaa.coastwatch.util.chunk.ChunkPosition, java.util.List<noaa.coastwatch.util.chunk.DataChunk>)
method will be compatible with the prototype.
-
-
Method Details
-
getMemory
Description copied from interface:ChunkFunction
Estimates the memory requirements for processing a chunk of data at the specified position, not including the input and output chunk internal data arrays.- Specified by:
getMemory
in interfaceChunkFunction
- Parameters:
pos
- the position to estimate the memory usage.chunks
- the number of input chunks that will be processed at once.- Returns:
- the memory in bytes.
-
apply
Description copied from interface:ChunkFunction
Applies some function to a list of chunks.- Specified by:
apply
in interfaceChunkFunction
- Parameters:
pos
- the position to perform the function.inputChunks
- the list of chunks as input to the function.- Returns:
- the output chunk of the function, or null if no valid output chunk could be computed.
-
main
Tests this class.- Parameters:
argv
- the array of command line parameters.- Throws:
Exception
-