realroot_doc 0.1.1
bernstein< C > Struct Template Reference

#include <tensor_bernstein.hpp>

Inheritance diagram for bernstein< C >:
monomials< C >

List of all members.

Public Types

Public Member Functions

Public Attributes

Static Public Attributes


Detailed Description

template<class C>
struct mmx::tensor::bernstein< C >

Definition at line 13 of file tensor_bernstein.hpp.


Member Typedef Documentation

typedef monomials<C> base_type

Definition at line 15 of file tensor_bernstein.hpp.

typedef C coeff_t [inherited]

Definition at line 20 of file tensor_monomials.hpp.

Reimplemented from monomials< C >.

Definition at line 19 of file tensor_bernstein.hpp.

typedef std::reverse_iterator<const_iterator> const_reverse_iterator [inherited]

Definition at line 27 of file tensor_monomials.hpp.

Reimplemented from monomials< C >.

Definition at line 18 of file tensor_bernstein.hpp.

typedef std::reverse_iterator<iterator> reverse_iterator [inherited]

Definition at line 26 of file tensor_monomials.hpp.

Reimplemented from monomials< C >.

Definition at line 20 of file tensor_bernstein.hpp.

Reimplemented from monomials< C >.

Definition at line 16 of file tensor_bernstein.hpp.

Reimplemented from monomials< C >.

Definition at line 17 of file tensor_bernstein.hpp.


Constructor & Destructor Documentation

bernstein ( const C &  x = 0)

Definition at line 192 of file tensor_bernstein_fcts.hpp.

: base_type(x) {}
bernstein ( int  v,
int  d 
) [inline]

Definition at line 23 of file tensor_bernstein.hpp.

References mmx::tensor::convertm2b().

                            : base_type(v,d) {
      convertm2b(*this);
    }
bernstein ( const C &  c,
int  v,
int  d 
) [inline]

Definition at line 26 of file tensor_bernstein.hpp.

References mmx::tensor::convertm2b().

                                        : base_type(c,v,d) {
      convertm2b(*this);
    }
bernstein ( const bernstein< C > &  p) [inline]

Definition at line 29 of file tensor_bernstein.hpp.

                                      : base_type(p) {
      //      std::cout<<"\tcopy"<<std::endl;
    }
bernstein ( const sparse::monomial_seq< X, O > &  pol) [inline]

Definition at line 34 of file tensor_bernstein.hpp.

References mmx::tensor::convertm2b().

                                                   :base_type(pol) {
      convertm2b(*this);
    }
bernstein ( const char *  str) [inline]

Definition at line 38 of file tensor_bernstein.hpp.

References mmx::tensor::convertm2b().

                                :base_type(str) {
      convertm2b(*this);
    }
bernstein ( const char *  str,
const VECT &  bx 
) [inline]

Definition at line 43 of file tensor_bernstein.hpp.

References mmx::tensor::convertm2b().

                                               :base_type(str) {
      convertm2b(*this, bx);
    }
bernstein ( const sparse::monomial_seq< C, O > &  pol,
const VECT &  bx 
) [inline]

Definition at line 48 of file tensor_bernstein.hpp.

References mmx::tensor::convertm2b().

                                                                  :base_type(pol) {
      convertm2b(*this, bx);
    }
bernstein ( const sparse::monomial_seq< X, O > &  mpol,
const VECT &  bx 
) [inline]

Definition at line 54 of file tensor_bernstein.hpp.

References mmx::tensor::convertm2b().

                                                                   :base_type(mpol)     {
      convertm2b(*this, bx);
    }
bernstein ( const eenv e)

Definition at line 182 of file tensor_bernstein_fcts.hpp.

: base_type(e) {};
bernstein ( const eenv e,
const C &  c 
)

Definition at line 184 of file tensor_bernstein_fcts.hpp.

                                                                           : 
  base_type(e,c){};
bernstein ( int  nvr,
const int *  szs,
const int *  vrs = 0 
)

Definition at line 188 of file tensor_bernstein_fcts.hpp.

                                                                  : base_type(nvr,szs,vrs)
{
}

Member Function Documentation

const_iterator begin ( ) const [inline, inherited]

Definition at line 50 of file tensor_monomials.hpp.

References monomials< C >::data.

{ return &(data[0]); };
C* end ( ) [inline, inherited]

Definition at line 48 of file tensor_monomials.hpp.

References monomials< C >::data, and monomials< C >::esz().

Referenced by mmx::tensor::cfdump(), mmx::tensor::clear(), and mmx::tensor::eval().

{ return &(data[0])+esz(); };
const_iterator end ( ) const [inline, inherited]

Definition at line 51 of file tensor_monomials.hpp.

References monomials< C >::data, and monomials< C >::esz().

