Package org.tensorics.core.tensor.lang
Class OngoingTensorOperation<C,V>
- java.lang.Object
-
- org.tensorics.core.tensor.lang.OngoingTensorOperation<C,V>
-
- Type Parameters:
C
-V
-
- All Implemented Interfaces:
OngoingOperation<Tensor<V>,V>
public class OngoingTensorOperation<C,V> extends java.lang.Object implements OngoingOperation<Tensor<V>,V>
Part of the fluent API for operations on tensors.
-
-
Constructor Summary
Constructors Constructor Description OngoingTensorOperation(Environment<V> environment, Tensor<V> left)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tensor<V>
elementDividedBy(Tensor<V> right)
Tensor<V>
elementDividedByV(V value)
Tensor<V>
elementTimes(Tensor<V> right)
Calls multiplication operation on the elements of the two input tensorsTensor<V>
elementTimesV(V right)
Tensor<V>
minus(Tensor<V> right)
Tensor<V>
minusV(V right)
Tensor<V>
plus(Tensor<V> right)
Returns the sum of the left tensor with the given right tensor.Tensor<V>
plusV(V right)
Tensor<V>
times(Tensor<V> right)
Performs the inner tensor product of the left tensor with the right tensor by taking care about co-and contravariant coordinates and following the tensoric-equivalen of Einsteins sum convention.
-
-
-
Constructor Detail
-
OngoingTensorOperation
public OngoingTensorOperation(Environment<V> environment, Tensor<V> left)
- Parameters:
environment
- the environment to useleft
- first tensoric to use
-
-
Method Detail
-
plus
public Tensor<V> plus(Tensor<V> right)
Returns the sum of the left tensor with the given right tensor.- Specified by:
plus
in interfaceOngoingOperation<C,V>
- Parameters:
right
- as tensor to add- Returns:
- result of summing two tensors
-
minus
public Tensor<V> minus(Tensor<V> right)
- Specified by:
minus
in interfaceOngoingOperation<C,V>
-
elementTimes
public Tensor<V> elementTimes(Tensor<V> right)
Calls multiplication operation on the elements of the two input tensors- Specified by:
elementTimes
in interfaceOngoingOperation<C,V>
- Parameters:
right
- second tensoric to use- Returns:
- A tensor, containing elements that are the product of the respecive elemtents of the two input tensors
-
elementDividedByV
public Tensor<V> elementDividedByV(V value)
- Specified by:
elementDividedByV
in interfaceOngoingOperation<C,V>
-
elementTimesV
public Tensor<V> elementTimesV(V right)
- Specified by:
elementTimesV
in interfaceOngoingOperation<C,V>
-
elementDividedBy
public Tensor<V> elementDividedBy(Tensor<V> right)
- Specified by:
elementDividedBy
in interfaceOngoingOperation<C,V>
-
times
public Tensor<V> times(Tensor<V> right)
Performs the inner tensor product of the left tensor with the right tensor by taking care about co-and contravariant coordinates and following the tensoric-equivalen of Einsteins sum convention.- Parameters:
right
- the right tensor to multiply onto the left- Returns:
- a tensor resulting from the multiplication
- See Also:
InnerTensorOperation
-
-