std::Vector -> eigen::vectorXd
https://stackoverflow.com/questions/52261389/how-to-convert-an-stdvector-to-a-matrix-in-eigen
std::vector vec = { 1.0, 2.0, 3.0 };
Eigen::MatrixXf test = Eigen::Map<Eigen::Matrix<float, 3, 1> >(vec.data());
std::cout << test << std::endl;
https://stackoverflow.com/questions/17036818/initialise-eigenvector-with-stdvector
std::vector aa = { 1, 2, 3, 4 };
Eigen::VectorXd bs = Eigen::Map<Eigen::VectorXd, Eigen::Unaligned>(aa.data(), aa.size());
std::Vector -> eigen::vectorXd转换为
最新推荐文章于 2024-07-03 15:58:12 发布