I would like to have two different Eigen containers point to the same data where one reference is a different view/subset of the data.
So something like this:
Eigen::VectorXd v1(3);
v1 << 1,2,3;
Eigen::VectorXd v1(2);
v2.data = &v1(0); //pseudo code
v1(1) = 5;
cout << v2(1) << endl;
Where the value of v2(1) should now be 5.
Thanks in advance.