Class SquareMatrixSupport
java.lang.Object
org.apache.commons.statistics.inference.SquareMatrixSupport
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 ClassesModifier and TypeClassDescriptionprivate static class
Implementation ofSquareMatrixSupport.RealSquareMatrix
using adouble[]
array to store entries.(package private) static interface
Define a real-valued square matrix. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static SquareMatrixSupport.RealSquareMatrix
create
(int dimension, double[] data) Creates a square matrix.
-
Constructor Details
-
SquareMatrixSupport
private SquareMatrixSupport()No instances.
-
-
Method Details
-
create
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)
-