realroot_doc 0.1.1
monomial_seq< C, O, MONOM, REP > Struct Template Reference

#include <sparse_monomials.hpp>

List of all members.

Public Types

Public Member Functions

Static Public Member Functions

Static Public Attributes


Detailed Description

template<class C, class O = DegRevLex, class MONOM = monom<C>, class REP = std::list<MONOM>>
struct mmx::sparse::monomial_seq< C, O, MONOM, REP >

Definition at line 27 of file sparse_monomials.hpp.


Member Typedef Documentation

typedef REP base_t

Reimplemented in dual< C, O >.

Definition at line 33 of file sparse_monomials.hpp.

typedef C coeff_t

Reimplemented in dual< C, O >.

Definition at line 29 of file sparse_monomials.hpp.

typedef base_t::const_iterator const_iterator

Reimplemented in dual< C, O >.

Definition at line 37 of file sparse_monomials.hpp.

typedef base_t::const_reverse_iterator const_reverse_iterator

Reimplemented in dual< C, O >.

Definition at line 39 of file sparse_monomials.hpp.

typedef base_t::iterator iterator

Reimplemented in dual< C, O >.

Definition at line 36 of file sparse_monomials.hpp.

typedef base_t::value_type monom_t

Reimplemented in dual< C, O >.

Definition at line 34 of file sparse_monomials.hpp.

typedef base_t::value_type Monomial

Definition at line 35 of file sparse_monomials.hpp.

typedef O Order

Definition at line 32 of file sparse_monomials.hpp.

typedef base_t::reverse_iterator reverse_iterator

Reimplemented in dual< C, O >.

Definition at line 38 of file sparse_monomials.hpp.

typedef C Scalar

Definition at line 30 of file sparse_monomials.hpp.

typedef monomial_seq<C,O,MONOM,REP> self_t

Reimplemented in dual< C, O >.

Definition at line 40 of file sparse_monomials.hpp.

typedef C value_type

Definition at line 31 of file sparse_monomials.hpp.


Constructor & Destructor Documentation

monomial_seq ( ) [inline]

Definition at line 42 of file sparse_monomials.hpp.

: base_t() {}
monomial_seq ( const C &  c) [inline]

Definition at line 43 of file sparse_monomials.hpp.

                          :base_t() {
      if (c!=(coeff_t)0)
        this ->push_back(monom_t(c));
    }
monomial_seq ( const C &  c,
int  d,
unsigned  v 
) [inline]

Definition at line 83 of file sparse_monomials.hpp.

                                                :base_t() {
      this ->push_back(monom_t(c,d,v));}
monomial_seq ( const monom_t m) [inline]

Definition at line 50 of file sparse_monomials.hpp.

: base_t() { this->push_back(m);};

Member Function Documentation

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

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

Number of variables in polynomial.

Definition at line 88 of file sparse_monomials.hpp.

References mmx::vctops::max().

                         {
    int v = 0;
    for (const_iterator it = this->begin(); it != this->end(); ++it)
      v = std::max(v,it->l_variable()+1);
    return v;
  }
bool operator!= ( const monomial_seq< C, O, MONOM, REP > &  p) const [inline]

Definition at line 53 of file sparse_monomials.hpp.

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

Definition at line 55 of file sparse_monomials.hpp.

{ return !(*this==c); }
bool operator== ( const monomial_seq< C, O, MONOM, REP > &  p) const

Definition at line 97 of file sparse_monomials.hpp.

                                                   {
    return ((base_t)*this==(base_t)p);
  }
bool operator== ( const C &  c) const

Definition at line 102 of file sparse_monomials.hpp.

References mmx::sparse::degree(), and mmx::size().

                                          {
    if(c==0)
      return (this->size()==0);
    else
      return(this->size()==1 && (this->begin()->coeff() == c) && degree(*this->begin())== 0);
  }
static MonomialOrdering* order ( ) [inline, static]

Definition at line 60 of file sparse_monomials.hpp.

{return m_order;}

Member Data Documentation

Definition at line 59 of file sparse_monomials.hpp.


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