class GSL::Poly
- GSL::Poly
- Reference
- Object
Overview
Poly class represents polinomial c0+c1x+c2x*x+...
See Also PolyDD
for divided difference representation
Defined in:
gsl/maths/basic/poly.crConstructors
-
.new(acoeffs)
Creates polynomial from array of coefficients
Instance Method Summary
-
#==(other : Poly)
compare coefficients with another polynomial
-
#coeffs : Array(Float64)
Returns coefficients of polynomial
-
#diff
differentiate polynomial
-
#eval(x : Float64) : Float64
Returns value of polinomial at point x
-
#eval(x : Complex) : Complex
Returns complex value of polinomial at complex point x
-
#eval_derivs(x : Float64) : Array(Float64)
Returns array containing value at given point and all derivatives at this point.
-
#integrate
integrate polynomial
-
#solve : Array(Float64)
Returns sorted array containing real roots of polinomial.
-
#solve_complex : Array(Complex)
Returns array containing complex roots of polinomial.
-
#solve_distinct(tolerance = 1e-9) : Array(Float64)
Returns sorted array containing real roots of polinomial.
Constructor Detail
Instance Method Detail
Returns complex value of polinomial at complex point x
Returns array containing value at given point and all derivatives at this point.
Returns sorted array containing real roots of polinomial. Roots of higher order will be returned as separate roots
Returns array containing complex roots of polinomial.
Always returns @coeffs.size-1
number of roots.
Returns sorted array containing real roots of polinomial.
Roots that differs less then tolerance
will be returned as one root