simplified BernsteinBasisOnSimplex - #1330
Merged
Merged
Conversation
I removed the possibility of not storing a change of coordinate matrix
(cartesian to barycentric) in BernsteinBasisOnSimplex.
This was an optimization for computations on reference simplices, but
I realized it is complitely negligible and made the types of
BernsteinBasisOnSimplex and BarycentricP(m)ΛBasis unecessarily
complicated.
Now, the x_to_λ matrix is always stored, as a Matrix{Float64} instead of
SMatrix, and SizedArray is used to cast the Matrix into a StaticArray to
avoid allocations (and enable speed) in `_cart_to_bary`.
The Float64 hard-code leads to promotion to 64bits arithmetic for all
evaluation of BernsteinBasisOnSimplex and P(m)Λ Bases. But the type
parameters of both struct are way simpler now, the former
B=BernsteinBasisOnSimplex{D,V,K} parameter is completely removed from P(m)Λ bases
now.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1330 +/- ##
==========================================
- Coverage 88.85% 88.83% -0.02%
==========================================
Files 228 228
Lines 30197 30132 -65
==========================================
- Hits 26832 26769 -63
+ Misses 3365 3363 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
@JordiManyer this is ready. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I removed the possibility of not storing a change of coordinate matrix (cartesian to barycentric) in BernsteinBasisOnSimplex.
This was an optimization for computations on reference simplices, but I realized it is complitely negligible and made the types of BernsteinBasisOnSimplex and BarycentricP(m)ΛBasis unecessarily complicated.
Now, the x_to_λ matrix is always stored, as a Matrix{Float64} instead of SMatrix, and SizedArray is used to cast the Matrix into a StaticArray to avoid allocations (and enable speed) in
_cart_to_bary.The Float64 hard-code leads to promotion to 64bits arithmetic for all evaluation of BernsteinBasisOnSimplex and P(m)Λ Bases. But the type parameters of both struct are way simpler now, the former B=BernsteinBasisOnSimplex{D,V,K} parameter is completely removed from P(m)Λ bases now.