Class SquareMatrixSupport

java.lang.Object
org.apache.commons.statistics.inference.SquareMatrixSupport

final class SquareMatrixSupport extends Object
Provide support for square matrix basic algebraic operations.

Matrix element indexing is 0-based e.g. get(0, 0) returns the element in the first row, first column of the matrix.

This class supports computations in the KolmogorovSmirnovTest.

Since:
1.1
  • Constructor Details

    • SquareMatrixSupport

      private SquareMatrixSupport()
      No instances.
  • Method Details

    • create

      static SquareMatrixSupport.RealSquareMatrix create(int dimension, double[] data)
      Creates a square matrix. Data may be used in-place.

      Values are addressed using a[i][j] = i*dimension + j.

      Parameters:
      dimension - Matrix dimension.
      data - Matrix data.
      Returns:
      the square matrix
      Throws:
      IllegalArgumentException - if the matrix data is not square (length = dimension * dimension)