{ return &(data[esz()]); };
const C entry ( std::vector< int >  deg) [inline, inherited]

Definition at line 480 of file tensor_monomials_fcts.hpp.

    {
        int * vvrs = vrs();
        int * sstr = str();
        int * sszs = szs() ;

        int i,pos=0;
        for (i = 0; i < nvr() ; ++i)
        {
            std::cout<<"entry:" <<deg[i] << std::endl;
            if (deg[i] >= sszs[ vvrs[i] ] || deg[i]<0 ) return C(0); 
            pos += deg[i]*sstr[ vvrs[i] ];
        }
        return data[pos];
    }
bool hasvar ( int &  lv,
int  gv 
) const [inherited]
int nbvar ( ) const [inline, inherited]

Definition at line 73 of file tensor_monomials.hpp.

References monomials< C >::env, and eenv::nvr().

Referenced by mmx::tensor::degree().

{ return env.nvr(); };
bernstein< C > & operator= ( const C &  x)

Definition at line 322 of file tensor_bernstein_fcts.hpp.

  {
    this->~bernstein<C>();
    new (this) bernstein<C>(x);
    return *this;
  };
bool operator== ( const C &  c) const [inline]

Reimplemented from monomials< C >.

Definition at line 65 of file tensor_bernstein.hpp.

References monomials< C >::data, and monomials< C >::esz().

{ return base_type::esz() == 1 && base_type::data[0] == c; };
bool operator== ( const bernstein< C > &  mp) const

Definition at line 309 of file tensor_bernstein_fcts.hpp.

References mmx::operator==().

  {
    return base_type::operator==(mpl); 
  };
bool operator== ( const monomials< C > &  mpl) const [inherited]

Definition at line 105 of file tensor_monomials_fcts.hpp.

References eenv::equal(), and eenv::oaddress().

  {
    if (!eenv::equal (env, mpl.env))
      return false;
    unsigned *oadd = new unsigned[esz ()];
    eenv::oaddress (env, oadd, mpl.env, 0, 0);
    for (int i = 0; i < esz (); i++)
      if (data[i] != mpl[oadd[i]])
        {
          delete[]oadd;
          return false;
        };
    delete[]oadd;
    return true;
  };
C& operator[] ( int  i) [inline]

Reimplemented from monomials< C >.

Definition at line 63 of file tensor_bernstein.hpp.

References monomials< C >::data.

{ return this->data[i]; };
C operator[] ( int  i) const [inline]

Reimplemented from monomials< C >.

Definition at line 64 of file tensor_bernstein.hpp.

References monomials< C >::data.

{ return this->data[i]; };
reverse_iterator rbegin ( ) [inline, inherited]

Definition at line 54 of file tensor_monomials.hpp.

References monomials< C >::data, and monomials< C >::esz().

                   {
      return reverse_iterator(&(data[0])+esz()); 
    }
const_reverse_iterator rbegin ( ) const [inline, inherited]

Definition at line 58 of file tensor_monomials.hpp.

References monomials< C >::data, and monomials< C >::esz().

                   {
      return const_reverse_iterator(&(data[0])+esz()); 
    }
const_reverse_iterator rend ( ) const [inline, inherited]

Definition at line 66 of file tensor_monomials.hpp.

References monomials< C >::data.

                   {
      return const_reverse_iterator(&(data[0])); 
    }
reverse_iterator rend ( ) [inline, inherited]

Definition at line 62 of file tensor_monomials.hpp.

References monomials< C >::data.

                   {
      return reverse_iterator(&(data[0])); 
    }
void resize ( int  l) [inline, inherited]

Definition at line 46 of file tensor_monomials.hpp.

{};
int size ( void  ) const [inline, inherited]
int* str ( ) [inline, inherited]
const int* str ( ) const [inline, inherited]

Definition at line 80 of file tensor_monomials.hpp.

References monomials< C >::env, and eenv::str().

{ return env.str(); };
void swap ( monomials< C > &  a) [inline, inherited]

Definition at line 88 of file tensor_monomials.hpp.

References monomials< C >::data, and monomials< C >::env.

Referenced by mmx::tensor::clear(), mmx::tensor::extend(), mmx::tensor::mul(), and mmx::tensor::realloc().

{ std::swap(env,a.env); data.swap(a.data); };    
const int* szs ( ) const [inline, inherited]

Definition at line 78 of file tensor_monomials.hpp.

References monomials< C >::env, and eenv::szs().

{ return env.szs(); };
const int* vrs ( ) const [inline, inherited]

Definition at line 79 of file tensor_monomials.hpp.

References monomials< C >::env, and eenv::vrs().

{ return env.vrs(); };

Member Data Documentation

binomials<C> binoms [static, inherited]

Definition at line 30 of file tensor_monomials.hpp.


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