MPOLDST Namespace Reference


Detailed Description

Module for polynomials, which are sequences of monomials.


Functions

template<class OSTREAM, class ITER>
OSTREAM & lisp (OSTREAM &os, ITER it, const ITER &ed, const Variables &V=Variables::default_)
template<class O, class R>
void add (R &result, const R &p1, const R &p2)
template<class R, class O>
void sub (R &result, const R &p1, const R &p2)
template<class O, class R>
void add (R &p1, const R &p2)
 Inplace addition.
template<class R, class I, class J, class M, class O>
add (R &p1, I b1, J e1, const M &m2, const O &o)
template<class R, class S, class C>
void mul_ext (R &result, const S &a, const C &m)
 Multiplication of a polynomial by a monomial or a scalar.
template<class R, class C>
void mul_ext_e (std::list< R > &result, const std::list< R > &a, const C &m)
template<class R, class O>
void mul (R &r, const R &a, const R &b, const O &o)
 Multiplication of two polynomials.
template<class M, class O>
void mul (std::list< M > &r, const std::list< M > &a, const std::list< M > &b, const O &o)
 Specialisation for list.
template<class R, class O>
void mul (R &r, typename R::const_iterator b, typename R::const_iterator e, const R &p)
template<class R>
int lvar (const R &p)
 Index of the leading variable (of maximal index) of a polynomial.
template<class R>
unsigned nbvar (const R &p)
 Number of variables of a polynomial.
template<class R>
int degree (const R &p)
 Degree of a polynomial.
template<class R>
int degree (const R &p, int i)
 Degree of a polynomial with respect to the i th variable..
template<class R>
R::coeff_t & leadingcoeff (R &a)
template<class R>
R::coeff_t leadingcoeff (const R &a)
template<class R>
void div_rem (R &q, R &a, const R &b)
 Divide a in place by b.
template<class POL>
POL::coeff_t coeffof (const POL &p, const typename POL::monom_t &mono)
template<class R>
void div_rem_x (R &q, R &a, const R &b0)
 Divide a in place by b, concidering all the monomials.
template<class R>
void diff (R &r, const R &p, int i)
 Derivative of p with respect to i$^{ th}$ variable put in r.
template<class R>
void copy (R &r, const R &a)
 Copy of a in r.
template<class R>
R::coeff_t eval (const R &p, const typename R::coeff_t &x, const typename R::coeff_t &y)
template<class MP>
MP convert (const MP &P, typename MP::coeff_t x, typename MP::coeff_t y, int ind)
template<class OS, class R, class VARIABLES>
OS & print (OS &os, const R &P, const VARIABLES &V)
template<class OS, class R>
OS & print (OS &os, const R &P)
template<class OS, class R>
OS & print_verbatim (OS &os, const R &P)
template<class MP>
MP Rotate_yz (const MP &P, typename MP::coeff_t t)
template<class MP>
MP Rotate_xz (const MP &P, typename MP::coeff_t t)
template<class MP>
MP Rotate_xy (const MP &P, typename MP::coeff_t t)
template<class MP>
MP Rotate_xyz (const MP &P, typename MP::coeff_t t)
template<class POL, class C>
POL shift (typename POL::const_iterator monom, C a, int i)
template<class POL, class C>
POL shift (const POL &polynom, C x0, C y0, C z0)
template<class POL, class C>
POL scale (const POL &polynom, C a, C b, C c)
template<class MP, class X>
MP subs (unsigned var, const X &val, const MP &P)
template<class MP>
MP subs (const MP &P, int var, typename MP::coeff_t val)
template<class MP>
MP subs (const MP &P, char *x, typename MP::coeff_t val)
template<class T>
void print (const T &x)
template<class MP>
MP swap (const MP &P, int var_i, int var_j)
template<class MP>
MP swap (const MP &P, char *x_i, char *x_j)
template<class T, class MP, class V>
eval (const MP &p, const V &v)


Function Documentation

template<class O, class R>
void MPOLDST::add ( R &  p1,
const R &  p2 
)

Inplace addition.

Definition at line 109 of file MPOLDST.m.

template<class POL>
POL::coeff_t MPOLDST::coeffof ( const POL &  p,
const typename POL::monom_t &  mono 
)

Return the coefficient of a monomial m in a polynomial p if it appears in p or 0 otherwise.

Definition at line 328 of file MPOLDST.m.

Referenced by let::convert().

template<class MP>
MP MPOLDST::convert ( const MP &  P,
typename MP::coeff_t  x,
typename MP::coeff_t  y,
int  ind 
)

function which return the equation of the polynomial P hiding the indice ind and evaluating at x and y.

Definition at line 439 of file MPOLDST.m.

template<class R>
void MPOLDST::copy ( R &  r,
const R &  a 
)

Copy of a in r.

Definition at line 408 of file MPOLDST.m.

References let::copy(), and matrixof::reserve().

template<class R>
int MPOLDST::degree ( const R &  p,
int  i 
)

Degree of a polynomial with respect to the i th variable..

Definition at line 280 of file MPOLDST.m.

template<class R>
int MPOLDST::degree ( const R &  p  ) 

Degree of a polynomial.

Definition at line 266 of file MPOLDST.m.

References degree().

Referenced by macaulay(), MonomV(), and solve().

template<class R>
void MPOLDST::diff ( R &  r,
const R &  p,
int  i 
)

Derivative of p with respect to i$^{ th}$ variable put in r.

Definition at line 379 of file MPOLDST.m.

Referenced by evaluation().

template<class R>
void MPOLDST::div_rem ( R &  q,
R &  a,
const R &  b 
)

