typecasting Eigen::VectorXd to std::vector August 16, 2023 by Tarik vector<int> vec(mat.data(), mat.data() + mat.rows() * mat.cols());