Class ElementUnaryOperation<V>

  • Type Parameters:
    V - the type of the value of the tensor
    All Implemented Interfaces:
    java.io.Serializable, UnaryOperation<Tensor<V>>

    public class ElementUnaryOperation<V>
    extends java.lang.Object
    implements UnaryOperation<Tensor<V>>, java.io.Serializable
    Operates on one tensor and produces a new tensor of the same shape by applying a unary operation on each value of the tensor. Thus it is uniquely defined by the operation on the elements.
    See Also:
    Serialized Form
    • Constructor Detail

      • ElementUnaryOperation

        public ElementUnaryOperation​(UnaryOperation<V> elementOperation)
    • Method Detail

      • perform

        public Tensor<V> perform​(Tensor<V> tensor)
        Description copied from interface: UnaryOperation
        performs the operation on the given value
        Specified by:
        perform in interface UnaryOperation<V>
        Parameters:
        tensor - the input value, on which the operation shall be applied
        Returns:
        the resulting value after the operation
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object