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

refactoring of element-wise updates #81

Merged
merged 2 commits into from
Dec 21, 2021
Merged

refactoring of element-wise updates #81

merged 2 commits into from
Dec 21, 2021

Conversation

hhaensel
Copy link
Member

@hhaensel hhaensel commented Dec 21, 2021

The current solution supplies the updated value and the vector of jskeys to the notify() routine.
This PR takes a more general approach and supplies a vector of pairs containing all objects (arrays or dicts) with their respective index. This makes it possible for users to write their own update functions that take into account, e.g. the index of the changed element.
Other changes:

  • try-catch has been replaced by a proper methods() call to avoid decrease of performance.
  • OffsetArrays are now handled correctly

This code could be transferred to Observables with only minor changes. I've commented an open issue to ask if they are interested.

@hhaensel hhaensel merged commit 9f7a11c into master Dec 21, 2021
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.

1 participant