Class SpecializedOps_CDRM


  • public class SpecializedOps_CDRM
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.ejml.data.CMatrixRMaj createReflector​(org.ejml.data.CMatrixRMaj u)
      Creates a reflector from the provided vector.

      Q = I - γ u uT
      γ = 2/||u||2
      static org.ejml.data.CMatrixRMaj createReflector​(org.ejml.data.CMatrixRMaj u, float gamma)
      Creates a reflector from the provided vector and gamma.

      Q = I - γ u uH
      static float elementDiagMaxMagnitude2​(org.ejml.data.CMatrixRMaj a)
      Returns the magnitude squared of the complex element along the diagonal with the largest magnitude

      Max{ |aij|^2 } for all i and j
      static org.ejml.data.CMatrixRMaj householder​(org.ejml.data.CMatrixRMaj u, float gamma)
      Q = I - gamma*u*uH
      static org.ejml.data.CMatrixRMaj householderVector​(org.ejml.data.CMatrixRMaj x)
      Computes the householder vector used in QR decomposition.
      static org.ejml.data.CMatrixRMaj pivotMatrix​(org.ejml.data.CMatrixRMaj ret, int[] pivots, int numPivots, boolean transposed)
      Creates a pivot matrix that exchanges the rows in a matrix:
      A' = P*A
      static float qualityTriangular​(org.ejml.data.CMatrixRMaj T)
      Computes the quality of a triangular matrix, where the quality of a matrix is defined in LinearSolver.quality().
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpecializedOps_CDRM

        public SpecializedOps_CDRM()
    • Method Detail

      • createReflector

        public static org.ejml.data.CMatrixRMaj createReflector​(org.ejml.data.CMatrixRMaj u)

        Creates a reflector from the provided vector.

        Q = I - γ u uT
        γ = 2/||u||2

        Parameters:
        u - A vector. Not modified.
        Returns:
        An orthogonal reflector.
      • createReflector

        public static org.ejml.data.CMatrixRMaj createReflector​(org.ejml.data.CMatrixRMaj u,
                                                                float gamma)

        Creates a reflector from the provided vector and gamma.

        Q = I - γ u uH

        Parameters:
        u - A vector. Not modified.
        gamma - To produce a reflector gamma needs to be equal to 2/||u||.
        Returns:
        An orthogonal reflector.
      • pivotMatrix

        public static org.ejml.data.CMatrixRMaj pivotMatrix​(org.ejml.data.CMatrixRMaj ret,
                                                            int[] pivots,
                                                            int numPivots,
                                                            boolean transposed)

        Creates a pivot matrix that exchanges the rows in a matrix:
        A' = P*A

        For example, if element 0 in 'pivots' is 2 then the first row in A' will be the 3rd row in A.

        Parameters:
        ret - If null then a new matrix is declared otherwise the results are written to it. Is modified.
        pivots - Specifies the new order of rows in a matrix.
        numPivots - How many elements in pivots are being used.
        transposed - If the transpose of the matrix is returned.
        Returns:
        A pivot matrix.
      • elementDiagMaxMagnitude2

        public static float elementDiagMaxMagnitude2​(org.ejml.data.CMatrixRMaj a)

        Returns the magnitude squared of the complex element along the diagonal with the largest magnitude

        Max{ |aij|^2 } for all i and j

        Parameters:
        a - A matrix. Not modified.
        Returns:
        The max magnitude squared
      • qualityTriangular

        public static float qualityTriangular​(org.ejml.data.CMatrixRMaj T)
        Computes the quality of a triangular matrix, where the quality of a matrix is defined in LinearSolver.quality(). In this situation the quality is the magnitude of the product of each diagonal element divided by the magnitude of the largest diagonal element. If all diagonal elements are zero then zero is returned.
        Returns:
        the quality of the system.
      • householder

        public static org.ejml.data.CMatrixRMaj householder​(org.ejml.data.CMatrixRMaj u,
                                                            float gamma)
        Q = I - gamma*u*uH
      • householderVector

        public static org.ejml.data.CMatrixRMaj householderVector​(org.ejml.data.CMatrixRMaj x)
        Computes the householder vector used in QR decomposition. u = x / max(x) u(0) = u(0) + |u| u = u / u(0)
        Parameters:
        x - Input vector. Unmodified.
        Returns:
        The found householder reflector vector