java.lang.Object
de.grogra.math.ChannelMapInput
This class serves as a base class for input to
ChannelMap
-based computations. Its only purpose is to provide an
instance of ChannelData
which may be reused for several
invokations of methods of ChannelMap
, thus reducing
the number of heap operations.- Author:
- Ole Kniemeyer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetUserData
(ChannelMap sink, ChannelMap def) Returns an empty instance ofChannelData
for the use in method implementations that perform computations based onChannelMaps
.
-
Constructor Details
-
ChannelMapInput
public ChannelMapInput()
-
-
Method Details
-
getUserData
Returns an empty instance ofChannelData
for the use in method implementations that perform computations based onChannelMaps
. It is recommended to use this instance rather than a new instance ofChannelData
in order to avoid unnecessary and time consuming heap operations.- Parameters:
sink
- the invoker's sink map for the channel datadef
- the invoker's default map for the channel data- Returns:
- an empty instanceof of
ChannelData
-