Divide a in place by b.

Definition at line 303 of file MPOLDST.m.

template<class R>
void MPOLDST::div_rem_x ( R &  q,
R &  a,
const R &  b0 
)

Divide a in place by b, concidering all the monomials.

Definition at line 346 of file MPOLDST.m.

Referenced by Theta().

template<class R>
R::coeff_t MPOLDST::eval ( const R &  p,
const typename R::coeff_t &  x,
const typename R::coeff_t &  y 
)

Evaluate the polynomial p for x0=x, x1=y, and the other xi=1.

Definition at line 419 of file MPOLDST.m.

template<class R>
int MPOLDST::lvar ( const R &  p  ) 

Index of the leading variable (of maximal index) of a polynomial.

Definition at line 251 of file MPOLDST.m.

Referenced by nbvar(), subs(), and swap().

template<class M, class O>
void MPOLDST::mul ( std::list< M > &  r,
const std::list< M > &  a,
const std::list< M > &  b,
const O &  o 
)

Specialisation for list.

Definition at line 204 of file MPOLDST.m.

References add(), and mul_ext().

template<class R, class O>
void MPOLDST::mul ( R &  r,
const R &  a,
const R &  b,
const O &  o 
)

Multiplication of two polynomials.

Definition at line 194 of file MPOLDST.m.

template<class R, class S, class C>
void MPOLDST::mul_ext ( R &  result,
const S &  a,
const C &  m 
)

Multiplication of a polynomial by a monomial or a scalar.

Definition at line 171 of file MPOLDST.m.

References VECTOR::apply_mult().

Referenced by mul().

template<class R>
unsigned MPOLDST::nbvar ( const R &  p  ) 

Number of variables of a polynomial.

Definition at line 260 of file MPOLDST.m.

References lvar().

Referenced by MPol< C, O, R >::nbvar().

template<class MP>
MP MPOLDST::Rotate_xy ( const MP &  P,
typename MP::coeff_t  t 
)

Procedure which stores in Pol the polynomial after making a rotation by t in the x0,x1 plane in 3 dimension. t represents, in the case of rotation, tan(teta/2), with teta is the rotation angle.

Definition at line 669 of file MPOLDST.m.

Referenced by Rotate_xyz().

template<class MP>
MP MPOLDST::Rotate_xyz ( const MP &  P,
typename MP::coeff_t  t 
)

Procedure which stores in Pol the polynomial after making a rotation by t in 3 dimension. t represents, in the case of rotation, tan(teta/2), with teta is the rotation angle.

Definition at line 744 of file MPOLDST.m.

References Rotate_xy(), Rotate_xz(), and Rotate_yz().

template<class MP>
MP MPOLDST::Rotate_xz ( const MP &  P,
typename MP::coeff_t  t 
)

Procedure which stores in Pol the polynomial after making a rotation by t in the x0,x2 plane in 3 dimension. t represents, in the case of rotation, tan(teta/2), with teta is the rotation angle.

Definition at line 594 of file MPOLDST.m.

Referenced by Rotate_xyz().

template<class MP>
MP MPOLDST::Rotate_yz ( const MP &  P,
typename MP::coeff_t  t 
)

Procedure which stores in Pol the polynomial after making a rotation by t in the x1,x2 plane in 3 dimension. t represents, in the case of rotation, tan(teta/2), with teta is the rotation angle.

Definition at line 519 of file MPOLDST.m.

Referenced by Rotate_xyz().

template<class POL, class C>
POL MPOLDST::scale ( const POL &  polynom,
a,
b,
c 
)

The variables of a "tri-variate" polynomial are multiplied as follows: x0 = a*x0, x1 = b*x1, x2 = c*x2.

Definition at line 850 of file MPOLDST.m.

template<class POL, class C>
POL MPOLDST::shift ( const POL &  polynom,
x0,
y0,
z0 
)

Carry out a shift by [x0,y0,z0] of 3 first variables for the polynomial passed in parameter

Definition at line 799 of file MPOLDST.m.

template<class POL, class C>
POL MPOLDST::shift ( typename POL::const_iterator  monom,
a,
int  i 
)

Function applicable only to the polynomials which has three variables. Carry out a change of variable x_i = x_i + a on the multivariable monomial passed as parameter.

Definition at line 762 of file MPOLDST.m.

template<class MP>
MP MPOLDST::subs ( const MP &  P,
char *  x,
typename MP::coeff_t  val 
)

Substitute the variable x by the value val.

Definition at line 950 of file MPOLDST.m.

References subs().

template<class MP>
MP MPOLDST::subs ( const MP &  P,
int  var,
typename MP::coeff_t  val 
)

Substitute the variable x_(var) by the value val.

Definition at line 909 of file MPOLDST.m.

References lvar().

template<class MP, class X>
MP MPOLDST::subs ( unsigned  var,
const X &  val,
const MP &  P 
)

Substitute the variable x_(var) by the value val.

Definition at line 885 of file MPOLDST.m.

Referenced by evaluation(), and subs().

template<class MP>
MP MPOLDST::swap ( const MP &  P,
char *  x_i,
char *  x_j 
)

Swap the variable x_i and x_j in the polynomial P.

Definition at line 990 of file MPOLDST.m.

References swap().

template<class MP>
MP MPOLDST::swap ( const MP &  P,
int  var_i,
int  var_j 
)

Swap the variable x_(var_i) and x_(var_j) in the polynomial P.

Definition at line 964 of file MPOLDST.m.

References lvar().

Referenced by topology::assign(), baseLocal(), and swap().


SYNAPS DOCUMENTATION
logo