Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OOP Refactoring #107

Open
akielaries opened this issue Feb 9, 2024 · 1 comment
Open

OOP Refactoring #107

akielaries opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request v1.x Goals for v1.0.0 stable release

Comments

@akielaries
Copy link
Owner

Most of the codebase is OOP in the sense that there are often many methods shoved into 1 class and 1 class per file which violates some common paradigms.

  • Classes should follow the single responsibility rule each class should do only one thing, but should do it well
  • Namespaces are in place put they could be used more effectively. an example:
    Under the linear algebra module we might have some methods related to Signal Processing. This doesn't mean that our methods need to be shoved into 1 SigProc class but instead be separated into different classes for different techniques:

gpmp::linalg::sigproc::lpf(SIGNAL, FREQ, CUTOFF) for a standalone function OR
gpmp::linalg::sigproc::LPF() for a class

there might not be enough to expand into a complex class with a few member variables and methods

@akielaries akielaries added enhancement New feature or request v1.x Goals for v1.0.0 stable release labels Feb 9, 2024
@akielaries akielaries self-assigned this Feb 9, 2024
@akielaries
Copy link
Owner Author

Signal processing methods have been removed but this point still stands for some class. For example the gpmp::linalg::Mtx class doesn't feature any OOP methods. I can't think of any benefits in doing so since these functions purpose is pretty much a 1 off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.x Goals for v1.0.0 stable release
Projects
None yet
Development

No branches or pull requests

1 participant