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

Definition of set_data method in State class #79

Open
domire8 opened this issue Feb 10, 2023 · 0 comments
Open

Definition of set_data method in State class #79

domire8 opened this issue Feb 10, 2023 · 0 comments

Comments

@domire8
Copy link
Member

domire8 commented Feb 10, 2023

The set_data method is implemented for the state_representation::State with three different argument types (vector, matrix, std::vector). To me it's somehow inconsistent to define the set_data in the base class but not the data method. I understand why it's not possible to do that - because you cant have different return types for the same function name.

I just feel it's weird to define it in a class where we said, that doesn't have any data field. If it would be a virtual method where we can at least reuse some of the code that's implemented in the base class, that would be okay. But in this case, all those methods just throw a NotImplemented exception so I'm not really sure what the benefit of that is.

I don't have strong feelings about this but maybe you feel a bit like me or you can give me a few reasons why it's good to have it in the base class? @eeberhard @buschbapti

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