UnivariatePolynomial¶
Overview¶
Handles a univariate polynomial (a polynomial with one variable), like 2x^2 + 6x + 4.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class UnivariatePolynomial¶
Constructor¶
new UnivariatePolynomial( coefficients : number[] )¶
Instance Methods¶
plus( polynomial : UnivariatePolynomial ) : UnivariatePolynomial¶
minus( polynomial : UnivariatePolynomial ) : UnivariatePolynomial¶
times( polynomial : UnivariatePolynomial ) : UnivariatePolynomial¶
dividedBy( polynomial : UnivariatePolynomial ) : { quotient: UnivariatePolynomial; remainder: UnivariatePolynomial }¶
gcd( polynomial : UnivariatePolynomial ) : UnivariatePolynomial¶
equals( polynomial : UnivariatePolynomial ) : boolean¶
getCoefficient( degree : number ) : number¶
isZero() : boolean¶
getMonicPolynomial() : UnivariatePolynomial¶
evaluate( x : number ) : number¶
evaluateComplex( x : Complex ) : Complex¶
getRoots() : Complex[]¶
Instance Properties¶
coefficients : number[]¶
(readonly)
Static Methods¶
singleCoefficient( coefficient : number, degree : number ) : UnivariatePolynomial¶
Static Properties¶
ZERO : UnivariatePolynomial¶
(readonly)
Source Code¶
See the source for UnivariatePolynomial.ts in the dot repository.