The Poly
class provides operations on univariate polynomials. Poly (2, 3) => 3 x + 2 Note, reverse order of coefficients, i.e., coefficients for smallest terms first.
Value parameters
- c
-
the coefficients of the polynomial
- x
-
the variable/indeterminate of the polynomial
Attributes
- See also
-
`MPoly' for multivariate polynomials.
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Add 'this' polynomial and the 'q' polynomial.
Add 'this' polynomial and the 'q' polynomial.
Value parameters
- q
-
the other polynomial
Attributes
Add 'this' polynomial and the 'q' polynomial.
Add 'this' polynomial and the 'q' polynomial.
Value parameters
- q
-
the other polynomial
Attributes
Subtract the 'q' polynomial from 'this' polynomial.
Subtract the 'q' polynomial from 'this' polynomial.
Value parameters
- q
-
the other polynomial
Attributes
Apply/evaluate the polynomial at 'x'.
Apply/evaluate the polynomial at 'x'.
Value parameters
- x
-
the value of the variable
Attributes
Take the derivative of 'this' polynomial, returning the result as a polynomial.
Take the derivative of 'this' polynomial, returning the result as a polynomial.
Attributes
Integrate 'this' polynomial, returning the result as a polynomial. Note, the arbitrary constant 'c' for the indefinite integral is set to 1.
Integrate 'this' polynomial, returning the result as a polynomial. Note, the arbitrary constant 'c' for the indefinite integral is set to 1.
Attributes
Integrate 'this' polynomial on the interval 'on', returning its value as a double.
Integrate 'this' polynomial on the interval 'on', returning its value as a double.
Value parameters
- on
-
the interval of integration
Attributes
Parse a readable/LaTeX-compatible string to create a polynomial, using a PEG parser.
Parse a readable/LaTeX-compatible string to create a polynomial, using a PEG parser.
Value parameters
- str
-
the string to parse, e.g., "2.0 x^3 + 3.0 x^2 + 4.0 x + 5.0"
Attributes
- See also
Parse a compilable Scala expression string to create a polynomial, using a PEG parser.
Parse a compilable Scala expression string to create a polynomial, using a PEG parser.
Value parameters
- str
-
the string to parse, e.g., "2.0x~^3 + 3.0x~^2 + 4.0*x + 5.0"
Attributes
- See also
Convert the polynomial to a readable/LaTeX-compatible string.
Convert the polynomial to a readable/LaTeX-compatible string.
Attributes
- Definition Classes
-
Any
Convert the polynomial to an compilable Scala expression string.
Convert the polynomial to an compilable Scala expression string.
Attributes
Trim away trailing zero coefficients (i.e., those on highest order terms), returning the resulting polynomial of possibly lower degree.
Trim away trailing zero coefficients (i.e., those on highest order terms), returning the resulting polynomial of possibly lower degree.
Attributes
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product