Class ElementUnaryOperation<V>
- java.lang.Object
-
- org.tensorics.core.tensor.operations.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 Summary
Constructors Constructor Description ElementUnaryOperation(UnaryOperation<V> elementOperation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
Tensor<V>
perform(Tensor<V> tensor)
performs the operation on the given valuejava.lang.String
toString()
-
-
-
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 interfaceUnaryOperation<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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-