/ / - * - C - * -
//
/ / $ CopyRight $
//
/ / =========================================================================================================================================================================================== ===========================
#include
Using namespace std;
#include
#include
#include
/ *
Sample Output
Before Scaling Row 2:
3x3
[
[5, 5.5, 6],
[2.5, 3, 3.5],
[1, 1.5, 2]
]
After Scaling Row 2:
3x3
[
[5, 5.5, 6],
[5, 6, 7],
[1, 1.5, 2]
]
* /
Using namespace MTL;
Typedef Matrix
int
Main ()
{
Const matrix :: size_type n = 3;
Matrix a (n, n);
A (0, 0) = 5; A (0, 1) = 4; A (0, 2) = 3;
A (1,0) = 2.5; A (1, 1) = 3; A (1, 2) = 3.5;
A (2,0) = 1; A (2, 1) = 1.5; A (2, 2) = 2;
Cout << Endl;
COUT << "Before Scaling Row 2: << Endl;
Print_all_matrix (a);
Double scal = a (0, 0) / a (1, 0);
Copy (Scaled (A [1], Scal), A [1]);
Cout << "after scaling Row 2: << Endl;
Print_all_matrix (a);
Return 0;
}