de.grogra.math
Class ChannelMapInput

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

public class ChannelMapInput
extends java.lang.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 Summary
ChannelMapInput()
           
 
Method Summary
 ChannelData getUserData(ChannelMap sink, ChannelMap def)
          Returns an empty instance of ChannelData for the use in method implementations that perform computations based on ChannelMaps.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelMapInput

public ChannelMapInput()
Method Detail

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