MULTI-DIMENSIONED ARRAYS AND MATRIX MULTIPLICATION
The use of multi-dimensioned arrays and of this library's Matrix class are illustrated by three programs that perform the same matrix multiplication C = A.B
The example chosen is the multiplication of a 2 x 3 matrix by a 3 x 2 matrix to give a 2 x 2 matrix, i.e.
for the following values
In the first program, two of the arrays are declared and initialised using the {} convention and one is declared using the [int variable][int variable] convention. The matrix multiplication is coded within the program. Source code:MatrixExample1.java
In the second program, all arrays are declared using the [int variable][int variable] convention and the elements are initialised individually. The matrix multiplication is coded within the program. Source code:MatrixExample2.java
In the third program, two of the arrays are declared and initialised using the {} convention and one is declared using the [int variable][int variable] convention. The matrix multiplication is performed using this library's Matrix class. Source code:MatrixExample3.java