I have a matrix, which is given as:
std::vector<std::vector<std::complex<double>>> A;
And I want to map that to the Eigen linear algebra library like this:
Eigen::Map<Eigen::MatrixXcd, Eigen::RowMajor> mat(A.data(),51,51);
But the code fails with
error: no matching function for call to
‘Eigen::Map<Eigen::Matrix<std::complex<double>, -1, -1>, 1>::
Is there anyway to convert a vector of a vector so that Eigen can use it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…