So I am creating a numerical solver that I want to use for many problems/algorithms. The way that it's written, there is a generic class called Algorithm_Scheme (and associated files Algorithm_Scheme.h and Algorithm_Scheme.cpp) that is included as a member of the Solver class. To create an executable for a different problem/ algorithm, I replace the text Algorithm_Scheme with the name of specific schemes that I've created. E.g. Logistic_Regression_Scheme, Linear_Regression_Scheme, etc. This way I can create different executable for each problem/ algorithm. Is there a better way of doing this? Should I define a macro? So for instance:#define Algorithm_Scheme Logistic_Regression_Schemein order to create the different executables? An issue is that I will have to change the #include's to only include the Algorithm_Scheme header that I want... What are your thoughts? I'm just doing the first thing that comes to my head. I don't know what best practices would be.
Templated versions of executable?
design;c++;object oriented design