Class TensorReduction<C,​E,​R>

  • Type Parameters:
    C - the dimension (direction, type of coordinate) in which the tensor will be reduced
    E - the type of the elements of the tensor
    All Implemented Interfaces:
    java.util.function.Function<Tensor<E>,​Tensor<R>>, Conversion<Tensor<E>,​Tensor<R>>

    public class TensorReduction<C,​E,​R>
    extends java.lang.Object
    implements Conversion<Tensor<E>,​Tensor<R>>
    The operation which describes the reduction of a tensor in one direction.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Tensor<R> apply​(Tensor<E> value)
      Has to implement the conversion logic to convert the given object into an object of type R.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • TensorReduction

        public TensorReduction​(java.lang.Class<? extends C> direction,
                               ReductionStrategy<? super C,​E,​R> strategy)
    • Method Detail

      • apply

        public Tensor<R> apply​(Tensor<E> value)
        Description copied from interface: Conversion
        Has to implement the conversion logic to convert the given object into an object of type R.
        Specified by:
        apply in interface Conversion<C,​E>
        Specified by:
        apply in interface java.util.function.Function<C,​E>
        Parameters:
        value - the object to convert
        Returns:
        an object of the correct return type.