Versions in this module Expand all Collapse all v0 v0.1.0 Oct 20, 2026 Changes in this version + var ErrArg = errors.New("poly: invalid argument") + var ErrBasis = errors.New("poly: unknown basis") + var ErrEmpty = errors.New("poly: empty input") + var ErrNonFinite = errors.New("poly: non-finite value in least-squares problem") + var ErrRankDeficient = errors.New("poly: rank-deficient fit has no covariance") + func Conv(a, v []float64) ([]float64, error) + func Deconv(u, v []float64) (q, r []float64, err error) + func Der(b Basis, c []float64, m int, scl float64) ([]float64, error) + func FitSeries(b Basis, x, y []float64, deg int, o *SeriesFitOptions) (Series, Fit, error) + func GetDomain(x []float64) ([2]float64, error) + func Int(b Basis, c []float64, m int, k []float64, lbnd, scl float64) ([]float64, error) + func MapDomain(dst, x []float64, old, new [2]float64) []float64 + func MapParms(old, new [2]float64) (off, scl float64) + func PolyFromComplexRoots(roots []complex128) (coef []complex128, realOnly bool) + func PolyFromRoots(roots []float64) []float64 + func Polyadd(a, b []float64) []float64 + func Polyder(p []float64, m int) ([]float64, error) + func Polyint(p []float64, m int, k []float64) ([]float64, error) + func Polymul(a, b []float64) []float64 + func Polysub(a, b []float64) []float64 + func Polyval(p []float64, x float64) float64 + func PolyvalAll(dst, p, x []float64) []float64 + func PolyvalComp(p []float64, x float64) float64 + func PolyvalCompAll(dst, p, x []float64) []float64 + func Roots(p []float64) ([]complex128, error) + func RootsBasis(b Basis, c []float64) ([]complex128, error) + func Val(b Basis, c []float64, x float64) (float64, error) + func ValAll(b Basis, dst, c, x []float64) ([]float64, error) + func Vander(b Basis, x []float64, deg int) ([]float64, error) + type Basis int + const Chebyshev + const Hermite + const HermiteE + const Laguerre + const Legendre + func (b Basis) Domain() [2]float64 + func (b Basis) String() string + func (b Basis) Window() [2]float64 + type CovMode int + const CovNone + const CovScaled + const CovUnscaled + type Fit struct + Coef []float64 + Cov []float64 + Rank int + Residuals []float64 + func FitBasis(b Basis, x, y []float64, deg int, w []float64, rcond float64) (Fit, error) + func Polyfit(x, y []float64, deg int, o *FitOptions) (Fit, error) + type FitOptions struct + Cov CovMode + Rcond float64 + W []float64 + type Series struct + Basis Basis + Coef []float64 + Domain [2]float64 + Window [2]float64 + func NewSeries(b Basis, coef []float64) (Series, error) + func (s Series) Der(m int) (Series, error) + func (s Series) Int(m int, k []float64, lbnd *float64) (Series, error) + func (s Series) Roots() ([]complex128, error) + func (s Series) Val(x float64) (float64, error) + func (s Series) ValAll(dst, x []float64) ([]float64, error) + type SeriesFitOptions struct + Domain *[2]float64 + Rcond float64 + W []float64 + Window *[2]float64