public class MatrixUtils extends Object
Modifier and Type | Method and Description |
---|---|
static byte[][] |
add(byte[][] matrix1,
byte[][] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static byte[] |
add(byte[] matrix1,
byte[] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static char[][] |
add(char[][] matrix1,
char[][] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static char[] |
add(char[] matrix1,
char[] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static double[][] |
add(double[][] matrix1,
double[][] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static double[] |
add(double[] matrix1,
double[] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static float[][] |
add(float[][] matrix1,
float[][] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static float[] |
add(float[] matrix1,
float[] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static int[][] |
add(int[][] matrix1,
int[][] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static int[] |
add(int[] matrix1,
int[] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static long[][] |
add(long[][] matrix1,
long[][] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static long[] |
add(long[] matrix1,
long[] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static short[][] |
add(short[][] matrix1,
short[][] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static short[] |
add(short[] matrix1,
short[] matrix2)
Returns the sum of
matrix1 and matrix2 . |
static byte[][] |
multiply(byte[][] matrix,
byte scalar)
Returns the product of
matrix and scalar . |
static byte[][] |
multiply(byte[][] matrix1,
byte[] matrix2)
Returns the product of
matrix1 and matrix2 . |
static byte[][] |
multiply(byte[][] matrix1,
byte[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static byte[] |
multiply(byte[] matrix,
byte scalar)
Returns the product of
matrix and scalar . |
static byte[] |
multiply(byte[] matrix1,
byte[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static char[][] |
multiply(char[][] matrix,
char scalar)
Returns the product of
matrix and scalar . |
static char[][] |
multiply(char[][] matrix1,
char[] matrix2)
Returns the product of
matrix1 and matrix2 . |
static char[][] |
multiply(char[][] matrix1,
char[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static char[] |
multiply(char[] matrix,
char scalar)
Returns the product of
matrix and scalar . |
static char[] |
multiply(char[] matrix1,
char[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static double[][] |
multiply(double[][] matrix,
double scalar)
Returns the product of
matrix and scalar . |
static double[][] |
multiply(double[][] matrix1,
double[] matrix2)
Returns the product of
matrix1 and matrix2 . |
static double[][] |
multiply(double[][] matrix1,
double[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static double[] |
multiply(double[] matrix,
double scalar)
Returns the product of
matrix and scalar . |
static double[] |
multiply(double[] matrix1,
double[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static float[][] |
multiply(float[][] matrix,
float scalar)
Returns the product of
matrix and scalar . |
static float[][] |
multiply(float[][] matrix1,
float[] matrix2)
Returns the product of
matrix1 and matrix2 . |
static float[][] |
multiply(float[][] matrix1,
float[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static float[] |
multiply(float[] matrix,
float scalar)
Returns the product of
matrix and scalar . |
static float[] |
multiply(float[] matrix1,
float[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static int[][] |
multiply(int[][] matrix,
int scalar)
Returns the product of
matrix and scalar . |
static int[][] |
multiply(int[][] matrix1,
int[] matrix2)
Returns the product of
matrix1 and matrix2 . |
static int[][] |
multiply(int[][] matrix1,
int[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static int[] |
multiply(int[] matrix,
int scalar)
Returns the product of
matrix and scalar . |
static int[] |
multiply(int[] matrix1,
int[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static long[][] |
multiply(long[][] matrix,
long scalar)
Returns the product of
matrix and scalar . |
static long[][] |
multiply(long[][] matrix1,
long[] matrix2)
Returns the product of
matrix1 and matrix2 . |
static long[][] |
multiply(long[][] matrix1,
long[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static long[] |
multiply(long[] matrix,
long scalar)
Returns the product of
matrix and scalar . |
static long[] |
multiply(long[] matrix1,
long[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static short[][] |
multiply(short[][] matrix,
short scalar)
Returns the product of
matrix and scalar . |
static short[][] |
multiply(short[][] matrix1,
short[] matrix2)
Returns the product of
matrix1 and matrix2 . |
static short[][] |
multiply(short[][] matrix1,
short[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static short[] |
multiply(short[] matrix,
short scalar)
Returns the product of
matrix and scalar . |
static short[] |
multiply(short[] matrix1,
short[][] matrix2)
Returns the product of
matrix1 and matrix2 . |
static boolean[][] |
transpose(boolean[] matrix)
Returns the transpose of
matrix . |
static boolean[][] |
transpose(boolean[][] matrix)
Returns the transpose of
matrix . |
static byte[][] |
transpose(byte[] matrix)
Returns the transpose of
matrix . |
static byte[][] |
transpose(byte[][] matrix)
Returns the transpose of
matrix . |
static char[][] |
transpose(char[] matrix)
Returns the transpose of
matrix . |
static char[][] |
transpose(char[][] matrix)
Returns the transpose of
matrix . |
static double[][] |
transpose(double[] matrix)
Returns the transpose of
matrix . |
static double[][] |
transpose(double[][] matrix)
Returns the transpose of
matrix . |
static float[][] |
transpose(float[] matrix)
Returns the transpose of
matrix . |
static float[][] |
transpose(float[][] matrix)
Returns the transpose of
matrix . |
static int[][] |
transpose(int[] matrix)
Returns the transpose of
matrix . |
static int[][] |
transpose(int[][] matrix)
Returns the transpose of
matrix . |
static long[][] |
transpose(long[] matrix)
Returns the transpose of
matrix . |
static long[][] |
transpose(long[][] matrix)
Returns the transpose of
matrix . |
static Object[][] |
transpose(Object[] matrix)
Returns the transpose of
matrix . |
static Object[][] |
transpose(Object[][] matrix)
Returns the transpose of
matrix . |
static short[][] |
transpose(short[] matrix)
Returns the transpose of
matrix . |
static short[][] |
transpose(short[][] matrix)
Returns the transpose of
matrix . |
static boolean |
validateMatrix(boolean[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(boolean[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(byte[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(byte[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(char[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(char[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(double[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(double[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(float[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(float[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(int[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(int[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(long[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(long[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(Object[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(Object[][] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(short[] matrix)
Returns whether
matrix is valid. |
static boolean |
validateMatrix(short[][] matrix)
Returns whether
matrix is valid. |
public static boolean validateMatrix(byte[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(short[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(int[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(long[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(float[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(double[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(char[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(boolean[] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(Object[] matrix)
matrix
is valid. A matrix is valid if it
meets the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(byte[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(short[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(int[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(long[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(float[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(double[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(char[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(boolean[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static boolean validateMatrix(Object[][] matrix)
matrix
is valid. A matrix is valid if it meets
the following criteria:
null
matrix
- the matrix to validatetrue
if matrix
is valid; false
otherwisepublic static byte[][] transpose(byte[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(byte[])
public static short[][] transpose(short[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(short[])
public static int[][] transpose(int[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(int[])
public static long[][] transpose(long[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(long[])
public static float[][] transpose(float[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(float[])
public static double[][] transpose(double[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(double[])
public static char[][] transpose(char[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(char[])
public static boolean[][] transpose(boolean[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(boolean[])
public static Object[][] transpose(Object[] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(Object[])
public static byte[][] transpose(byte[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(byte[][])
public static short[][] transpose(short[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(short[][])
public static int[][] transpose(int[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(int[][])
public static long[][] transpose(long[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(long[][])
public static float[][] transpose(float[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(float[][])
public static double[][] transpose(double[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(double[][])
public static char[][] transpose(char[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(char[][])
public static boolean[][] transpose(boolean[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(char[][])
public static Object[][] transpose(Object[][] matrix)
matrix
. The transpose is created by
flipping matrix
, where each row will become a column and each
column will become a row.matrix
- the matrix to transposematrix
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(Object[][])
public static byte[] add(byte[] matrix1, byte[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(byte[])
public static short[] add(short[] matrix1, short[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(short[])
public static int[] add(int[] matrix1, int[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(int[])
public static long[] add(long[] matrix1, long[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(long[])
public static float[] add(float[] matrix1, float[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(float[])
public static double[] add(double[] matrix1, double[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(double[])
public static char[] add(char[] matrix1, char[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(char[])
public static byte[][] add(byte[][] matrix1, byte[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(byte[][])
public static short[][] add(short[][] matrix1, short[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(short[][])
public static int[][] add(int[][] matrix1, int[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(int[][])
public static long[][] add(long[][] matrix1, long[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(long[][])
public static float[][] add(float[][] matrix1, float[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(float[][])
public static double[][] add(double[][] matrix1, double[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(double[][])
public static char[][] add(char[][] matrix1, char[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to addmatrix2
- the second matrix to addmatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if they are different sizesvalidateMatrix(char[][])
public static byte[] multiply(byte[] matrix1, byte[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(byte[])
,
validateMatrix(byte[][])
public static short[] multiply(short[] matrix1, short[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(short[])
,
validateMatrix(short[][])
public static int[] multiply(int[] matrix1, int[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(int[])
,
validateMatrix(int[][])
public static long[] multiply(long[] matrix1, long[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(long[])
,
validateMatrix(long[][])
public static float[] multiply(float[] matrix1, float[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(float[])
,
validateMatrix(float[][])
public static double[] multiply(double[] matrix1, double[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(double[])
,
validateMatrix(double[][])
public static char[] multiply(char[] matrix1, char[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(char[])
,
validateMatrix(char[][])
public static byte[][] multiply(byte[][] matrix1, byte[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(byte[])
,
validateMatrix(byte[][])
public static short[][] multiply(short[][] matrix1, short[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(short[])
,
validateMatrix(short[][])
public static int[][] multiply(int[][] matrix1, int[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(int[])
,
validateMatrix(int[][])
public static long[][] multiply(long[][] matrix1, long[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(long[])
,
validateMatrix(long[][])
public static float[][] multiply(float[][] matrix1, float[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(float[])
,
validateMatrix(float[][])
public static double[][] multiply(double[][] matrix1, double[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(double[])
,
validateMatrix(double[][])
public static char[][] multiply(char[][] matrix1, char[] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(char[])
,
validateMatrix(char[][])
public static byte[][] multiply(byte[][] matrix1, byte[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(byte[][])
public static short[][] multiply(short[][] matrix1, short[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(short[][])
public static int[][] multiply(int[][] matrix1, int[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(int[][])
public static long[][] multiply(long[][] matrix1, long[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(long[][])
public static float[][] multiply(float[][] matrix1, float[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(float[][])
public static double[][] multiply(double[][] matrix1, double[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(double[][])
public static char[][] multiply(char[][] matrix1, char[][] matrix2)
matrix1
and matrix2
.matrix1
- the first matrix to multiplymatrix2
- the second matrix to multiplymatrix1
and matrix2
IllegalArgumentException
- if matrix1
or matrix2
is not a valid matrix or if the number of columns of matrix1
don't equal the number of rows of matrix2
validateMatrix(char[][])
public static byte[] multiply(byte[] matrix, byte scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(byte[])
public static short[] multiply(short[] matrix, short scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(short[])
public static int[] multiply(int[] matrix, int scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(int[])
public static long[] multiply(long[] matrix, long scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(long[])
public static float[] multiply(float[] matrix, float scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(float[])
public static double[] multiply(double[] matrix, double scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(double[])
public static char[] multiply(char[] matrix, char scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(char[])
public static byte[][] multiply(byte[][] matrix, byte scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(byte[][])
public static short[][] multiply(short[][] matrix, short scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(short[][])
public static int[][] multiply(int[][] matrix, int scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(int[][])
public static long[][] multiply(long[][] matrix, long scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(long[][])
public static float[][] multiply(float[][] matrix, float scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(float[][])
public static double[][] multiply(double[][] matrix, double scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(double[][])
public static char[][] multiply(char[][] matrix, char scalar)
matrix
and scalar
.matrix
- the matrix to multiply the scalar byscalar
- the scalar to multiply matrix
bymatrix
and scalar
IllegalArgumentException
- if matrix
is not a valid matrixvalidateMatrix(char[][])
Copyright © 2022 Frostphyr. All rights reserved.