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?