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

Default value for AbstractGauge in MpsContractor #30

Closed
annamariadziubyna opened this issue Aug 4, 2024 · 3 comments
Closed

Default value for AbstractGauge in MpsContractor #30

annamariadziubyna opened this issue Aug 4, 2024 · 3 comments
Assignees

Comments

@annamariadziubyna
Copy link
Collaborator

We are using the MpsContractor structure, which is currently defined as follows: MpsContractor{T<:AbstractStrategy,R<:AbstractGauge,S<:Real}
I would like to know if it's possible to modify this structure so that when R is not provided, it defaults to a predefined value, such as NoUpdate. Specifically, the desired behavior is for MpsContractor to behave like MpsContractor{T<:AbstractStrategy,S<:Real} where R is automatically set to NoUpdate.

@lpawela
Copy link
Member

lpawela commented Sep 4, 2024

You can define a new constructor, something like MpsContractor(T, S, args...) where {T, S} = MpsContractor{T, NoUpdate, S}(args...).

@annamariadziubyna
Copy link
Collaborator Author

Thank you for your suggestion! I’ve tried implementing the proposed solution, but I’m having trouble correctly integrating this change into the code. I would greatly appreciate it if you could make this modification directly in the code.

@lpawela
Copy link
Member

lpawela commented Sep 18, 2024

Have a look at #32

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

2 participants