1

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 Eigens 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?

jjcasmar
  • 1,387
  • 1
  • 18
  • 30
  • 1
    Not all customizations can be phrased as ADL calls… – Davis Herring Jul 10 '19 at 01:10
  • **Specializing** "stuff" in other libraries namespaces is not bad style per se. Especially, if the library encourages you to do that. I vote to close this as opinion-based. – chtz Jul 15 '19 at 17:21

0 Answers0