Class R1MatrixUtil

java.lang.Object
org.drip.numerical.linearalgebra.R1MatrixUtil

public class R1MatrixUtil
extends java.lang.Object
R1MatrixUtil implements R1 Matrix manipulation routines. It exports the following functionality:
  • Matrix Inversion using Closed form solutions (for low-dimension matrices), or using Gaussian elimination
  • Matrix Product
  • Matrix Diagonalization and Diagonal Pivoting
  • Matrix Regularization through Row Addition/Row Swap




Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    R1MatrixUtil()  
  • Method Summary

    Modifier and Type Method Description
    static double[][] Add​(double[][] a, double[][] b)
    Compute the Addition of the Input Matrices
    static boolean BottomLeft​(int rowIndex, int columnIndex, int size)
    Indicate if the Cell corresponds to Bottom Left Location in the Matrix
    static double[][] CholeskyBanachiewiczFactorization​(double[][] aadblA)
    Compute the Cholesky-Banachiewicz Factorization of the specified Matrix.
    static double[][] CrossProduct​(double[] vector1, double[] vector2)
    Compute the Cross Product between the Specified Vectors
    static double[][] Diagonal​(double[][] squareMatrix)
    Retrieve the Diagonal Elements in a Square Matrix
    static boolean DiagonalizeRow​(int iQ, double[][] aadblZ2XJack, double[][] aadblZ2YJack)
    Diagonalize the specified row in the source matrix, and apply comparable operations to the target
    static double DotProduct​(double[] adblA, double[] adblE)
    Dot Product of Vectors A and E
    static double[][] Invert​(double[][] aadblA, java.lang.String strMethod)
    Invert the input matrix using the specified Method
    static double[][] Invert2DMatrixUsingCramerRule​(double[][] aadblA)
    Invert a 2D Matrix using Cramer's Rule
    static double[][] InvertUsingGaussianElimination​(double[][] aadblSource)
    Invert the Source Matrix using Gaussian Elimination
    static boolean IsDiagonal​(double[][] matrix)
    Indicate if the Specified Matrix is Diagonal
    static boolean IsPeriodicTridiagonal​(double[][] squareMatrix)
    Indicate if the Input Matrix is Square and satisfies Periodic Tridiagonal Conditions
    static boolean IsSquare​(double[][] matrix)
    Indicate if the Input Matrix is Square
    static boolean IsSquareSymmetric​(double[][] squareMatrix)
    Indicate if the Input Matrix is Square and Symmetric
    static boolean IsTridiagonal​(double[][] squareMatrix)
    Indicate if the Input Matrix is Square and Tridiagonal
    static double[][] JacobiIteration​(double[][] squareMatrix)
    Construct a Jacobi Iteration Matrix from the Square Matrix
    static double[][] MakeSquareDiagonal​(double[] adblA)
    Make a Square Diagonal Matrix from a Row
    static double Modulus​(double[] v)
    Compute the Modulus of the Input Vector
    static boolean NegativeOrZero​(double[] adbl)
    Indicate if the Array Entries are Negative or Zero
    static double[] Normalize​(double[] adbl)
    Normalize the Input Vector
    static MatrixComplementTransform PivotDiagonal​(double[][] aadblA)
    Pivot the Diagonal of the Input Matrix
    static boolean PositiveLinearlyIndependent​(double[] adbl)
    Indicate if the Array Entries are Positive Linearly Independent
    static boolean PositiveOrZero​(double[] adbl)
    Indicate if the Array Entries are Positive or Zero
    static double[][] Power​(double[][] a, int k)
    Compute the Power of the Input Matrix
    static double[] Product​(double[][] a, double[] b)
    Compute the Product of an Input Matrix and a Vector
    static double[][] Product​(double[][] a, double[][] b)
    Compute the Product of the input matrices
    static double[][] Product​(double[] a, double[][] b)
    Compute the Product of an Input Vector and a Matrix
    static double[] Project​(double[] adblA, double[] adblE)
    Project the Vector A along the Vector E
    static QR QRDecomposition​(double[][] a)
    Perform a QR Decomposition on the Input Matrix
    static double[][] QRGrahamSchmidtOrthogonalization​(double[][] a)
    Orthogonalize the Specified Matrix Using the QR Graham-Schmidt Method
    static double[][] QRGrahamSchmidtOrthonormalization​(double[][] a)
    Orthonormalize the Specified Matrix Using the QR Graham-Schmidt Method
    static int Rank​(double[][] aadblSource)
    Compute the Rank of the Matrix
    static double RayleighQuotient​(double[][] matrix, double[] eigenvector)
    Compute the Rayleigh Quotient given the Matrix and one of its Eigenvector
    static boolean RegularizeUsingRowAddition​(MatrixComplementTransform mct)
    Regularize the specified diagonal entry of the input matrix using Row Addition
    static boolean RegularizeUsingRowSwap​(MatrixComplementTransform mct)
    Regularize the specified diagonal entry of the input matrix using Row Swapping
    static QR RQDecomposition​(double[][] a)
    Perform a RQ Decomposition on the Input Matrix
    static double[][] RQGrahamSchmidtOrthogonalization​(double[][] a)
    Orthogonalize the Specified Matrix Using the RQ Graham-Schmidt Method
    static double[][] RQGrahamSchmidtOrthonormalization​(double[][] a)
    Orthonormalize the Specified Matrix Using the RQ Graham-Schmidt Method
    static double[] Scale1D​(double[] vector, double scaleFactor)
    Scale the Entries of the Input Vector by the Factor
    static double[][] Scale2D​(double[][] matrix, double scaleFactor)
    Scale the Entries of the Input Matrix by the Factor
    static double[][] StrictlyLowerTriangular​(double[][] squareMatrix)
    Retrieve the Strictly Lower Triangular Elements in a Square Matrix
    static double[][] StrictlyUpperTriangular​(double[][] squareMatrix)
    Retrieve the Strictly Upper Triangular Elements in a Square Matrix
    static double[][] Subtract​(double[][] a, double[][] b)
    Compute the Subtraction of the Input Matrices
    static double Sum​(double[] adbl)
    Compute the Sum of the Input Vector
    static double[][] Sum​(double[][] aadblA, double[][] aadblB)
    Compute the Sum of the input matrices
    static boolean TopRight​(int rowIndex, int columnIndex, int size)
    Indicate if the Cell corresponds to Top ight Location in the Matrix
    static double Trace​(double[][] a)
    Compute the Trace of the Input Matrix
    static double[][] Transpose​(double[][] r2Array)
    Transpose the specified Square Matrix
    static double[][] UnsafeAdd​(double[][] a, double[][] b)
    Compute the Addition of the Input Matrices.
    static double UnsafeDotProduct​(double[] a, double[] e)
    Dot Product of Vectors A and E.
    static double UnsafeModulus​(double[] v)
    Compute the Modulus of the Vector.
    static double[][] UnsafePower​(double[][] a, int k)
    Compute the Power of the Input Matrix.
    static double[] UnsafeProduct​(double[][] a, double[] b)
    Compute the Product of an Input Matrix and a Vector.
    static double[][] UnsafeProduct​(double[][] a, double[][] b)
    Compute the Product of the Input Matrices.
    static double[][] UnsafeProduct​(double[] a, double[][] b)
    Compute the Product of an Input Vector and a Matrix.
    static double[] UnsafeProjectVOnU​(double[] u, double[] v)
    Compute the Projection Vector on V induced by U.
    static double[][] UnsafeQRGrahamSchmidtOrthogonalization​(double[][] a)
    Orthogonalize the Specified Matrix Using the QR Graham-Schmidt Method.
    static double[][] UnsafeRQGrahamSchmidtOrthogonalization​(double[][] a)
    Orthogonalize the Specified Matrix Using the RQ Graham-Schmidt Method.
    static double[][] UnsafeSubtract​(double[][] a, double[][] b)
    Compute the Subtraction of the Input Matrices.
    static double UnsafeTrace​(double[][] a)
    Compute the Trace of the Input Matrix.
    static double[][] UnsafeTranspose​(double[][] r2Array)
    Transpose the specified Square Matrix.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • R1MatrixUtil

      public R1MatrixUtil()
  • Method Details

    • UnsafeDotProduct

      public static final double UnsafeDotProduct​(double[] a, double[] e)
      Dot Product of Vectors A and E. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Vector A
      e - Vector E
      Returns:
      The Dot Product
    • UnsafeProjectVOnU

      public static final double[] UnsafeProjectVOnU​(double[] u, double[] v)
      Compute the Projection Vector on V induced by U. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      u - Vector U
      v - Vector V
      Returns:
      The Projection Vector
    • UnsafeModulus

      public static final double UnsafeModulus​(double[] v)
      Compute the Modulus of the Vector. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      v - Vector V
      Returns:
      Modulus of the Vector
    • UnsafeProduct

      public static final double[][] UnsafeProduct​(double[][] a, double[][] b)
      Compute the Product of the Input Matrices. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Vector A
      b - Vector B
      Returns:
      The Product Matrix
    • UnsafeProduct

      public static final double[] UnsafeProduct​(double[][] a, double[] b)
      Compute the Product of an Input Matrix and a Vector. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Matrix A
      b - Vector B
      Returns:
      The Product
    • UnsafeProduct

      public static final double[][] UnsafeProduct​(double[] a, double[][] b)
      Compute the Product of an Input Vector and a Matrix. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Column A
      b - Matrix B
      Returns:
      The Product
    • UnsafeAdd

      public static final double[][] UnsafeAdd​(double[][] a, double[][] b)
      Compute the Addition of the Input Matrices. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Vector A
      b - Vector B
      Returns:
      The Addition Matrix
    • UnsafeSubtract

      public static final double[][] UnsafeSubtract​(double[][] a, double[][] b)
      Compute the Subtraction of the Input Matrices. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Vector A
      b - Vector B
      Returns:
      The Subtraction Matrix
    • UnsafePower

      public static final double[][] UnsafePower​(double[][] a, int k)
      Compute the Power of the Input Matrix. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Vector A
      k - Power Exponent
      Returns:
      The Power Matrix
    • UnsafeTrace

      public static final double UnsafeTrace​(double[][] a) throws java.lang.Exception
      Compute the Trace of the Input Matrix. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - Vector A
      Returns:
      The Trace
      Throws:
      java.lang.Exception - Thrown if Trace cannot be Calculated
    • UnsafeRQGrahamSchmidtOrthogonalization

      public static final double[][] UnsafeRQGrahamSchmidtOrthogonalization​(double[][] a)
      Orthogonalize the Specified Matrix Using the RQ Graham-Schmidt Method. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - The Input Matrix
      Returns:
      The RQ Orthogonalized Matrix
    • UnsafeQRGrahamSchmidtOrthogonalization

      public static final double[][] UnsafeQRGrahamSchmidtOrthogonalization​(double[][] a)
      Orthogonalize the Specified Matrix Using the QR Graham-Schmidt Method. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      a - The Input Matrix
      Returns:
      The QR Orthogonalized Matrix
    • UnsafeTranspose

      public static final double[][] UnsafeTranspose​(double[][] r2Array)
      Transpose the specified Square Matrix. Unsafe Methods do not validate the Input Arguments, so use caution in applying these Methods
      Parameters:
      r2Array - The Input R2 Array
      Returns:
      The Transpose of the Input R2 Array
    • BottomLeft

      public static final boolean BottomLeft​(int rowIndex, int columnIndex, int size)
      Indicate if the Cell corresponds to Bottom Left Location in the Matrix
      Parameters:
      rowIndex - Row Index
      columnIndex - Column Index
      size - Matrix Size
      Returns:
      TRUE - The Cell corresponds to Bottom Left
    • TopRight

      public static final boolean TopRight​(int rowIndex, int columnIndex, int size)
      Indicate if the Cell corresponds to Top ight Location in the Matrix
      Parameters:
      rowIndex - Row Index
      columnIndex - Column Index
      size - Matrix Size
      Returns:
      TRUE - The Cell corresponds to Top Right
    • DiagonalizeRow

      public static final boolean DiagonalizeRow​(int iQ, double[][] aadblZ2XJack, double[][] aadblZ2YJack)
      Diagonalize the specified row in the source matrix, and apply comparable operations to the target
      Parameters:
      iQ - Row in the Source Matrix
      aadblZ2XJack - Source Matrix
      aadblZ2YJack - Target Matrix
      Returns:
      TRUE - Diagonalization was successful
    • Product

      public static final double[] Product​(double[][] a, double[] b)
      Compute the Product of an Input Matrix and a Vector
      Parameters:
      a - Matrix A
      b - Array B
      Returns:
      The Product
    • Product

      public static final double[][] Product​(double[] a, double[][] b)
      Compute the Product of an Input Vector and a Matrix
      Parameters:
      a - Vector A
      b - Matrix B
      Returns:
      The Product
    • Product

      public static final double[][] Product​(double[][] a, double[][] b)
      Compute the Product of the input matrices
      Parameters:
      a - Matrix A
      b - Matrix B
      Returns:
      The Product
    • Add

      public static final double[][] Add​(double[][] a, double[][] b)
      Compute the Addition of the Input Matrices
      Parameters:
      a - Matrix A
      b - Matrix B
      Returns:
      The Addition
    • Subtract

      public static final double[][] Subtract​(double[][] a, double[][] b)
      Compute the Subtraction of the Input Matrices
      Parameters:
      a - Matrix A
      b - Matrix B
      Returns:
      The Subtraction
    • Power

      public static final double[][] Power​(double[][] a, int k)
      Compute the Power of the Input Matrix
      Parameters:
      a - Matrix A
      k - Power Exponent
      Returns:
      The Matrix Power
    • Trace

      public static final double Trace​(double[][] a) throws java.lang.Exception
      Compute the Trace of the Input Matrix
      Parameters:
      a - Vector A
      Returns:
      The Trace
      Throws:
      java.lang.Exception - Thrown if Trace cannot be Calculated
    • Sum

      public static final double[][] Sum​(double[][] aadblA, double[][] aadblB)
      Compute the Sum of the input matrices
      Parameters:
      aadblA - Matrix A
      aadblB - Matrix B
      Returns:
      The Sum
    • MakeSquareDiagonal

      public static final double[][] MakeSquareDiagonal​(double[] adblA)
      Make a Square Diagonal Matrix from a Row
      Parameters:
      adblA - The Row Array
      Returns:
      The corresponding Square Diagonal Matrix
    • Invert2DMatrixUsingCramerRule

      public static final double[][] Invert2DMatrixUsingCramerRule​(double[][] aadblA)
      Invert a 2D Matrix using Cramer's Rule
      Parameters:
      aadblA - Input 2D Matrix
      Returns:
      The Inverted Matrix
    • RegularizeUsingRowSwap

      public static final boolean RegularizeUsingRowSwap​(MatrixComplementTransform mct)
      Regularize the specified diagonal entry of the input matrix using Row Swapping
      Parameters:
      mct - The Input Matrix Complement Transform
      Returns:
      The Regularization was successful
    • RegularizeUsingRowAddition

      public static final boolean RegularizeUsingRowAddition​(MatrixComplementTransform mct)
      Regularize the specified diagonal entry of the input matrix using Row Addition
      Parameters:
      mct - The Input Matrix Complement Transform
      Returns:
      The Regularization was successful
    • PivotDiagonal

      public static final MatrixComplementTransform PivotDiagonal​(double[][] aadblA)
      Pivot the Diagonal of the Input Matrix
      Parameters:
      aadblA - The Input Matrix
      Returns:
      The Matrix Complement Transform Instance
    • InvertUsingGaussianElimination

      public static final double[][] InvertUsingGaussianElimination​(double[][] aadblSource)
      Invert the Source Matrix using Gaussian Elimination
      Parameters:
      aadblSource - Source Matrix
      Returns:
      The Inverted Matrix
    • Invert

      public static final double[][] Invert​(double[][] aadblA, java.lang.String strMethod)
      Invert the input matrix using the specified Method
      Parameters:
      aadblA - Input Matrix
      strMethod - The Inversion Method
      Returns:
      The Inverted Matrix
    • Rank

      public static final int Rank​(double[][] aadblSource) throws java.lang.Exception
      Compute the Rank of the Matrix
      Parameters:
      aadblSource - Source Matrix
      Returns:
      The Rank of the Matrix
      Throws:
      java.lang.Exception - Thrown if the Rank Cannot be computed
    • Transpose

      public static final double[][] Transpose​(double[][] r2Array)
      Transpose the specified Square Matrix
      Parameters:
      r2Array - The Input R2 Array
      Returns:
      The Transpose of the Square Matrix
    • CholeskyBanachiewiczFactorization

      public static final double[][] CholeskyBanachiewiczFactorization​(double[][] aadblA)
      Compute the Cholesky-Banachiewicz Factorization of the specified Matrix.
      Parameters:
      aadblA - The Input Matrix
      Returns:
      The Factorized Matrix
    • DotProduct

      public static final double DotProduct​(double[] adblA, double[] adblE) throws java.lang.Exception
      Dot Product of Vectors A and E
      Parameters:
      adblA - Vector A
      adblE - Vector E
      Returns:
      The Dot Product
      Throws:
      java.lang.Exception - Thrown if the Dot-Product cannot be computed
    • CrossProduct

      public static final double[][] CrossProduct​(double[] vector1, double[] vector2)
      Compute the Cross Product between the Specified Vectors
      Parameters:
      vector1 - Vector #1
      vector2 - Vector #2
      Returns:
      The Cross Product
    • Project

      public static final double[] Project​(double[] adblA, double[] adblE)
      Project the Vector A along the Vector E
      Parameters:
      adblA - Vector A
      adblE - Vector E
      Returns:
      The Vector of Projection of A along E
    • Sum

      public static final double Sum​(double[] adbl) throws java.lang.Exception
      Compute the Sum of the Input Vector
      Parameters:
      adbl - The Input Vector
      Returns:
      TRUE - The Sum of the Input Vector
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • Modulus

      public static final double Modulus​(double[] v) throws java.lang.Exception
      Compute the Modulus of the Input Vector
      Parameters:
      v - The Input Vector
      Returns:
      The Modulus of the Input Vector
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • PositiveOrZero

      public static final boolean PositiveOrZero​(double[] adbl) throws java.lang.Exception
      Indicate if the Array Entries are Positive or Zero
      Parameters:
      adbl - The Array
      Returns:
      TRUE - The Array Entries are Positive or Zero
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • NegativeOrZero

      public static final boolean NegativeOrZero​(double[] adbl) throws java.lang.Exception
      Indicate if the Array Entries are Negative or Zero
      Parameters:
      adbl - The Array
      Returns:
      The Array Entries are Negative or Zero
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • PositiveLinearlyIndependent

      public static final boolean PositiveLinearlyIndependent​(double[] adbl) throws java.lang.Exception
      Indicate if the Array Entries are Positive Linearly Independent
      Parameters:
      adbl - The Array
      Returns:
      TRUE - The Array Entries are Positive Linearly Independent
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • Normalize

      public static final double[] Normalize​(double[] adbl)
      Normalize the Input Vector
      Parameters:
      adbl - The Input Vector
      Returns:
      The Normalized Vector
    • RQGrahamSchmidtOrthogonalization

      public static final double[][] RQGrahamSchmidtOrthogonalization​(double[][] a)
      Orthogonalize the Specified Matrix Using the RQ Graham-Schmidt Method
      Parameters:
      a - The Input Matrix
      Returns:
      The RQ Orthogonalized Matrix
    • QRGrahamSchmidtOrthogonalization

      public static final double[][] QRGrahamSchmidtOrthogonalization​(double[][] a)
      Orthogonalize the Specified Matrix Using the QR Graham-Schmidt Method
      Parameters:
      a - The Input Matrix
      Returns:
      The QR Orthogonalized Matrix
    • RQGrahamSchmidtOrthonormalization

      public static final double[][] RQGrahamSchmidtOrthonormalization​(double[][] a)
      Orthonormalize the Specified Matrix Using the RQ Graham-Schmidt Method
      Parameters:
      a - The Input Matrix
      Returns:
      The RQ Orthonormalized Matrix
    • QRGrahamSchmidtOrthonormalization

      public static final double[][] QRGrahamSchmidtOrthonormalization​(double[][] a)
      Orthonormalize the Specified Matrix Using the QR Graham-Schmidt Method
      Parameters:
      a - The Input Matrix
      Returns:
      The QR Orthonormalized Matrix
    • QRDecomposition

      public static final QR QRDecomposition​(double[][] a)
      Perform a QR Decomposition on the Input Matrix
      Parameters:
      a - The Input Matrix
      Returns:
      The Output of QR Decomposition
    • RQDecomposition

      public static final QR RQDecomposition​(double[][] a)
      Perform a RQ Decomposition on the Input Matrix
      Parameters:
      a - The Input Matrix
      Returns:
      The Output of RQ Decomposition
    • RayleighQuotient

      public static final double RayleighQuotient​(double[][] matrix, double[] eigenvector) throws java.lang.Exception
      Compute the Rayleigh Quotient given the Matrix and one of its Eigenvector
      Parameters:
      matrix - The Given Matrix
      eigenvector - The corresponding Eigenvector
      Returns:
      The Computed Rayleigh Quotient
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
    • Scale1D

      public static final double[] Scale1D​(double[] vector, double scaleFactor)
      Scale the Entries of the Input Vector by the Factor
      Parameters:
      vector - The Input Vector
      scaleFactor - The Scale Factor
      Returns:
      The Scaled Matrix
    • Scale2D

      public static final double[][] Scale2D​(double[][] matrix, double scaleFactor)
      Scale the Entries of the Input Matrix by the Factor
      Parameters:
      matrix - The Input Matrix
      scaleFactor - The Scale Factor
      Returns:
      The Scaled Matrix
    • IsDiagonal

      public static final boolean IsDiagonal​(double[][] matrix)
      Indicate if the Specified Matrix is Diagonal
      Parameters:
      matrix - The Matrix
      Returns:
      TRUE - The Specified Matrix is Diagonal
    • IsSquare

      public static final boolean IsSquare​(double[][] matrix)
      Indicate if the Input Matrix is Square
      Parameters:
      matrix - Input Matrix
      Returns:
      TRUE - Input Matrix is Square
    • Diagonal

      public static final double[][] Diagonal​(double[][] squareMatrix)
      Retrieve the Diagonal Elements in a Square Matrix
      Parameters:
      squareMatrix - Input Matrix
      Returns:
      Diagonal Elements in a Square Matrix
    • StrictlyLowerTriangular

      public static final double[][] StrictlyLowerTriangular​(double[][] squareMatrix)
      Retrieve the Strictly Lower Triangular Elements in a Square Matrix
      Parameters:
      squareMatrix - Input Matrix
      Returns:
      Strictly Lower Triangular Elements in a Square Matrix
    • StrictlyUpperTriangular

      public static final double[][] StrictlyUpperTriangular​(double[][] squareMatrix)
      Retrieve the Strictly Upper Triangular Elements in a Square Matrix
      Parameters:
      squareMatrix - Input Matrix
      Returns:
      Strictly Upper Triangular Elements in a Square Matrix
    • JacobiIteration

      public static final double[][] JacobiIteration​(double[][] squareMatrix)
      Construct a Jacobi Iteration Matrix from the Square Matrix
      Parameters:
      squareMatrix - Square Matrix
      Returns:
      Jacobi Iteration Matrix
    • IsSquareSymmetric

      public static final boolean IsSquareSymmetric​(double[][] squareMatrix)
      Indicate if the Input Matrix is Square and Symmetric
      Parameters:
      squareMatrix - Input Matrix
      Returns:
      TRUE - Input Matrix is Square and Symmetric
    • IsTridiagonal

      public static final boolean IsTridiagonal​(double[][] squareMatrix)
      Indicate if the Input Matrix is Square and Tridiagonal
      Parameters:
      squareMatrix - Input Matrix
      Returns:
      TRUE - Input Matrix is Square and Tridiagonal
    • IsPeriodicTridiagonal

      public static final boolean IsPeriodicTridiagonal​(double[][] squareMatrix)
      Indicate if the Input Matrix is Square and satisfies Periodic Tridiagonal Conditions
      Parameters:
      squareMatrix - Input Matrix
      Returns:
      TRUE - Input Matrix is Square and satisfies Periodic Tridiagonal Conditions