Type::PolyOf -- type for testing
polynomials
IntroductionWith Type::PolyOf, polynomials can be identified.
Call(s)testtype(obj, Type::PolyOf(coeff_type <,
num_ind>))
Parametersobj |
- | any MuPAD object |
coeff_type |
- | the type of the coefficientes; a type can be an object
of the library Type or
one of the possible return values of domtype and type |
num_ind |
- | the number of indeterminates |
Returnssee testtype
Related
Functions
Detailstesttype(obj,
Type::PolyOf(coeff_type)) checks, whether obj
is a polynomial with coefficients of type coeff_type and,
if so, returns TRUE,
otherwise FALSE.Only polynomials of type DOM_POLY can be identified with
Type::PolyOf, see Type::PolyExpr for polynomial
expressions.
Type::PolyOf(coeff_type <, num_ind>).
coeff_type determines the type of the coefficients.
The optional argument num_ind determines the number of
indeterminates. If this argument is not given, the polynomial may have
any number of indeterminates.
Example
1Is the object a polynomial with integer coefficients?
>> P := poly(-x^2 - x + 3): testtype(P, Type::PolyOf(Type::Integer))
TRUE
Is the object a polynomial with integer coefficients and two indets?
>> P := poly(-x^2 - x + 3, [x, y]): testtype(P, Type::PolyOf(Type::Integer, 2))
TRUE
>> delete P: