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

Remove Solver intermediate private methods not to be overriden #321

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

nhuet
Copy link
Contributor

@nhuet nhuet commented Apr 2, 2024

The convention is the library is that the user has to override/implement
methods whose names are starting with "_".

The methods wihtout the leading "_" are calling the former, generally by
adding autocast boilerplate.

In Solver class, some methods are duplicated without this purpose in
mind, we simplify it here:

  • _get_domain_requirements() -> get_domain_requirements()
  • _check_domain() -> check_domain(), which continue calling
    _check_domain_additional() to be overriden
  • _solve() -> solve(), and _solve_domain() -> _solve(), so that solve() autocast
    domain_factory and then call _solve() to be implemented

nhuet added 2 commits April 8, 2024 10:28
The convention is the library is that the user has to override/implement
methods whose names are starting with "_".

The methods wihtout the leading "_" are calling the former, generally by
adding autocast boilerplate.

In Solver class, some methods are duplicated without this purpose in
mind, we simplify it here:

- _get_domain_requirements() -> get_domain_requirements()
- _check_domain -> check_domain(), which continue calling
  _check_domain_additional() to be overriden
- _solve() -> solve(), and _solve_domain() -> _solve(), so that solve() autocast
  domain_factory and then call _solve() to be implemented
@nhuet nhuet force-pushed the solver-intermediate-methods branch from 26602ef to f12f092 Compare April 8, 2024 08:28
Copy link
Collaborator

@fteicht fteicht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @nhuet !

@fteicht fteicht merged commit cb66b21 into airbus:master Apr 11, 2024
41 of 42 checks passed
@nhuet nhuet deleted the solver-intermediate-methods branch April 15, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants