Registered Member
|
Hello,
Over at http://eigen.tuxfamily.org/bz/show_bug.cgi?id=707 I can see comments that it is possible to use in place decompoistion on blocks and even map matrices. In my case I actually have a map whose block is what I need to use. I can get it around it if need be by was wondering if this indeed is possible and if yes what I am missing I am not sure what the definition would be Eigen::LLT<Eigen::Ref<Eigen::MatrixXd>> llt(n.block(0, 0, nrows, ncols)); or even Eigen::LLT<Eigen::Ref<decltype(n.block(0, 0, nrows, ncols))>> llt Whatever I tried (in msvc 2015 update 3) I get error C2660: 'Eigen::Ref<Eigen::MatrixXd,0,Eigen::OuterStride<-1>>::Ref': function does not take 2 arguments Any ideas ? |
Moderator
|
The proper type is Eigen::LLT<Eigen::Ref<Eigen::MatrixXd>>, but you must call the non const constructor. In your case, n.block(0, 0, nrows, ncols) returns a temporary which cannot be bounds to a non-const reference, which is why the wrong constructor is called. The fix is thus: (not tested)
|
Registered Member
|
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]