Class Matrix
java.lang.Object
me.damoebe.architectures.transformer.embedding.Matrix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double[][]add(double[][] matrix1, double[][] matrix2) Adds two matrices of same dimensionstatic double[][]multiply(double[][] matrix1, double[][] matrix2) Multiplies two matrices with each otherstatic double[][]transpose(double[][] matrix) Transposes a matrix
-
Constructor Details
-
Matrix
public Matrix()
-
-
Method Details
-
multiply
public static double[][] multiply(double[][] matrix1, double[][] matrix2) Multiplies two matrices with each other- Parameters:
matrix1- The first matrixmatrix2- The second matrix- Returns:
- The result matrix of the multiplication
-
add
public static double[][] add(double[][] matrix1, double[][] matrix2) Adds two matrices of same dimension- Parameters:
matrix1- The first matrixmatrix2- The second matrix- Returns:
- The sum matrix
-
transpose
public static double[][] transpose(double[][] matrix) Transposes a matrix- Parameters:
matrix- The matrix that should be transposed- Returns:
- The transposed matrix (this.array2d)
-