next up previous contents
Next: Pseudo-remainder Up: Polynomial Utilities Previous: Polynomial Utilities

Differentiation, Substitution and Interpolation

Syntax
Polynomial diff(Polynomial p,char* s,int deriv_type = NOTYPE).
Description
Returns the derivative of the polynomial. The type of derivative returned depends on the variable deriv_type.
  1. deriv_type = SLP, (e.g. diff(p,``l1'',SLP)), p is assumed to have Slp 's as its coefficients and the derivative of the coefficient Slp 's will be taken w.r.t. the variable s.
  2. deriv_type = VAR, (e.g. diff(p,``x2'')), the derivative of p will be taken w.r.t. the variable s.
  3. deriv_type is some other other field type, or is not specified (e.g. diff(p)), the derivative of p will be taken w.r.t. the leading variable of p.

Function Name
subs()
Syntax
void subs (Polynomial poly, int n, Array<Polynomial > numer_array, Array<Polynomial > denom_array, Polynomial *result_n, Polynomial *result_d)

Description
Substitute variables in the given polynomial "poly" with the rational functions given by xnumer_array and xdenom_array. The ith element of each array gives the numerator and denominator respectively to be substituted for the ith variable, n is the bound on the number of variables.

Syntax
void subs (Polynomial poly, int n, Array<Polynomial> numer_array, Polynomial denom, Polynomial *result_n, Polynomial *result_d)

Description
Substitute variables in the given polynomial "poly" with the rational functions given by xnumer_array and common denominator given by denom.

Function Name
vanderpolate()
Syntax
Polynomial vanderpolate(Array<Polynomial> vals_array, Array<Field_element> eval_points, int n, char* var, int poly_type = INTMODP)
Description
Given an array of values, vals_array, of a polynomial (typically specified by an Slp ) evaluated at an array of points (eval_points), vanderpolate() returns the polynomial after performing univariate Vandermonde interpolation. The degree of the polynomial is given by , var specifies the variable w.r.t. which the interpolation is done and poly_type is the type of Field_element over which the polynomial is to be interpolated (default is INTMODP). Note again that even though the Slp representing the polynomial could be multivariate, the vanderpolate() will recover it only as a univariate polynomial. Typically used in conjunction with the interpolate routine for Slp 's


next up previous contents
Next: Pseudo-remainder Up: Polynomial Utilities Previous: Polynomial Utilities

Ashu Rege
Fri May 9 17:57:21 PDT 1997