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 poly. 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 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 poly rep() base_t

Definition at line 33 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, poly.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]
monomial_seq ( const C &  c  )  [inline]
monomial_seq ( const C &  c,
int  d,
unsigned  v 
) [inline]

Definition at line 83 of file sparse_monomials.hpp.

00083                                                 :base_t() {
00084       this ->push_back(monom_t(c,d,v));}

monomial_seq ( const monom_t m  )  [inline]

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.

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 [inline]

Number of variables in polynomial.

Definition at line 88 of file sparse_monomials.hpp.

References mmx::vctops::max().

00088                          {
00089     int v = 0;
00090     for (const_iterator it = this->begin(); it != this->end(); ++it)
00091       v = std::max(v,it->l_variable()+1);
00092     return v;
00093   }

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

Definition at line 55 of file sparse_monomials.hpp.

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

bool operator!= ( const monomial_seq< C, O, MONOM, poly.rep() > &  p  )  const [inline]

Definition at line 53 of file sparse_monomials.hpp.

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

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

Definition at line 102 of file sparse_monomials.hpp.

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

00102                                           {
00103     if(c==0)
00104       return (this->size()==0);
00105     else
00106       return(this->size()==1 && (this->begin()->coeff() == c) && degree(*this->begin())== 0);
00107   }

bool operator== ( const monomial_seq< C, O, MONOM, poly.rep() > &  p  )  const [inline]

Definition at line 97 of file sparse_monomials.hpp.

00097                                                    {
00098     return ((base_t)*this==(base_t)p);
00099   }

static MonomialOrdering* order (  )  [inline, static]

Definition at line 60 of file sparse_monomials.hpp.

00060 {return m_order;}


Member Data Documentation

MonomialOrdering * m_order = (MonomialOrdering*)new O [inline, static]

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