Class MatrixFeatures_CDRM

java.lang.Object
org.ejml.dense.row.MatrixFeatures_CDRM

@Generated("org.ejml.dense.row.MatrixFeatures_ZDRM") public class MatrixFeatures_CDRM extends Object

Functions for computing the features of complex matrices

  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Checks to see if any element in the matrix is NaN.
    static boolean
    Checks to see if any element in the matrix is NaN of Infinite.
    static boolean
    Checks to see if each element in the two matrices are equal: aij == bij
    static boolean
    isEquals(CMatrixD1 a, CMatrixD1 b, float tol)
    Checks to see if each element in the two matrices are within tolerance of each other: tol ≥ |aij - bij|.
    static boolean
    isHermitian(CMatrixRMaj Q, float tol)
    Hermitian matrix is a square matrix with complex entries that are equal to its own conjugate transpose.
    static boolean
    isIdentical(CMatrixD1 a, CMatrixD1 b, float tol)
    Checks to see if each corresponding element in the two matrices are within tolerance of each other or have the some symbolic meaning.
    static boolean
    isIdentity(CMatrix mat, float tol)
    Checks to see if the provided matrix is within tolerance to an identity matrix.
    static boolean
    isLowerTriangle(CMatrixRMaj A, int hessenberg, float tol)
    Checks to see if a matrix is lower triangular or Hessenberg.
    static boolean
    isNegative(CMatrixD1 a, CMatrixD1 b, float tol)
    Checks to see if the two matrices are the negative of each other:

    aij = -bij
    static boolean
    Checks to see if the matrix is positive definite.
    static boolean
    isUnitary(CMatrixRMaj Q, float tol)
    Unitary matrices have the following properties:

    Q*QH = I
    static boolean
    isUpperTriangle(CMatrixRMaj A, int hessenberg, float tol)
    Checks to see if a matrix is upper triangular or Hessenberg.
    static boolean
    Checks to see if the matrix is a vector or not.
    static boolean
    isZeros(CMatrixD1 m, float tol)
    Checks to see all the elements in the matrix are zeros

    Methods inherited from class java.lang.Object

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

    • isVector

      public static boolean isVector(Matrix mat)
      Checks to see if the matrix is a vector or not.
      Parameters:
      mat - A matrix. Not modified.
      Returns:
      True if it is a vector and false if it is not.
    • isNegative

      public static boolean isNegative(CMatrixD1 a, CMatrixD1 b, float tol)

      Checks to see if the two matrices are the negative of each other:

      aij = -bij

      Parameters:
      a - First matrix. Not modified.
      b - Second matrix. Not modified.
      tol - Numerical tolerance.
      Returns:
      True if they are the negative of each other within tolerance.
    • hasNaN

      public static boolean hasNaN(CMatrixD1 m)
      Checks to see if any element in the matrix is NaN.
      Parameters:
      m - A matrix. Not modified.
      Returns:
      True if any element in the matrix is NaN.
    • hasUncountable

      public static boolean hasUncountable(CMatrixD1 m)
      Checks to see if any element in the matrix is NaN of Infinite.
      Parameters:
      m - A matrix. Not modified.
      Returns:
      True if any element in the matrix is NaN of Infinite.
    • isEquals

      public static boolean isEquals(CMatrixD1 a, CMatrixD1 b)

      Checks to see if each element in the two matrices are equal: aij == bij

      NOTE: If any of the elements are NaN then false is returned. If two corresponding elements are both positive or negative infinity then they are equal.

      Parameters:
      a - A matrix. Not modified.
      b - A matrix. Not modified.
      Returns:
      true if identical and false otherwise.
    • isEquals

      public static boolean isEquals(CMatrixD1 a, CMatrixD1 b, float tol)

      Checks to see if each element in the two matrices are within tolerance of each other: tol ≥ |aij - bij|.

      NOTE: If any of the elements are not countable then false is returned.
      NOTE: If a tolerance of zero is passed in this is equivalent to calling isEquals(CMatrixD1, CMatrixD1)

      Parameters:
      a - A matrix. Not modified.
      b - A matrix. Not modified.
      tol - How close to being identical each element needs to be.
      Returns:
      true if equals and false otherwise.
    • isIdentical

      public static boolean isIdentical(CMatrixD1 a, CMatrixD1 b, float tol)

      Checks to see if each corresponding element in the two matrices are within tolerance of each other or have the some symbolic meaning. This can handle NaN and Infinite numbers.

      If both elements are countable then the following equality test is used:
      |aij - bij| ≤ tol.
      Otherwise both numbers must both be Float.NaN, Float.POSITIVE_INFINITY, or Float.NEGATIVE_INFINITY to be identical.

      Parameters:
      a - A matrix. Not modified.
      b - A matrix. Not modified.
      tol - Tolerance for equality.
      Returns:
      true if identical and false otherwise.
    • isIdentity

      public static boolean isIdentity(CMatrix mat, float tol)
      Checks to see if the provided matrix is within tolerance to an identity matrix.
      Parameters:
      mat - Matrix being examined. Not modified.
      tol - Tolerance.
      Returns:
      True if it is within tolerance to an identify matrix.
    • isHermitian

      public static boolean isHermitian(CMatrixRMaj Q, float tol)

      Hermitian matrix is a square matrix with complex entries that are equal to its own conjugate transpose.

      a[i,j] = conj(a[j,i])

      Parameters:
      Q - The matrix being tested. Not modified.
      tol - Tolerance.
      Returns:
      True if it passes the test.
    • isUnitary

      public static boolean isUnitary(CMatrixRMaj Q, float tol)

      Unitary matrices have the following properties:

      Q*QH = I

      This is the complex equivalent of orthogonal matrix.

      Parameters:
      Q - The matrix being tested. Not modified.
      tol - Tolerance.
      Returns:
      True if it passes the test.
    • isPositiveDefinite

      public static boolean isPositiveDefinite(CMatrixRMaj A)

      Checks to see if the matrix is positive definite.

      xT A x > 0
      for all x where x is a non-zero vector and A is a hermitian matrix.

      Parameters:
      A - square hermitian matrix. Not modified.
      Returns:
      True if it is positive definite and false if it is not.
    • isUpperTriangle

      public static boolean isUpperTriangle(CMatrixRMaj A, int hessenberg, float tol)

      Checks to see if a matrix is upper triangular or Hessenberg. A Hessenberg matrix of degree N has the following property:

      aij ≤ 0 for all i < j+N

      A triangular matrix is a Hessenberg matrix of degree 0.

      Parameters:
      A - Matrix being tested. Not modified.
      hessenberg - The degree of being hessenberg.
      tol - How close to zero the lower left elements need to be.
      Returns:
      If it is an upper triangular/hessenberg matrix or not.
    • isLowerTriangle

      public static boolean isLowerTriangle(CMatrixRMaj A, int hessenberg, float tol)

      Checks to see if a matrix is lower triangular or Hessenberg. A Hessenberg matrix of degree N has the following property:

      aij ≤ 0 for all i < j+N

      A triangular matrix is a Hessenberg matrix of degree 0.

      Parameters:
      A - Matrix being tested. Not modified.
      hessenberg - The degree of being hessenberg.
      tol - How close to zero the lower left elements need to be.
      Returns:
      If it is an upper triangular/hessenberg matrix or not.
    • isZeros

      public static boolean isZeros(CMatrixD1 m, float tol)
      Checks to see all the elements in the matrix are zeros
      Parameters:
      m - A matrix. Not modified.
      Returns:
      True if all elements are zeros or false if not