apple / swift-numerics

Advanced mathematical types and functions for Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Numerical Analysis Module

kristorres opened this issue · comments

Since Swift Numerics will be heavily based on numerical computing and math, I want to make this proposal for an add-on module on numerical analysis. Example use cases include (but are not limited to) the following:

  • Finding the roots (or zeroes) of continuous functions
  • Interpolating polynomials
  • Approximating the definite integrals of continuous functions
  • Solving linear systems
  • Solving initial value problems

NOTE: Complex numbers are required for implementing Muller’s method.

P.S.: As someone with a background in applied mathematics, thank you @stephentyrone for introducing this wonderful Swift package!

This is probably three or four separate modules, some of which are already on the radar =)

If that’s the case, then I’m definitely looking forward to those implemented modules. Thank you.

Can I go ahead and close this issue, or leave it open?

I don't think we have open issues for most of them yet. My reading is that these break downs as follows:

  • root finding algorithms (unsure if this is a whole module or something that goes in a function utilities module). Depends partially on how many we actually want to implement.
  • interpolating polynomials; this would be a piece of a more general chebfun-style module, I expect. This would also partially cover integration.
  • definite integrals and IVPs; two types of ODE solvers (the first has a bunch special structure that we can leverage, obviously, but I would want to share some of the infrastructure, so this might be a single module).
  • linear systems; in the short term, this should take the form of Swift bindings for BLAS and LAPACK.

The last of these is the one that I'm personally most likely to work on in the near future. It's the most foundational (in that almost everything else will depend on it). Feel free to open individual issues for the other three, but they aren't likely to get a lot of attention from me personally until some more basic stuff is in place.

commented

I would add to this list linear and nonlinear optimization problems...