Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "matrix.h"
- using namespace std;
- int main(int argc, char argv[])
- {
- //test
- cout << "//test metody transpone_matrix" << endl;
- cout << "//test" << endl;
- vector< vector<double> > vector1{ {2,5},{6,8},{8,10},{7,9} };
- matrix new_matrix(vector1);
- cout << "******"<<endl;
- new_matrix.print_matrix();
- cout << "******"<<endl<<endl;
- //test metody transpone_matrix
- cout << "******" << endl;
- new_matrix.transpone_matrix();
- new_matrix.print_matrix();
- cout << "******" << endl << endl;
- //test metody liczenia wyznaczika
- cout << "testt metody liczenia wyznacnzika" << endl;
- cout << "******" << endl;
- vector< vector<double> > vector2{ {6,8},{3,2} };
- matrix new_matrix2(vector2);
- new_matrix2.print_matrix();
- cout << "******" << endl;
- cout << "DET : " << new_matrix2.det_matrix()<<endl;
- cout << "******" << endl << endl;
- //test metody tworzenia minorw z vectora
- cout << "//test metody tworzenia minorw" << endl;
- vector< vector<double> > vector3{ {1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,16} };
- matrix new_matrix3(vector3);
- new_matrix3.print_matrix();
- cout << endl<<endl;
- matrix new_matrix3_minor(vector3, 0,0);
- new_matrix3_minor.print_matrix();
- //test metody liczenia wyznacznika dla macierzy >2x2
- cout <<endl<<endl<< "//test metody liczenia wyznacznika dla macierzy >2x2" << endl;
- vector< vector<double> > vector4{ {1,3,0,-1},{0,2,1,3},{3,1,2,1},{-1,2,0,3} };
- matrix new_matrix4(vector4);
- new_matrix4.print_matrix();
- cout << "(poprawny to 14)DET: " << new_matrix4.det_matrix();
- cout << endl << endl;
- vector< vector<double> > vector5{ {1,3,4,},{0,3,0},{2,-2,-3} };
- matrix new_matrix5(vector5);
- new_matrix5.print_matrix();
- cout << "(poprawny to -33)DET: " << new_matrix5.det_matrix();
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement