Class DenseRingHermitianTranspose
java.lang.Object
org.flag4j.linalg.ops.dense.ring_ops.DenseRingHermitianTranspose
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Ring<T>>
voidblockedMatrixConcurrentHerm
(T[] src, int numRows, int numCols, T[] dest) Computes the complex conjugate transpose of a matrix using a blocked concurrent algorithm.static <T extends Ring<T>>
voidblockedMatrixHerm
(T[] src, int numRows, int numCols, T[] dest) Computes complex conjugate transpose of a matrix using a blocked algorithm.static <T extends Ring<T>>
voidstandardConcurrentHerm
(T[] src, Shape shape, int[] axes, T[] dest) Computes the conjugate transpose of a tensor using a concurrent implementation.static <T extends Ring<T>>
voidstandardConcurrentHerm
(T[] src, Shape shape, int axis1, int axis2, T[] dest) Computes complex conjugate transpose of a tensor along specified axes using a standard concurrent transpose algorithm.static <T extends Ring<T>>
voidstandardHerm
(T[] src, Shape shape, int[] axes, T[] dest) Computes the conjugate transpose of a tensor using a standard implementation.static <T extends Ring<T>>
voidstandardHerm
(T[] src, Shape shape, int axis1, int axis2, T[] dest) Computes complex conjugate transpose of a tensor along specified axes using a standard transpose algorithm.static <T extends Ring<T>>
voidstandardMatrixConcurrentHerm
(T[] src, int numRows, int numCols, T[] dest) Computes the complex conjugate transpose of a matrix using a standard concurrent algorithm.static <T extends Ring<T>>
voidstandardMatrixHerm
(T[] src, int numRows, int numCols, T[] dest) Computes complex conjugate transpose of a matrix using the standard algorithm.
-
Method Details
-
standardHerm
Computes the conjugate transpose of a tensor using a standard implementation. That is, interchanges the axes of the tensor so that it matches the specified axes permutation and so that the axis which are swapped and complex conjugated.- Parameters:
src
- Entries of the tensor.shape
- Shape of the tensor to transpose.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}
.- Throws:
IllegalArgumentException
- If theaxes
array is not a permutation of{0, 1, 2, ..., N-1}
.IllegalArgumentException
- If theshape
rank is less than 2.
-
standardHerm
public static <T extends Ring<T>> void standardHerm(T[] src, Shape shape, int axis1, int axis2, T[] dest) Computes complex conjugate transpose of a tensor along specified axes using a standard transpose algorithm. In this context, transposing a tensor is equivalent to swapping a pair of axes.- Parameters:
src
- Entries of the tensor.shape
- Shape of the tensor to transpose.axis1
- First axis to swap in transpose.axis2
- Second axis to swap in transpose.
-
standardConcurrentHerm
public static <T extends Ring<T>> void standardConcurrentHerm(T[] src, Shape shape, int axis1, int axis2, T[] dest) Computes complex conjugate transpose of a tensor along specified axes using a standard concurrent transpose algorithm. In this context, transposing a tensor is equivalent to swapping a pair of axes.- Parameters:
src
- Entries of the tensor.shape
- Shape of the tensor to transpose.axis1
- First axis to swap in transpose.axis2
- Second axis to swap in transpose.
-
standardConcurrentHerm
public static <T extends Ring<T>> void standardConcurrentHerm(T[] src, Shape shape, int[] axes, T[] dest) Computes the conjugate transpose of a tensor using a concurrent implementation. That is, interchanges the axes of the tensor so that it matches the specified axes permutation and so that the axis which are swapped and complex conjugated.- Parameters:
src
- Entries of the tensor.shape
- Shape of the tensor to transpose.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}
.- Throws:
IllegalArgumentException
- If theaxes
array is not a permutation of{0, 1, 2, ..., N-1}
.IllegalArgumentException
- If theshape
rank is less than 2.
-
standardMatrixHerm
public static <T extends Ring<T>> void standardMatrixHerm(T[] src, int numRows, int numCols, T[] dest) Computes complex conjugate transpose of a matrix using the standard algorithm.- Parameters:
src
- Entries of the matrix to transpose.numRows
- Number of rows in the matrix.numCols
- Number of columns in the matrix.
-
blockedMatrixHerm
public static <T extends Ring<T>> void blockedMatrixHerm(T[] src, int numRows, int numCols, T[] dest) Computes complex conjugate transpose of a matrix using a blocked algorithm. To get or set the block size seeConfigurations.getBlockSize()
orConfigurations.setBlockSize(int)
.- Parameters:
src
- Source matrix in the transpose.numRows
- Number of rows in the matrix.numCols
- Number of columns in the matrix.
-
standardMatrixConcurrentHerm
public static <T extends Ring<T>> void standardMatrixConcurrentHerm(T[] src, int numRows, int numCols, T[] dest) Computes the complex conjugate transpose of a matrix using a standard concurrent algorithm.- Parameters:
src
- Entries of the matrix to transpose.numRows
- Number of rows in source matrix.numCols
- Number of columns in source matrix.
-
blockedMatrixConcurrentHerm
public static <T extends Ring<T>> void blockedMatrixConcurrentHerm(T[] src, int numRows, int numCols, T[] dest) Computes the complex conjugate transpose of a matrix using a blocked concurrent algorithm.- Parameters:
src
- Entries of the matrix to transpose.numRows
- Number of rows in source matrix.numCols
- Number of columns in source matrix.
-