Class ToFunctions<X,​Y>

  • Type Parameters:
    X - the type of the values along the X-axis, the type of coordinate (aka 'the dimension') do be reduced
    Y - the type of the tensor elements and also the type of the values along the Y-axis
    All Implemented Interfaces:
    ReductionStrategy<X,​Y,​DiscreteFunction<X,​Y>>

    public final class ToFunctions<X,​Y>
    extends java.lang.Object
    implements ReductionStrategy<X,​Y,​DiscreteFunction<X,​Y>>
    A reduction strategy which reduces all elements of dimension <X> by transforming them into a DiscreteFunction s from <X> to <Y>
    • Constructor Detail

      • ToFunctions

        public ToFunctions()
    • Method Detail

      • reduce

        public DiscreteFunction<X,​Y> reduce​(java.util.Map<? extends X,​Y> inputValues,
                                                  Position position)
        Specified by:
        reduce in interface ReductionStrategy<X,​Y,​DiscreteFunction<X,​Y>>
        Parameters:
        inputValues - the sub values of the tensor from which the reduction is performed
        position - a remaining position in the tensor for which reduction is performed
        Returns:
        the value of reduction