CAPD::DynSys Library
6.0.0
|
The class is used to store coefficients of a multivariate polynomial of degree D Coefficients themselves can be polynomials as well. More...
#include <capd/diffAlgebra/CnContainer.h>
Public Types | |
typedef capd::vectalg::Container< Object, M *N *D!=0 ? M *Binomial< N+D, D >::value :0 > | BaseContainer |
typedef Object | ObjectType |
typedef Object * | iterator |
typedef const Object * | const_iterator |
typedef capd::vectalg::Multipointer | Multipointer |
typedef capd::vectalg::Multiindex | Multiindex |
typedef __size_type | size_type |
typedef __difference_type | difference_type |
typedef Object | ScalarType |
typedef std::reverse_iterator< iterator > | reverse_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
CnContainer (size_type m, size_type n, size_type d, const Object &p) | |
creates a container for polynomial of n variables, m components and degree d. Each element will be set to p. More... | |
CnContainer (size_type m, size_type n, size_type d) | |
creates a container for polynomial of n variables, m components and degree d. Default constructor will be used to initialize each element in the container. More... | |
CnContainer & | operator= (const Object &p) |
assigns object p to each element of the container More... | |
CnContainer (const CnContainer &v)=default | |
CnContainer (CnContainer &&v) | |
CnContainer & | operator= (const CnContainer &v)=default |
CnContainer & | operator= (CnContainer &&v) |
size_type | imageDimension () const |
returns number of polynomials (dimension of counterdomain) More... | |
size_type | dimension () const |
returns number of variables of the polynomial More... | |
size_type | degree () const |
returns degree of the polynomial More... | |
Object & | operator() (size_type i, const Multipointer &mp) |
selection of coefficient of i-th component that correspond to multipointer mp More... | |
Object & | operator() (size_type i, const Multipointer &, const Multipointer &) |
Object & | operator() (size_type i, const Multiindex &mi) |
selection of coefficient of i-th component that correspond to multiindex mi More... | |
const Object & | operator() (size_type i, const Multipointer &) const |
selection of coefficient of i-th component that correspond to multipointer mp More... | |
const Object & | operator() (size_type i, const Multipointer &, const Multipointer &) const |
const Object & | operator() (size_type i, const Multiindex &) const |
selection of coefficient of i-th component that correspond to multiindex mi More... | |
Object & | operator() (size_type i) |
returns constant term of the i-th component of polynomial More... | |
Object & | operator() (size_type i, size_type j) |
returns reference to a coefficient in linear part, i.e. More... | |
Object & | operator() (size_type i, size_type j, size_type c) |
returns reference to a coefficient in second order part, i.e. More... | |
Object & | operator() (size_type i, size_type j, size_type c, size_type k) |
returns reference to a coefficient in third order part, i.e. More... | |
const Object & | operator() (size_type i) const |
returns constant term of the i-th component of polynomial More... | |
const Object & | operator() (size_type i, size_type j) const |
returns read only reference to a coefficient in linear part, i.e. More... | |
const Object & | operator() (size_type i, size_type j, size_type c) const |
returns read only reference to a coefficient in second order part, i.e. More... | |
const Object & | operator() (size_type i, size_type j, size_type c, size_type k) const |
returns read only reference to a coefficient in third order part, i.e. More... | |
iterator | begin (size_type i) |
iterator selection. Returns iterator to the first coefficient of the i-th component More... | |
iterator | end (size_type i) |
iterator selection. Returns iterator to an element after the last element the i-th component More... | |
iterator | begin (size_type i, size_type d) |
iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd' More... | |
iterator | end (size_type i, size_type d) |
iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd' More... | |
const_iterator | begin (size_type i) const |
iterator selection. Returns iterator to the first coefficient of the i-th component More... | |
const_iterator | end (size_type i) const |
iterator selection. Returns iterator to an element after the last element the i-th component More... | |
const_iterator | begin (size_type i, size_type d) const |
iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd' More... | |
const_iterator | end (size_type i, size_type d) const |
iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd' More... | |
Multipointer | first (size_type d) const |
Selection of elements by multipointers. More... | |
bool | hasNext (Multipointer &) const |
see description of the method first. More... | |
bool | hasNext (Multiindex &) const |
see description of the method first. More... | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
reverse_iterator | rbegin () |
const_reverse_iterator | rbegin () const |
reverse_iterator | rend () |
const_reverse_iterator | rend () const |
void | resize (size_type newCapacity) |
ScalarType & | operator[] (size_type) |
const ScalarType & | operator[] (size_type) const |
ScalarType & | operator() (size_type) |
const ScalarType & | operator() (size_type) const |
void | clear () |
Static Public Member Functions | |
static size_type | size () |
Protected Attributes | |
size_type | m_N |
number of variables More... | |
size_type | m_M |
number of components More... | |
size_type | m_D |
total degree of polynomial More... | |
ScalarType | data [capacity] |
Friends | |
void | swap (CnContainer &A, CnContainer &B) |
The class is used to store coefficients of a multivariate polynomial of degree D Coefficients themselves can be polynomials as well.
Usually Object = Scalar or an univariate polynomial
The total number of coefficients is equal to
typedef capd::vectalg::Container<Object,M*N*D!=0 ? M*Binomial<N+D,D>::value : 0> capd::diffAlgebra::CnContainer< Object, M, N, D >::BaseContainer |
typedef const Object* capd::diffAlgebra::CnContainer< Object, M, N, D >::const_iterator |
|
inherited |
typedef __difference_type capd::diffAlgebra::CnContainer< Object, M, N, D >::difference_type |
typedef Object* capd::diffAlgebra::CnContainer< Object, M, N, D >::iterator |
typedef capd::vectalg::Multiindex capd::diffAlgebra::CnContainer< Object, M, N, D >::Multiindex |
typedef capd::vectalg::Multipointer capd::diffAlgebra::CnContainer< Object, M, N, D >::Multipointer |
typedef Object capd::diffAlgebra::CnContainer< Object, M, N, D >::ObjectType |
|
inherited |
|
inherited |
typedef __size_type capd::diffAlgebra::CnContainer< Object, M, N, D >::size_type |
|
inline |
creates a container for polynomial of n variables, m components and degree d. Each element will be set to p.
|
inline |
creates a container for polynomial of n variables, m components and degree d. Default constructor will be used to initialize each element in the container.
|
default |
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inline |
iterator selection. Returns iterator to the first coefficient of the i-th component
|
inline |
iterator selection. Returns iterator to the first coefficient of the i-th component
|
inline |
iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd'
|
inline |
iterator selection. Returns iterator to the first coefficient of the i-th component of the homogeneous part of degree 'd'
|
inherited |
|
inline |
returns degree of the polynomial
|
inline |
returns number of variables of the polynomial
|
inlineinherited |
|
inlineinherited |
|
inline |
iterator selection. Returns iterator to an element after the last element the i-th component
|
inline |
iterator selection. Returns iterator to an element after the last element the i-th component
|
inline |
iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd'
|
inline |
iterator selection. Returns iterator to an element after the last coefficient of the i-th component of the homogeneous part of degree 'd'
|
inline |
Selection of elements by multipointers.
Resizes CnContainer.
Iterators do not give information about the index of partial derivative. Access by multipointer is significantly slower than by iterator because the multipointer must be recomputed to the index in array.
Typical usage of multipointers is as follows: Multipointer mp = cnContainer.first(d); int i = ...; // fix i-th component do{ // do something cout << mp << "\t" << cnContainer(i,mp) << endl; }while(cnContainer.hasNext(mp));
Iterators and multipointers read coefficients of a homogeneous polynomial in the same order.
newRank | new maximal order |
newDimension | new dimension |
copyData | flag that controls if data is copied |
bool capd::diffAlgebra::CnContainer< Object, M, N, D >::hasNext | ( | Multiindex & | mp | ) | const |
see description of the method first.
bool capd::diffAlgebra::CnContainer< Object, M, N, D >::hasNext | ( | Multipointer & | mp | ) | const |
see description of the method first.
|
inline |
returns number of polynomials (dimension of counterdomain)
|
inline |
returns constant term of the i-th component of polynomial
|
inline |
returns constant term of the i-th component of polynomial
|
inline |
selection of coefficient of i-th component that correspond to multiindex mi
|
inline |
selection of coefficient of i-th component that correspond to multiindex mi
|
inline |
selection of coefficient of i-th component that correspond to multipointer mp
|
inline |
|
inline |
|
inline |
selection of coefficient of i-th component that correspond to multipointer mp
|
inline |
returns reference to a coefficient in linear part, i.e.
|
inline |
returns read only reference to a coefficient in linear part, i.e.
|
inline |
returns reference to a coefficient in second order part, i.e.
|
inline |
returns read only reference to a coefficient in second order part, i.e.
|
inline |
returns reference to a coefficient in third order part, i.e.
|
inline |
returns read only reference to a coefficient in third order part, i.e.
|
inlineinherited |
|
inlineinherited |
|
inline |
|
default |
CnContainer< Object, M, N, D > & capd::diffAlgebra::CnContainer< Object, M, N, D >::operator= | ( | const Object & | p | ) |
assigns object p to each element of the container
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inherited |
|
inlinestaticinherited |
|
friend |
< swaps the content of two containers
|
protectedinherited |
|
protected |
total degree of polynomial
|
protected |
number of components
|
protected |
number of variables