I have a class with functions that take vector<double> as input and also return vector<double>.
I want to overload this function to take Eigen::vectorXd as input and output. I have many functions that need to be overloaded. Is there a way to create a typecast which would typecast Eigen::vecrtorXd to vector<double> for all these functions?
Depending on what you're looking for, you might be able to achieve this with a basic templated function, i.e.
This works fine if you want to do something generic like calculate a norm where the dimension of the vector doesn't matter.