Professional Documents
Culture Documents
Laboratory - 10: Problem 1
Laboratory - 10: Problem 1
Problem 1
class Matrix
int dim;
double[][] data;
Matrix(int d)
dim = d;
rowDisplace = colDisplace = 0;
data = matrix;
rowDisplace = x;
colDisplace = y;
dim = d;
}
void set(int row, int col, double value)
int getDim()
return dim;
Matrix[][] split()
return result;
Matrix a, b, c;
this.a = a;
this.b = b;
this.c = c;
try
int n = a.getDim();
if (n == 1)
Else
future[i][j].get();
}
}catch(Exception ex)
ex.printStackTrace();
int n = a.getDim();
future.get();
return c;
Final Output:
Matrix a, b, c;
this.a = a;
this.b = b;
this.c = c;
try
int n = a.getDim();
if (n == 1)
else
future[i][j].get();
catch(Exception ex)
ex.promtStackTrace();
Output: