dual< C, O > Struct Template Reference

#include <sparse_dual.hpp>

Inheritance diagram for dual< C, O >:
monomial_seq< C, O > list

List of all members.

Public Types

Public Member Functions

Static Public Member Functions

Static Public Attributes


Detailed Description

template<class C, class O = DegRevLex>
struct mmx::sparse::dual< C, O >

Definition at line 17 of file sparse_dual.hpp.


Member Typedef Documentation

typedef monomial_seq<C,O> base_t

Definition at line 22 of file sparse_dual.hpp.

typedef C coeff_t

Reimplemented from monomial_seq< C, O >.

Definition at line 25 of file sparse_dual.hpp.

Reimplemented from monomial_seq< C, O >.

Definition at line 28 of file sparse_dual.hpp.

Reimplemented from monomial_seq< C, O >.

Definition at line 30 of file sparse_dual.hpp.

Reimplemented from monomial_seq< C, O >.

Definition at line 27 of file sparse_dual.hpp.

Reimplemented from monomial_seq< C, O >.

Definition at line 24 of file sparse_dual.hpp.

typedef base_t::value_type Monomial [inherited]

Definition at line 35 of file sparse_monomials.hpp.

typedef O Order [inherited]

Definition at line 32 of file sparse_monomials.hpp.

typedef O order_t

Definition at line 26 of file sparse_dual.hpp.

typedef monomial_seq<C,O> poly_t

Definition at line 31 of file sparse_dual.hpp.

typedef monomial_seq<C,O> R

Definition at line 21 of file sparse_dual.hpp.

typedef poly std::list<monom<C > > () base_t [inherited]

Definition at line 33 of file sparse_monomials.hpp.

Reimplemented from monomial_seq< C, O >.

Definition at line 29 of file sparse_dual.hpp.

typedef C Scalar [inherited]

Definition at line 30 of file sparse_monomials.hpp.

typedef dual<C,O> self_t

Reimplemented from monomial_seq< C, O >.

Definition at line 32 of file sparse_dual.hpp.

typedef C value_type [inherited]

Definition at line 31 of file sparse_monomials.hpp.


Constructor & Destructor Documentation

dual (  )  [inline]

Definition at line 35 of file sparse_dual.hpp.

00035 : poly_t() {}

dual ( const coeff_t c  )  [inline]

Definition at line 36 of file sparse_dual.hpp.

00036 : poly_t(c) {}

dual ( const coeff_t c,
int  d,
int  v 
) [inline]

Definition at line 37 of file sparse_dual.hpp.

00037 : poly_t(c,-d,v) {}

dual ( const monom_t m  )  [inline]

Definition at line 38 of file sparse_dual.hpp.

References mmx::sparse::neg_exponent().

00038 :  poly_t(m) {neg_exponent(*this);}

dual ( const self_t P  )  [inline]

Definition at line 41 of file sparse_dual.hpp.

00041 : poly_t(P){}

dual ( const char *  s,
variables vars = variables::default_ 
) [inline]

Definition at line 42 of file sparse_dual.hpp.

References mmx::sparse::neg_exponent().

00042                                                            : 
00043     poly_t(s,vars) {neg_exponent(*this);}

dual ( const char *  s,
const variables vars 
) [inline]

Definition at line 44 of file sparse_dual.hpp.

References mmx::sparse::neg_exponent().

00044                                              :
00045     poly_t(s,vars) {neg_exponent(*this);}

dual ( const dual< C, Q > &  p  )  [inline]

Definition at line 48 of file sparse_dual.hpp.

00048 : poly_t(p) {}


Member Function Documentation

static bool less ( const monom_t &  m1,
const monom_t &  m2 
) [inline, static, inherited]

Definition at line 62 of file sparse_monomials.hpp.

00062                                                   {
00063       //      std::cout<<"less "<< m1<< " "<< m2<<std::endl;
00064       return m_order->less(m1.begin(),m1.size(), 
00065                            m2.begin(),m2.size());
00066     }

int nbvar (  )  const [inherited]

Number of variables in polynomial.

bool operator!= ( const C &  c  )  const [inline, inherited]

Definition at line 55 of file sparse_monomials.hpp.

00055 { return !(*this==c); }

bool operator!= ( const monomial_seq< C , O , monom<C > , poly.std::list<monom<C > > () > &  p  )  const [inline, inherited]

Definition at line 53 of file sparse_monomials.hpp.

00053 { return !(*this==p); }

C operator() ( const poly_t p  )  [inline]

Evaluation of a linear form on a polynomial. The product is preformed with negative exponents for the linear form. The coefficient of the term with zero exponents is returned.

Definition at line 87 of file sparse_dual.hpp.

References C.

00088 {
00089   monomial_seq<C,O> t= ((monomial_seq<C,O>)(*this))*p;
00090   typedef typename monomial_seq<C,O>::reverse_iterator iterator;
00091   iterator it;
00092   for(it=t.rbegin(); it != t.rend();it++)
00093     {
00094       bool nul=true;
00095       for(unsigned j=0;j<(it->nvars()+1) && nul;j++)  
00096         {
00097           if((*it)[j]!=0) nul=false;
00098         }
00099       if(nul) return it->coeff();
00100     }
00101   return C(0);
00102 }

self_t& operator= ( const monom_t m  )  [inline]

Definition at line 62 of file sparse_dual.hpp.

00062 {*this=self_t(m); return *this;}

self_t& operator= ( int  n  )  [inline]

Definition at line 61 of file sparse_dual.hpp.

00061 {*this=self_t(n); return *this;}

self_t& operator= ( const coeff_t c  )  [inline]

Definition at line 60 of file sparse_dual.hpp.

00060 {*this=self_t(c); return *this;}

self_t& operator= ( const self_t x  )  [inline]

Definition at line 56 of file sparse_dual.hpp.

00057   { 
00058     this->base_t::operator=(x); return *this;
00059   }

bool operator== ( const C &  c  )  const [inherited]
bool operator== ( const monomial_seq< C , O , monom<C > , poly.std::list<monom<C > > () > &  p  )  const [inherited]
static MonomialOrdering* order (  )  [inline, static, inherited]

Definition at line 60 of file sparse_monomials.hpp.

00060 {return m_order;}


Member Data Documentation

MonomialOrdering* m_order [static, inherited]

Definition at line 59 of file sparse_monomials.hpp.


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for realroot by  doxygen 1.6.1