Open pwl opened 10 years ago
sounds good to me. my notion for this package was simply to contain all Polynomial-related functionality that didn't imply the development of a CAS
however, loladiro/Polynomials.jl is where the future development will occur (because of the better ordering of coefficients)
I have been working on differential algebraic equation integrator which makes a heavy use of interpolating polynomials. At this point I have implemented all the necessary functions myself as a part of my package, but I was wandering if it would be possible to move some of the functionality to a more suitable package. The functions that I am currently using [1] are:
Return the value of an interpolating polynomial
p
at the pointx0
. The interpolating polynomialp
is constructed from the valuesy
at pointsx
, i.e.p(x[i])==y[i]
.Analogous function but for the first derivative of
p
Return the coefficient in front of highest power in the interpolating polynomial. (or in other words if
p(x)=a_{k-1}*x^{k-1}+...+a_{1}*x+a_{0}
return a_{k-1}).From what I see, you store all polynomials in the same way, as coefficients
[a_0,a_1,...,a_{k-1}]
, in the case of interpolating polynomials turning toa_k
representation may not be the optimal case, as you rarely need to compute the coefficients fromx_k
andy_k
to evaluate the polynomial at a given point (for example see the last formula in [2]). The one exception is point 3. of my usage example, buta_{k-1}
can be easily and efficiently computed directly fromx_k
andy_k
.Would it be possible to integrate this functionality into Polynomial.jl, or is it too far away from your vision for this package?
[1] For my (pretty straight forward) implementation see https://github.com/pwl/DASSL.jl/blob/master/src/DASSL.jl#L595 [2] http://en.wikipedia.org/wiki/Polynomial_interpolation#Constructing_the_interpolation_polynomial