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

Class Operators is a child of the Function class (should it be the opposite?) #86

Open
GauthierGidel opened this issue Mar 31, 2023 · 0 comments

Comments

@GauthierGidel
Copy link

Hello,

thanks for creating this awesome library! I have a comment on the [Operators] inheriting from the class function:

The way operators are created is slightly odd to me:
When you declare an operator in PEPit you declare it as a child of the class function, which is a bit weird since not every operator is the gradient of a function.

I guess it is a hack to make the library work easily since it has been originally developed on functions. However, some use cases are slightly disturbing:

  • In the constrained case, [some examples] consider the sum between the indicator and the operator function but the function induced by the operator does not always exist. What is meant there is that we are looking for 0 to be in the subdifferential of this sum.
  • Calling F.gradient is slightly odd to me for the same reason: F is already the operator to be called and F.gradient could be considered to be the Jacobian of the operator.

Maybe one way to fix that would be to reverse the legacy (function would be a child of the Class Operator). But I understand that it may require to rethink the whole architecture of the library which may be challenging.

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

No branches or pull requests

1 participant