Package pulse.math.linear
Class Matrices
- java.lang.Object
-
- pulse.math.linear.Matrices
-
public class Matrices extends Object
A static factory class used to create matrices. The factory methods are invoked by classes outside this package instead of the constructors, which are package-private.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SquareMatrixcreateIdentityMatrix(int dimension)Creates an identity matrix with its dimension equal to the argumentstatic RectangularMatrixcreateMatrix(double[][] data)Creates a square matrix out ofdata.static SquareMatrixcreateSquareMatrix(double[][] data)
-
-
-
Method Detail
-
createMatrix
public static RectangularMatrix createMatrix(double[][] data)
Creates a square matrix out ofdata. Depending on the data dimensions, this will either create a general-formSquareMatrixor one of the subclasses:Matrix2,Matrix3orMatrix4.- Parameters:
data- the input data- Returns:
- a SquareMatrix instance or one of its subclasses
-
createSquareMatrix
public static SquareMatrix createSquareMatrix(double[][] data)
-
createIdentityMatrix
public static SquareMatrix createIdentityMatrix(int dimension)
Creates an identity matrix with its dimension equal to the argument- Parameters:
dimension- the dimension- Returns:
- an identity matrix of the given dimension
-
-