P
Pino
HI all,
I am learning c++ ( just 1 month) and would want an aid for a code.
I have a integer vector of length N.
ie
3
3
3
4
4
1
1
1
1
1
6
6
I have a matrix of N rows and K columns associated to the vector ie
the first element of the integer vect is 3 and this corresponds the
first lirow of the matrix.
I must sort the integer vect (without suppress the duplicate
numbers ie 1 1 1 1 1 ..), but I must maintain the relatioship with
the matrix. Number 1 is at the 6th row, ..sorting the vector 1 will
be the first element but now the 6 th rows of the matrix should
"move" to the 1st matrix row.
I use matrix TNT library, but I could use also a vett of vett (stl)
if you suggest as to write it.
an aid? thanks
maybe is something about multimap .. but i cant write 1 line of code
about that!
Please help me,
thx in adv
I am learning c++ ( just 1 month) and would want an aid for a code.
I have a integer vector of length N.
ie
3
3
3
4
4
1
1
1
1
1
6
6
I have a matrix of N rows and K columns associated to the vector ie
the first element of the integer vect is 3 and this corresponds the
first lirow of the matrix.
I must sort the integer vect (without suppress the duplicate
numbers ie 1 1 1 1 1 ..), but I must maintain the relatioship with
the matrix. Number 1 is at the 6th row, ..sorting the vector 1 will
be the first element but now the 6 th rows of the matrix should
"move" to the 1st matrix row.
I use matrix TNT library, but I could use also a vett of vett (stl)
if you suggest as to write it.
an aid? thanks
maybe is something about multimap .. but i cant write 1 line of code
about that!
Please help me,
thx in adv