Package org.flag4j.core
Interface ComplexTensorExclusiveMixin<T extends TensorBase<T,CTensor,T,?,?,?,CNumber>>
- Type Parameters:
T
- Tensor type.
- All Superinterfaces:
TensorExclusiveMixin<T,
CTensor, CooCTensor, T>
- All Known Implementing Classes:
CooCTensor
,CTensor
public interface ComplexTensorExclusiveMixin<T extends TensorBase<T,CTensor,T,?,?,?,CNumber>>
extends TensorExclusiveMixin<T,CTensor,CooCTensor,T>
This class specifies methods which any complex tensor that is NOT a matrix or vector should implement.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Computes the element-wise addition of two tensors of the same rank and stores the result in this tensor.void
addEq
(CooCTensor B) Computes the element-wise addition of two tensors of the same rank and stores the result in this tensor.H
(int... axes) Computes the conjugate transpose of this tensor.H
(int axis1, int axis2) Computes the transpose of a tensor.default T
hermTranspose
(int... axes) Computes the conjugate transpose of this tensor.default T
hermTranspose
(int axis1, int axis2) Computes the conjugate transpose of a tensor.void
Computes the element-wise subtraction of two tensors of the same rank and stores the result in this tensor.void
subEq
(CooCTensor B) Computes the element-wise subtraction of two tensors of the same rank and stores the result in this tensor.
-
Method Details
-
hermTranspose
Computes the conjugate transpose of a tensor. Same asH(int, int)
. In the context of a tensor, this exchanges the specified axes and takes the complex conjugate of elements along those axes. Also seehermTranspose()
andH()
to conjugate transpose first and last axes.- Parameters:
axis1
- First axis to exchange and apply complex conjugate.axis2
- Second axis to exchange and apply complex conjugate.- Returns:
- The conjugate transpose of this tensor.
-
H
Computes the transpose of a tensor. Same ashermTranspose(int, int)
. In the context of a tensor, this exchanges the specified axes and takes the complex conjugate of elements along those axes. Also seeComplexTensorMixin.hermTranspose()
andComplexTensorMixin.H()
to conjugate transpose first and last axes.- Parameters:
axis1
- First axis to exchange and apply complex conjugate.axis2
- Second axis to exchange and apply complex conjugate.- Returns:
- The conjugate transpose of this tensor.
-
hermTranspose
Computes the conjugate transpose of this tensor. That is, interchanges the axes of this tensor so that it matches the specified axes permutation and takes the complex conjugate of the elements of these axes. Same asH(int[])
.- Parameters:
axes
- Permutation of tensor axis. If the tensor has rankN
, then this must be an array of lengthN
which is a permutation of{0, 1, 2, ..., N-1}
.- Returns:
- The conjugate transpose of this tensor with its axes permuted by the
axes
array. - Throws:
IllegalArgumentException
- Ifaxes
is not a permutation of{1, 2, 3, ... N-1}
.
-
H
Computes the conjugate transpose of this tensor. That is, interchanges the axes of this tensor so that it matches the specified axes permutation and takes the complex conjugate of the elements of these axes. Same ashermTranspose(int[])
.- Parameters:
axes
- Permutation of tensor axis. If the tensor has rankN
, then this must be an array of lengthN
which is a permutation of{0, 1, 2, ..., N-1}
.- Returns:
- The conjugate transpose of this tensor with its axes permuted by the
axes
array. - Throws:
IllegalArgumentException
- Ifaxes
is not a permutation of{1, 2, 3, ... N-1}
.
-
addEq
Computes the element-wise addition of two tensors of the same rank and stores the result in this tensor.- Parameters:
B
- Second tensor in the addition.- Throws:
IllegalArgumentException
- If this tensor andB
have different shapes.
-
addEq
Computes the element-wise addition of two tensors of the same rank and stores the result in this tensor.- Parameters:
B
- Second tensor in the addition.- Throws:
IllegalArgumentException
- If this tensor andB
have different shapes.
-
subEq
Computes the element-wise subtraction of two tensors of the same rank and stores the result in this tensor.- Parameters:
B
- Second tensor in the subtraction.- Throws:
IllegalArgumentException
- If this tensor andB
have different shapes.
-
subEq
Computes the element-wise subtraction of two tensors of the same rank and stores the result in this tensor.- Parameters:
B
- Second tensor in the subtraction.- Throws:
IllegalArgumentException
- If this tensor andB
have different shapes.
-