I have a matrix that is given as:
std::vector<std::vector<std::complex<double>>> A;
And I want to map this to the Eigen linear algebra library as follows:
Eigen::Map<Eigen::MatrixXcd, Eigen::RowMajor> mat(A.data(),51,51);
But the code crashes with
error: no matching function for call to 'Eigen::Map<Eigen::Matrix<std::complex<double>, -1, -1>, 1>::
Do I need to convert a vector of a vector so that Eigen can use it?
source share