Releases: QuantEcon/BasisMatrices.jl
Releases · QuantEcon/BasisMatrices.jl
v0.7.0
BasisMatrices v0.7.0
Closed issues:
Merged pull requests:
- Install TagBot as a GitHub Action (#54) (@JuliaTagBot)
- Add Project.toml, switch to structs (immutable), update demos for Julia 1+ (#57) (@magerton)
- CompatHelper: add new compat entry for "QuantEcon" at version "0.16" (#58) (@github-actions[bot])
- CompatHelper: add new compat entry for "Combinatorics" at version "1.0" (#59) (@github-actions[bot])
Julia 1.0 compatible version
v0.6.0 ENH: drop compat
Drop Julia 0.5 and maintenance
Bug fixes
Enhancements
- Added routines for type stable calls to
complete_polynomial
(see #33) - Allow
complete_polynomial
to be called with anyAbstractArray
(47a15a1) - Make sure
node(::Basis)
always returns (Array, NTuple{N,<:Array})` (ref #38 and 75f93a5) - Run femtocleaner to clean up pre-0.6 deprecations (#39)
- Better eltype prediction, allowing for use in ForwardDiff.jl (#40 and #41)
nodes
always returns Vector instead of a Range-like thing (9fd30c6)- Use less memory when evaluating integrals or derivatives of ChebParams (a03a788)
Documentation
Replace dependency Iterators with IterTools
Fixes
- Replace the now-deprecated Iterators with IterTools -- thanks @benhemingway (ref: #34 )
More complete API for complete polynomials
Added methods for
complete_polynomial!?{N,D}((out)?, ::Union{Type{Degree{N}},Degree{N}}, ::Union{Type{Derivative{D}},Derivative{D}})
perf
bugfix
Performance and stability
New features
- Introduction of a custom sparse matrix type
SplineSparse
. Allows for compact representation of a Spline BasisMatrix as well as efficient computation ofrow_kron
andfuneval
- Smolyak interpolation (See b29fb7b. Also 65ee30b, 469cf63, a5ff91d)
- Updates to complete polynomials (thanks @cc7768 -- see #26)
- 1st order derivatives
- Specialized methods for evaluation at one point (a vector)
- Julia 0.6 compatibility
- New demo and example (thanks @vgregory757 ) (bd92d9f, adf9e7e)
- Consistent API for all subtypes of
BasisParams
- Can now pass the types
Expanded
,Direct
, orTensor
when constructing aBasisMatrix
instead of only being able to pass instances (e.g.Expanded
now works where before you neededExpanded()
) - New method for
::Basis \ ::AbstractArray
to do fitting. LinParams
andSplineParams
now have a type parameter for the type of abstract vector representing breakpoints. Helps with memory efficiency inside that type, in thenodes
function, and leaves room for performance enhancements in routines likelookup
andevalbase
(although these improvements haven't been implemented yet).- a
BasisMatrix
can now be constructed with element type that is notFloat64
. The element type of the underlying arrays will be determined from the fields of theXParams
instance (breaks
forLinParams
andSplineParams
, anda
/b
forChebParams
) and the pointsx
at which the basis matrix is to be constructed - You can now construct a BasisMatrix without specifying the underlying storage type (e.g.
Tensor
,Direct
, orExpanded
) -- one will be chosen for you based on the type of evaluationx
points.
Breaking changes
- Rename
BasisStructure
-->BasisMatrix
- Only field of Basis is a tuple of BasisParams objects. Constructors and methods are backwards compatible, so it shouldn't impact standard usage
evaluate(::Interpoland, ...)
has been renamed to call. So if you had anInterpoland
objectitp
you evaluate at a point x by callingitp(x)
instead ofevaluate(itp, x)
Improvements
>100x
performance improvement in callingfuneval
with a basis containing onlySplineParams
orLinParams
- Chebyshev evalbase now faster.
- Type stability throughout the library -- especially in the
funeval
family of methods - No longer squeeze trailing dimensions of returns from
funeval
. Instead we have many more specialized methods that do the trimming in a type stable way. Things just "just work" how you'd expect them to work. - The interpolated type now uses the
Tensor
form internally for (re-)fitting - Spline evaluation now more efficient as row and column indices can be reused for all requested derivative orders
- Add
@inferred
to many tests to ensure we don't get type instability regressions.