I am trying to implement a matrix-free function to use with conjugate gradient in Eigen
. My matrix function is basically an application of several matrices consecutively to a vector so I prefer to implement my own matrix object and do this operations on my own so.
There is a nice tutorial on Eigen
s webpage about how to achieve this:
https://eigen.tuxfamily.org/dox/group__MatrixfreeSolverExample.html
This approach requires opening up Eigen::internal
namespace to add some specializations for my own matrix object. AFAIK, writing stuff in others library namespaces is a bad practice and it should be implemented using customization points.
Is it possible to implement this using customization points? Is Eigen
for this matter wrong?