Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

multiPolynomial< K > Class Template Reference

#include <multipoly.H>

List of all members.


Detailed Description

template<class K>
class multiPolynomial< K >

elements of a free module over a polynomial ring

A multiPolynomial is simply a tuple of polynomials, of which we think as an element of A^n, with A= polynomial ring.

The implementation is very basic: it just provides an interface to the methods of the Polynomial class.

Definition at line 18 of file multipoly.H.

Public Member Functions

 multiPolynomial ()
 constructor
void resize (long n)
long size () const
void set_alphabet (const Alphabet *alpha)
bool is_zero () const
void sets_to_zero ()
multiPolynomial< K > lm () const
 leading monomial using TOP
PowProd lp () const
 lp -- same as lm but as a powprod
lc () const
 lp -- same as lm but as a powprod
multiPolynomial< K > lm_POT () const
 leading monomial using POT
PowProd lp_POT () const
 lp -- same as lm but as a powprod
lc_POT () const
 lp -- same as lm but as a powprod
coeff_of (const multiPolynomial< K > &a) const
 coeff of a monomial
Polynomial< K > & operator[] (long n)
const Polynomial< K > & operator[] (long n) const
multiPolynomial< K > & operator+= (const multiPolynomial< K > &that)
multiPolynomial< K > operator+ (const multiPolynomial< K > &that) const
multiPolynomial< K > & operator *= (const Polynomial< K > &P)
multiPolynomial< K > operator * (const Polynomial< K > &P) const
multiPolynomial< K > & operator *= (const K &c)
multiPolynomial< K > operator * (const K &c) const
bool divides (const multiPolynomial< K > &that) const
Polynomial< K > operator/ (const multiPolynomial< K > &that) const

Public Attributes

Matrix< Polynomial< K > > coords
 a 1-line matrix with the polynomials

Friends

ostream & operator<< (ostream &os, const multiPolynomial< K > &M)
multiPolynomial< K > S_polynomial_with_coefficients (const multiPolynomial< K > &f, const multiPolynomial< K > &g, pair< Polynomial< K >, Polynomial< K > > &coeffs)
multiPolynomial< K > S_polynomial (const multiPolynomial< K > &f, const multiPolynomial< K > &g)


Constructor & Destructor Documentation

template<class K>
multiPolynomial< K >::multiPolynomial  )  [inline]
 

constructor

Definition at line 26 of file multipoly.H.


Member Function Documentation

template<class K>
K multiPolynomial< K >::coeff_of const multiPolynomial< K > &  a  )  const [inline]
 

coeff of a monomial

we assume that a is a monomial (ie all coords are zero except in one position, in which it is a powerprod).

Definition at line 201 of file multipoly.H.

template<class K>
bool multiPolynomial< K >::divides const multiPolynomial< K > &  that  )  const [inline]
 

This assumes that *this and that are both monomials, and checks whether the first (and normally, only) coeff of this divides the corresponding entry of that; it is also checked that this entry is nonzero, ie, we check that this and that have their nonzero entry at the same position.

Definition at line 279 of file multipoly.H.

template<class K>
K multiPolynomial< K >::lc  )  const [inline]
 

lp -- same as lm but as a powprod

Definition at line 121 of file multipoly.H.

template<class K>
K multiPolynomial< K >::lc_POT  )  const [inline]
 

lp -- same as lm but as a powprod

Careful: there is a little difference with the Polynomial version, in that the lc() of a 0 multiPolynomial is taken to be 1.

Definition at line 185 of file multipoly.H.

template<class K>
multiPolynomial<K> multiPolynomial< K >::lm  )  const [inline]
 

leading monomial using TOP

this returns the lp of the first polynomial, i.e. the lm of the multiPolynomial with respect to POT and the current order, with 0 > 1 > 2... for the indices.

Definition at line 75 of file multipoly.H.

template<class K>
multiPolynomial<K> multiPolynomial< K >::lm_POT  )  const [inline]
 

leading monomial using POT

this returns the lp of the first polynomial, i.e. the lm of the multiPolynomial with respect to POT and the current order, with 0 > 1 > 2... for the indices.

Definition at line 150 of file multipoly.H.

template<class K>
PowProd multiPolynomial< K >::lp  )  const [inline]
 

lp -- same as lm but as a powprod

Definition at line 101 of file multipoly.H.

template<class K>
PowProd multiPolynomial< K >::lp_POT  )  const [inline]
 

lp -- same as lm but as a powprod

Definition at line 168 of file multipoly.H.

template<class K>
Polynomial<K> multiPolynomial< K >::operator/ const multiPolynomial< K > &  that  )  const [inline]
 

this assumes that 'that' divides 'this', together with the assumptions in 'divides'. The leading coefficient in particular is always assumed to be one, and will be one in the answer anyway.

Definition at line 298 of file multipoly.H.


Friends And Related Function Documentation

template<class K>
multiPolynomial<K> S_polynomial_with_coefficients const multiPolynomial< K > &  f,
const multiPolynomial< K > &  g,
pair< Polynomial< K >, Polynomial< K > > &  coeffs
[friend]
 

Given f and g, this computes S= af + bg and writes a and b in coeffs. Here a=lcm( lp(f), lp(g) )/lt(f) and b= - lcm( lp(f), lp(g) )/lt(g) (note the - sign).

Definition at line 331 of file multipoly.H.


Member Data Documentation

template<class K>
Matrix< Polynomial<K> > multiPolynomial< K >::coords
 

a 1-line matrix with the polynomials

Definition at line 24 of file multipoly.H.

Referenced by multiPolynomial< F_2 >::divides(), multiPolynomial< F_2 >::lm_POT(), and multiPolynomial< F_2 >::operator/().


The documentation for this class was generated from the following file:
Generated on Wed Jun 18 17:22:46 2008 for Pierre Guillot by  doxygen 1.3.9.1