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

memoize in transform #31

Merged
merged 3 commits into from
Jan 8, 2024
Merged

memoize in transform #31

merged 3 commits into from
Jan 8, 2024

Conversation

ajfAfg
Copy link
Owner

@ajfAfg ajfAfg commented Jan 8, 2024

Motivation

Optimal supervision tree problem has optimal substructure and overlapping subproblems, so the speed can be increased by memoization.

Approach

The implementation was done using a mutable map as a memo. Although it is possible to use an immutable map as a memo, I avoided obfuscation caused by folding the memo.

@ajfAfg ajfAfg merged commit b965e93 into main Jan 8, 2024
3 checks passed
@ajfAfg ajfAfg deleted the memoize-in-transform_ branch January 8, 2024 07:00
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