Registered Member
|
I am not quite sure if it's a bug or if I'm doing something wrong, but the following code:
It works fine with rectangular matrices and with non-map matrices. Am I missing something obvious here? |
Moderator
|
This is because you cannot resize a Map. Perhaps Map::resize could be allowed if rows*cols does not change...
|
Registered Member
|
Thanks for your answer!
In practice, what should I do? Can I for instance define a map m2 with transposed dimensions and transpose it there with something like:
This apparently works with my simple test case, will it always be the case? Ultimately it would be nice if transposeInPlace would work on rectangular maps... but as I don't know why one can't resize a map (and wasn't even aware of it), so I'll leave it up to you to decide. Should I open a feature request? |
Moderator
|
Yes please, add a feature request in the bugtracker. Map does not hold its memory, so there are strong restrictions on what resize could do. Your use case seems ok to me, but let's see what the others think about it.
|
Registered Member
|
|
Registered users: Baidu [Spider], Bing [Bot], Google [Bot]