function pointer with Eigen
问题 I am pretty competent with Python, but I'm pretty new to C++ and things like pointers. I try to write some codes for solving ODE with the Eigen package for linear algebra (I will need to deal with lots of matrices later, so I plan to start with it). I have the following code for RK4 and they work: #include "../eigen-eigen-b3f3d4950030/Eigen/Dense" using namespace Eigen; VectorXd Func(const VectorXd& a) { // equations for solving simple harmonic oscillator Vector2d ans; ans(0) = a(1); // dy/dt