Class SquareMatrixSupport
- java.lang.Object
-
- org.apache.commons.statistics.inference.SquareMatrixSupport
-
final class SquareMatrixSupport extends java.lang.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SquareMatrixSupport.ArrayRealSquareMatrix
Implementation ofSquareMatrixSupport.RealSquareMatrix
using adouble[]
array to store entries.(package private) static interface
SquareMatrixSupport.RealSquareMatrix
Define a real-valued square matrix.
-
Constructor Summary
Constructors Modifier Constructor Description private
SquareMatrixSupport()
No instances.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static SquareMatrixSupport.RealSquareMatrix
create(int dimension, double[] data)
Creates a square matrix.
-
-
-
Method Detail
-
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:
java.lang.IllegalArgumentException
- if the matrix data is not square (length = dimension * dimension)
-
-