Module math

Class ChannelMapInput

java.lang.Object
de.grogra.math.ChannelMapInput

public class ChannelMapInput extends Object
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 Details

    • ChannelMapInput

      public ChannelMapInput()
  • Method Details

    • getUserData

      public ChannelData getUserData(ChannelMap sink, ChannelMap def)
      Returns an empty instance of ChannelData for the use in method implementations that perform computations based on ChannelMaps. It is recommended to use this instance rather than a new instance of ChannelData in order to avoid unnecessary and time consuming heap operations.
      Parameters:
      sink - the invoker's sink map for the channel data
      def - the invoker's default map for the channel data
      Returns:
      an empty instanceof of ChannelData