Error mixing types with Eigen matrices
So the way to fix this which took me an annoyingly long time to find is to use the derived cast method described here. Now the definition is this: internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typenameinternal::traits<Derived>::Scalar, NewType>, const Derived> >::type cast() const Which Ill admit, phased me a little. But turns out it is pretty easy (and the only explanation … Read more