I had doubts about the route of the upper triangular matrix, for me the upper triangular is that of the photo:
for (int i=1; i<=m_-1; i++){
for (int j=i+1; j<= n_;j++){
Could you start at i = 1? Why the stop condition for the first for is i<=m_-1
? so as not to extend the questions, I do not understand the second for int j=i+1; j<= n_
class that is used:
template <class T> class matrix_t
{
private:
int m_;
int n_;
T* v_;
public:
matrix_t(void);
matrix_t(int m, int n);
~matrix_t(void);
void resize(int m, int n);
T& get_set (int i, int j);
T get (int i, int j) const;
int get_m(void) const;
int get_n(void) const;
private:
int pos(int i, int j) const;
};
Thanks