I'm a beginner when it comes to Eigen. I have searched but not found an answer to this question.
I have a an array of double pointers, i.e. double** x
which I have no control over. It comes in this format and there is nothing I can do about it. I want to construct an Eigen::VectorXd vec
that use the same memory as pointed to by x.
In other words, I would like the following to hold true:
vec(i) == *(x[i]) for each i
and
&vec(i) == x[i] for each i
I hope this makes sense. How can I achieve this?
Thanks in advance!