1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
# include "ModCSRmatrix.H"
using namespace std;
int main(){
MCSRmatrix<int> m1 = {{4,0,1,2,0},{0,1,0,0,0},{0,0,5,7,0},{6,3,0,8,0},{0,0,0,0,9}};
cout << "---------------------------------------------------------------------------------------" << endl;
cout << m1 ;
//MCSRmatrix<int> m2 = {{2 ,0 ,1 ,0},{0,7 ,2,0},{0,0,70,0 },{0,0,2,16}};
//cout << "---------------------------------------------------------------------------------------" << endl;
//MCSRmatrix<int> m3 ={{4,0,0,2},{0,1,0,0},{0,0,5,7},{6,3,0,8}};
cout << "---------------------------------------------------------------------------------------" << endl;
m1.insertAt(3,4,16);
//cout << m1(1,3);
cout << "---------------------------------------------------------------------------------------" << endl;
cout << m1 ;
cout << "---------------------------------------------------------------------------------------" << endl;
MCSRmatrix<int> m2 = {{4,0,1,2},{0,1,0,2},{0,0,5,7},{6,3,0,8}};
cout << "---------------------------------------------------------------------------------------" << endl;
//cout << m2 ;
cout << "---------------------------------------------------------------------------------------" << endl;
m2.insertAt(2,3,44);
cout << m2 ;
return 0;
}
|