diff --git a/librerie/exercise5/matrix/csr/matrixcsr.cpp b/librerie/exercise5/matrix/csr/matrixcsr.cpp index 2848d3e..ea8cca3 100755 --- a/librerie/exercise5/matrix/csr/matrixcsr.cpp +++ b/librerie/exercise5/matrix/csr/matrixcsr.cpp @@ -140,28 +140,32 @@ void MatrixCSR::ColumnResize(const ulong& new_column_size){ Clear(); } else if(new_column_size < columns){ - Node** last; - Node** last_not_deleted; + Node** prev; Node* toDelete; + Node** toModify; for(ulong i=0 ; ivalue).second < new_column_size){ - last_not_deleted = &( (*(*ptr)).next ); + prev = &( (*(*ptr)).next ); + ptr = &( (*(*ptr)).next); }else{ + std::cout<<"\n\nSto cancellando "<<((*ptr)->value).first<<"\n\n"; toDelete = *ptr; + toModify = &( (*(*ptr)).next ); *ptr = (*(*ptr)).next; delete toDelete; --size; + //debug(); + for(ulong j=i+1 ; j::FoldPostOrder(const typename FoldableContainer::Fold template void MatrixCSR::debug(){ std::cout<value).first<<"|"<< (tmp->value).second; - std::cout<next); - - std::cout<next; - } - - std::cout << "R VECTOR:" << '\n'; - for(ulong i=0; ivalue).first<<"|"<< (tmp->value).second; + // std::cout<next); + // + // std::cout<next; + // } + // + // std::cout << "R VECTOR:" << '\n'; + // for(ulong i=0; i