npstat::Poly1D Class Reference
Inheritance diagram for npstat::Poly1D:
Constructor & Destructor Documentation◆ Poly1D() [1/4]
The length of the array of coefficients should be at least degree+1. The highest degree coefficient is assumed to be the last one in the "coeffs" array (0th degree coefficient comes first). ◆ Poly1D() [2/4]
The length of the vector of coefficients should be degree+1. The highest degree coefficient is assumed to be the last one in the vector (0th degree coefficient comes first). ◆ Poly1D() [3/4]
Note that the constructor from a floating point number is not explicit. Implicit conversions from a floating point number into a Poly1D are useful, for example, with arithmetic operators. ◆ Poly1D() [4/4]
Construct a monomial of the given degree and with the leading coefficient provided Member Function Documentation◆ allCoefficients()
Return all coefficients ◆ deg()
The degree of the polynomial ◆ derivative()
Derivative polynomial ◆ integral()
Indefinite integral, with explicit additive constant ◆ isClose()
Check if all polynomial coefficients are within eps from those of another polynomial. eps must be non-negative. ◆ isNull()
Check if the polynomial value is identical zero ◆ leadingCoefficient()
The coefficient of the maximum degree monomial ◆ monicDeg0()
Monic polynomial of 0th degree (just 1.0) ◆ monicDeg1()
Monic polynomial of degree 1, x + b ◆ monicDeg2()
Monic polynomial of degree 2, x^2 + b x + c ◆ nRoots()
Number of roots on the interval (a, b] ◆ operator%()Euclidean division of polynomials – the remainder ◆ operator()()
Polynomial value at x Implements npstat::Functor1< long double, long double >. ◆ operator*()Binary operator on two polynomials or on a polynomial and a floating point number ◆ operator+()
Unary operator ◆ operator/()Euclidean division of polynomials – the ratio ◆ operator[]()
Return the coefficient for the given degree ◆ reserve()
At times it makes sense to reserve the space for the polynomial coefficients (in particular, with operator *=, when you use it more than once and have some idea about the expected degree of the result). ◆ setCoefficient()
Set coefficient for a particular degree ◆ truncate()
Truncate the highest degree coefficients. The resulting polynomial will be of degree "maxDegree" (or less, if the new leading coefficient is 0). ◆ truncateLeadingZeros()
Explicitly truncate leading coefficients that are zeros. Normally, the application code should not use this function, as tracking and removal of leading zeros happens automatically. It might still be useful in certain difficult to anticipate underflow scenarios. The documentation for this class was generated from the following file:
Generated by 1.9.1 |