-
Notifications
You must be signed in to change notification settings - Fork 0
Matrix
William Henrique edited this page May 8, 2020
·
20 revisions
A matrix is a template class and can be integrated with a Fractions Number Class.
You need to include Matrix header or LIAL header and call the class by LIAL::Matrix
Your compile might shows for you some methods descriptions. But you can see a explain about all.
Then, You might create easily a class instance.
Like these, Matrix A; Matrix B; Mat C;
- OBS: Mat is a alias for a Matrix
Sum Matrix's elements with a common Matrix.
Matrix<int> A = {{1,0},{0,1}}, B = {{0,0},{0,1}}, C = {3,2}, R;
R = A + B; // Ok
R = A + C; // Generate a Erro! 'Cuz, A has 2x2 dimension and C has 1x2
R = A * 2; // A now is {{2,0},{0,2}}
R = R / 2; // R is equal A
R = R - A; // R is a Null Matrix
R = A * B; // Product between Matrices
Working in progress...