Registered Member
|
I have a double pointer double* a which holds a N by N matrix row-wise. I want to share this to a MatrixXd variable but without copying the contents of double* a. How should I go about doing this? From here (http://stackoverflow.com/questions/1200 ... gen-matrix), I see that the other way around is possible using the the method data().
Thanks |
Moderator
|
You have to create a Map object like this:
You can use mat just like a MatrixXd except that its type is not a MatrixXd and not even a Matrix<double,Dynamic,Dynamic,RowMajor>. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]