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

Add getter function for assignments #20

Closed
mforets opened this issue Feb 3, 2019 · 1 comment
Closed

Add getter function for assignments #20

mforets opened this issue Feb 3, 2019 · 1 comment

Comments

@mforets
Copy link
Collaborator

mforets commented Feb 3, 2019

Proposal: add "assignment" function as the getter function for reset maps:

assignment(hs::HybridSystem, t) = hs.resetmaps[symbol(hs, t)]

Note. If we add "ConstrainedMap" as proposed MathematicalSystems#60, then it is implemented as

assignment(hs::HybridSystem, t) = hs.resetmaps[symbol(hs, t)].map

Either way, i think it is useful to add this function because it is less implementation-dependent.

@schillic
Copy link
Collaborator

schillic commented Feb 3, 2019

The first one is confusing because it does not give you the assignment.
The second one is fine as long as you dispatch on the type of resetmaps such that you know that there is a map field.

@blegat blegat closed this as completed in #22 Feb 8, 2019
blegat added a commit that referenced this issue Feb 8, 2019
#20 - Add assignment as getter function of reset map
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