typedef Eigen::Matrix<double, Eigen::Dynamic, 1> EigenVectorX;
std::vector<double> v;
v.push_back(22);
v.push_back(55);
v.push_back(77);
EigenVectorX ev;
How I can initialize ev with v ?
You can use Eigen::Map
for this
EigenVectorX ev = Eigen::Map<EigenVectorX>(v.data(), v.size());