-
Notifications
You must be signed in to change notification settings - Fork 74
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
decouple basis from storage type #517
Merged
Merged
Conversation
This file contains 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
Closed
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.
(This was the second part of #513.)
This should be non-breaking save for the removal of a few deprecations and allowing trailing zeros in
ImmutablePolynomial
for inference reasons, but as there was significant code-churn and there is a chance it does break some code out there, the version number will be rolled over to v4.0.0
.Prior, the polynomial type implied both a basis and a backend storage type. E.g.,
ImmutablePolynomial
implied the standard basis and an ntuple for storage.This PR breaks this up so the container types are re-usable and the basis is explicit -- the equivalent being
ImmutableDensePolynomial{StandardBasis}
. This is aliased toImmutablePolynomial
, similarly for the other standard basis polynomial types, so as to keep continuity.The main types are
MutableDenseUnivariatePolynomial
backed by a vector (used byPolynomial
)MutableDensePolynomial
backed by a vector. This type has an offset, so it will allowLaurentPolynomial
to beMutableDenseLaurentPolynomial{StandardBasis}
.MutableDenseViewPolynomial
non copying when possible (used byPnPolynomial
)ImmutableDensePolynomial
backed by an ntuple. For better type stability, trailing zeros may be present, unlike for the mutable dense polynomial type (used byImmutablePolynomial
)MutableSparsePolynomial
backed by a dictionary (used bySparsePolynomial
)Some simple benchmarking shows some performance issues have been improved.
TODO:
[X] bump version number to
v4.0.0
(last, as we want to continue to test against downstream pacakges)[X] currently
common.jl
andabstract-polynomial.jl
do the same thing and should be consolidated. Mostly done, but not all.[x] the types
Polynomial
,ImmutablePolynomial
,SparsePolynomial
,LaurentPolynomial
,PnPolynomial
can be removed[x] The
Chebyshev
polynomial example needs to be rewritten to useMutableDensePolynomial
as a backend[x] use this to close #510 and #512. (#511 to be addressed later
[x] check that this doesn't break downstream packages!!
[x] replace Polynomial type using new framework
[x] makes FactoredPolynomial <: AbstractPolynomial
[x] drop polynomials/standardbasis.jl (merging into standard-basis/standardbasis.jl)
[x] clean up documentation