I'm using
for (int i = 0; i<mdim_; i++)
{
for (int j = 0; j<ndim_; j++)
{
data_[j * ndim_ + i];
}
}
to change the matrix 1 3 2 4 stored in data, into row order. If I print data_[j * ndim_ + i]; to the screen then it will give me 1 2 3 4 however I can't figure out how to save this into a another vector, as this would involve introducing another loop which messes things up.
Can anyone please tell me if there is a way to do this?
Thanks in advance!