realroot_doc 0.1.1
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

Reimplemented from monomial_seq< C, O >.

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.

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.

: poly_t() {}
dual ( const coeff_t c) [inline]

Definition at line 36 of file sparse_dual.hpp.

: poly_t(c) {}
dual ( const coeff_t c,
int  d,
int  v 
) [inline]

Definition at line 37 of file sparse_dual.hpp.

: 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().

:  poly_t(m) {neg_exponent(*this);}
dual ( const self_t P) [inline]

Definition at line 41 of file sparse_dual.hpp.

: 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().

                                                           : 
    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().

                                             :
    poly_t(s,vars) {neg_exponent(*this);}
dual ( const dual< C, Q > &  p) [inline]

Definition at line 48 of file sparse_dual.hpp.

: 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.

                                                  {
      //      std::cout<<"less "<< m1<< " "<< m2<<std::endl;
      return m_order->less(m1.begin(),m1.size(), 
                           m2.begin(),m2.size());
    }
int nbvar ( ) const [inherited]

Number of variables in polynomial.

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

Definition at line 53 of file sparse_monomials.hpp.

{ return !(*this==p); }
bool operator!= ( const C &  c) const [inline, inherited]

Definition at line 55 of file sparse_monomials.hpp.

{ return !(*this==c); }
C operator() ( const poly_t p)

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.

{
  monomial_seq<C,O> t= ((monomial_seq<C,O>)(*this))*p;
  typedef typename monomial_seq<C,O>::reverse_iterator iterator;
  iterator it;
  for(it=t.rbegin(); it != t.rend();it++)
    {
      bool nul=true;
      for(unsigned j=0;j<(it->nvars()+1) && nul;j++)  
        {
          if((*it)[j]!=0) nul=false;
        }
      if(nul) return it->coeff();
    }
  return C(0);
}
self_t& operator= ( const self_t x) [inline]

Definition at line 56 of file sparse_dual.hpp.

  { 
    this->base_t::operator=(x); return *this;
  }
self_t& operator= ( const monom_t m) [inline]

Definition at line 62 of file sparse_dual.hpp.

{*this=self_t(m); return *this;}
self_t& operator= ( const coeff_t c) [inline]

Definition at line 60 of file sparse_dual.hpp.

{*this=self_t(c); return *this;}
self_t& operator= ( int  n) [inline]

Definition at line 61 of file sparse_dual.hpp.

{*this=self_t(n); return *this;}
bool operator== ( const monomial_seq< C, O, monom<C> , std::list<monom<C> > > &  p) const [inherited]
bool operator== ( const C &  c) const [inherited]
static MonomialOrdering* order ( ) [inline, static, inherited]

Definition at line 60 of file sparse_monomials.hpp.

{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: