Their are many links to go the other way round but I am unable to find to get a std::vector from a Eigen::Matrix or Eigen::VectorXd in my specific case.
You cannot typecast, but you can easily copy the data:
VectorXd v1; v1 = ...; vector<double> v2; v2.resize(v1.size()); VectorXd::Map(&v2[0], v1.size()) = v1;
1.4m articles
1.4m replys
5 comments
57.0k users