Skip to content

Performance and stability

Compare
Choose a tag to compare
@sglyon sglyon released this 29 Apr 05:03
· 59 commits to master since this release

New features

  • Introduction of a custom sparse matrix type SplineSparse. Allows for compact representation of a Spline BasisMatrix as well as efficient computation of row_kron and funeval
  • 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, or Tensor when constructing a BasisMatrix instead of only being able to pass instances (e.g. Expanded now works where before you needed Expanded())
  • New method for ::Basis \ ::AbstractArray to do fitting.
  • LinParams and SplineParams now have a type parameter for the type of abstract vector representing breakpoints. Helps with memory efficiency inside that type, in the nodes function, and leaves room for performance enhancements in routines like lookup and evalbase (although these improvements haven't been implemented yet).
  • a BasisMatrix can now be constructed with element type that is not Float64. The element type of the underlying arrays will be determined from the fields of the XParams instance (breaks for LinParams and SplineParams, and a/b for ChebParams) and the points x 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, or Expanded) -- one will be chosen for you based on the type of evaluation x 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 an Interpoland object itp you evaluate at a point x by calling itp(x) instead of evaluate(itp, x)

Improvements

  • >100x performance improvement in calling funeval with a basis containing only SplineParams or LinParams
  • 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.