Package matrixmultiply.core
Class MatrixUtils
java.lang.Object
matrixmultiply.core.MatrixUtils
- Author:
- Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double[][]copy(double[][] m)static double[][]createMultiplyResultBufferInitializedToZeros(double[][] a, double[][] b)static booleanisIdentity(double[][] matrix)static voidsetAllRandom(double[][] matrix)Adds random values to the matrix.static voidsetIdentity(double[][] matrix)static StringtoString(double[][] matrix)Outputs a visual representation of the matrix in the form of a string
-
Constructor Details
-
MatrixUtils
public MatrixUtils()
-
-
Method Details
-
createMultiplyResultBufferInitializedToZeros
public static double[][] createMultiplyResultBufferInitializedToZeros(double[][] a, double[][] b) -
setIdentity
public static void setIdentity(double[][] matrix) -
isIdentity
public static boolean isIdentity(double[][] matrix) -
setAllRandom
public static void setAllRandom(double[][] matrix)Adds random values to the matrix.- Parameters:
matrix- the matrix to add random values to
-
toString
Outputs a visual representation of the matrix in the form of a string- Parameters:
matrix- the specific matrix to use- Returns:
- the matrix as a string
-
copy
public static double[][] copy(double[][] m)
-