-
Notifications
You must be signed in to change notification settings - Fork 5
Truncation composition #15
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
Conversation
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
lkdvos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Something I was wondering: do we want to extend this to an arbitrary number of truncation algorithms? Ie, something like
struct TruncationComposition{T<:Tuple{Vararg{TruncationStrategy}}}
components::T
end
TruncationComposition(component::TruncationStrategy, components::TruncationStrategy) = TruncationComposition((component, components...))It's not strictly necessary, since you could do (trunc1 & trunc2) & trunc3 as well, and I don't think the performance would matter all that much, just a design question I guess.
As a sidenote, it seems like the JuliaFormatter v2 changes are still not entirely without change. I'm fine with switching to the new version, but let's just make that a separate commit and rebase this on that?
Mostly I did it the current way since as you say it is just as general but the implementation is a bit simpler. I can switch over to flattening, I guess the truncation strategies should commute with each other so order of operations doesn't matter and flattening is fine.
Sure, will do. |
* Format * Add vim temp files to gitignore
* Use SafeTestsets in tests * Use SafeTestsets in tests * Cleanup * Fix missing import
|
Ok clearly I don't know how to use git, I don't know why the diff is showing all of the changes from previous PRs. But, I updated |
|
Maybe I'll just start a new PR from scratch... |
|
Superseded by #18. |
This adds support for composing truncation strategies, which is then used to enable mixing truncating with
rtol,atol, andmaxrank.