Class ElementBinaryFunction<V,R>
- java.lang.Object
-
- org.tensorics.core.tensor.operations.ElementBinaryFunction<V,R>
-
- All Implemented Interfaces:
java.io.Serializable
,BinaryFunction<Tensor<V>,Tensor<R>>
- Direct Known Subclasses:
ElementBinaryOperation
public class ElementBinaryFunction<V,R> extends java.lang.Object implements BinaryFunction<Tensor<V>,Tensor<R>>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BinaryFunction<V,R>
operation
protected OptionRegistry<ManipulationOption>
optionRegistry
-
Constructor Summary
Constructors Constructor Description ElementBinaryFunction(BinaryFunction<V,R> operation, OptionRegistry<ManipulationOption> optionRegistry)
-
-
-
Field Detail
-
operation
protected final BinaryFunction<V,R> operation
-
optionRegistry
protected final OptionRegistry<ManipulationOption> optionRegistry
-
-
Constructor Detail
-
ElementBinaryFunction
public ElementBinaryFunction(BinaryFunction<V,R> operation, OptionRegistry<ManipulationOption> optionRegistry)
-
-
Method Detail
-
perform
public Tensor<R> perform(Tensor<V> left, Tensor<V> right)
Description copied from interface:BinaryFunction
Has to be implemented to perform the actual operation. The order of operands might be important or not, depending, if the operation is commutative or not.- Specified by:
perform
in interfaceBinaryFunction<V,R>
- Parameters:
left
- the left operand to be used in the operationright
- the right operand to be used in the operation- Returns:
- the result of 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
-
-