Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void matrix_t::trasponer(void){
- matrix_item_t tmp;
- char aux[80];
- for (int i = 2; i <= m_; i++){
- for (int j = 1; j <= i-1; j++){
- if (traspuesta_ == false){
- tmp = M_[pos(i,j)];
- M_[pos(i,j)] = M_[pos(j,i)];
- M_[pos(j,i)] = tmp;
- }
- else
- (traspuesta_ == true);
- M_[pos(i,j)];
- }
- }
- cout << endl;
- for (int i = 1; i <= m_; i++){
- std::cout <<"|";
- for (int j = 1; j <= n_; j++){
- sprintf(aux," %5.11f ", M_[pos(i,j)]);
- cout << aux;
- }
- std::cout << "|";
- cout << endl;
- }
- }
Add Comment
Please, Sign In to add comment