Whenever I try to create templated functions for Eigen, I get errors like this one:
error C2039: 'Options' : is not a member of 'Eigen::MatrixBase'
This error came from the following function
template<typename Derived1, typename Derived2>
void eig(const MatrixBase<Derived1> & A, MatrixBase<Derived2> & eigenvaluesBuff) {
EigenSolver<MatrixBase<Derived1>> es(A, false);
eigenvaluesBuff = es.eigenvalues().real().col(0);
}
The matrix, A, is a MatrixXd that was returned by a different function. Any ideas what I'm doing wrong? If a function returns a MatrixXd, can you not pass that result directly into a templated function in Eigen?