org.spaceroots.mantissa.linalg
Class MatrixFactory
- java.lang.Object
-
- org.spaceroots.mantissa.linalg.MatrixFactory
-
public class MatrixFactory extends java.lang.ObjectThis class is a factory for the linear algebra package.This class is devoted to building the right type of matrix according to the structure of the non null elements.
This is a utility class, no instance of this class should be built, so the constructor is explicitly made private.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static MatrixbuildMatrix(int rows, int columns, double[] data)Build a matrix of the right subtype.static MatrixbuildMatrix(int rows, int columns, double[] data, int lowerElements, int upperElements)Build a matrix of the right subtype.
-
-
-
Method Detail
-
buildMatrix
public static Matrix buildMatrix(int rows, int columns, double[] data, int lowerElements, int upperElements)
Build a matrix of the right subtype. Build the right subtype of matrix according to the structure of the non null elements of the instance. Note that the information provided does not allow to build instances of theSymetricalMatrixclass. When the data corresponding to a symetrical matrix is given, this method can only build an instance of theGeneralSquareMatrixclass.- Parameters:
rows- number of row of the matrixcolumns- number of columns of the matrixdata- table of the matrix elements (stored row after row)lowerElements- number of non null elements in the lower triangleupperElements- number of non null elements in the upper triangle- Returns:
- a matrix containing the instance
-
buildMatrix
public static Matrix buildMatrix(int rows, int columns, double[] data)
Build a matrix of the right subtype. Build the right subtype of matrix according to the dimensions.- Parameters:
rows- number of row of the matrixcolumns- number of columns of the matrixdata- table of the matrix elements (stored row after row)- Returns:
- a matrix containing the instance
-
-
DataMelt 3.0 © DataMelt by jWork.ORG