Class DenseRingHermitianTranspose

java.lang.Object
org.flag4j.linalg.ops.dense.ring_ops.DenseRingHermitianTranspose

public final class DenseRingHermitianTranspose extends Object
Utility class for computing the Hermitian transpose of a dense Ring tensor or matrix.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    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.
    static <T extends Ring<T>>
    void
    standardHerm(T[] src, Shape shape, int[] axes, T[] dest)
    Computes the conjugate transpose of a tensor using a standard implementation.
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • standardHerm

      public static <T extends Ring<T>> void standardHerm(T[] src, Shape shape, int[] axes, T[] dest)
      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 rank N, then this must be an array of length N which is a permutation of {0, 1, 2, ..., N-1}.
      Throws:
      IllegalArgumentException - If the axes array is not a permutation of {0, 1, 2, ..., N-1}.
      IllegalArgumentException - If the shape 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 rank N, then this must be an array of length N which is a permutation of {0, 1, 2, ..., N-1}.
      Throws:
      IllegalArgumentException - If the axes array is not a permutation of {0, 1, 2, ..., N-1}.
      IllegalArgumentException - If the shape 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 see Configurations.getBlockSize() or Configurations.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.