Arageli::sparse_polynom< F, I, REFCNT > Class Template Reference

#include <sparse_polynom.hpp>

Inheritance diagram for Arageli::sparse_polynom< F, I, REFCNT >:

Arageli::sparse_polynom_base List of all members.

Public Types

typedef F coef_type
 Тип коэффициентов полинома.
typedef I degree_type
 Тип степени полинома.
typedef monom< F, I > monom
 Моном, использующийся для построения полинома.
Iterators.
typedef Rep::iterator monom_iterator
 This iterator represents polynomial as a sequence of monoms. Non-constant form.
typedef Rep::const_iterator monom_const_iterator
 This iterator represents polynomial as a sequence of monoms. Constant form.
typedef apply_iterator< coef_type,
monom_iterator, coef_extractor<
monom > > 
coef_iterator
 This iterator represents a coefficients sequence of polynomial. Non-constant form.
typedef apply_iterator< const
coef_type, monom_const_iterator,
coef_extractor< monom > > 
coef_const_iterator
 This iterator represents a coefficients sequence of polynomial. Constant form.
typedef apply_iterator< degree_type,
monom_iterator, degree_extractor<
monom > > 
degree_iterator
 This iterator represents a degrees sequence of polynomial. Non-constant form.
typedef apply_iterator< const
degree_type, monom_const_iterator,
degree_extractor< monom > > 
degree_const_iterator
 This iterator represents a degrees sequence of polynomial. Constant form.

Public Member Functions

 sparse_polynom ()
 Нулевой полином (не содержит ни одного монома).
 sparse_polynom (const F &x)
 Полином состоящий из одного монома 'monom(x)',.
 sparse_polynom (const F &x, const I &p)
 Полином состоящий из одного монома monom(x, p).
template<typename F1, typename I1>
 sparse_polynom (const Arageli::monom< F1, I1 > &x)
 Полином состоящий из одного монома x.
template<typename F1, typename I1, bool REFCNT1>
 sparse_polynom (const sparse_polynom< F1, I1, REFCNT1 > &x)
 Creates a copy of the some object of type sparse_polynom.
template<typename In>
 sparse_polynom (In first, In last, const any_monom_seq_t &)
 Инициализирует полином произвольной последовательностью мономов.
template<typename In>
 sparse_polynom (In first, In last, const norm_monom_seq_t &)
 Инициализирует полином "нормализованной" последовательностью мономов.
 sparse_polynom (const char *str)
 Initializes sparse_polynom by its string notation.
template<typename F1, typename I1, bool REFCNT1>
sparse_polynomoperator= (const sparse_polynom< F1, I1, REFCNT1 > &x)
 Creates a copy of polynomial x.
template<typename F1, typename I1>
sparse_polynomoperator= (const Arageli::monom< F1, I1 > &x)
template<typename F1>
sparse_polynomoperator= (const F1 &x)
sparse_polynomoperator= (const char *s)
bool is_null () const
 Returns true if this is zeroth polynomial.
bool is_unit () const
 Returns true if polynomial has only absolute term that equal to 1.
bool is_opposite_unit () const
 Returns true if polynomial has only absolute term that equal to -1.
bool is_const () const
 Returns true if polynomial have no monoms with positive degree of x.
bool is_x () const
 Returns true if polynomial is "x".
bool is_normal () const
 Returns true if polynomial has normal form.
monomleading_monom ()
 Returns non-const reference to monom with the greatest degree.
const monomleading_monom () const
 Returns const reference to monom with the greatest degree.
monom leading_monom_cpy () const
 Returns a copy of monom with the greatest degree.
template<typename Factory_degree>
degree_type degree (const Factory_degree &fctr) const
 Returns degree of polynomial (greatest degree value).
degree_type degree () const
 Returns degree of polynomial (greatest degree value).
Rep::size_type size () const
 Returns number of monoms in polynomial.
coef_typeleading_coef ()
 Returns non-const reference to coefficient of monom with the greatest degree.
const coef_typeleading_coef () const
 Returns const reference to coefficient of monom with the greatest degree.
coef_type leading_coef_cpy () const
 Returns a copy of coefficient of monom with the greatest degree.
template<typename Factory_coef>
coef_type leading_coef_cpy (const Factory_coef &fctr) const
 Returns a copy of coefficient of monom with the greatest degree.
void unique ()
 Makes an individual representation for this object.
void unique_clear ()
 Makes an individual or a clean individual representation for this object.
sparse_polynomopposite ()
 Opposites all coefficients of polynomial.
sparse_polynom operator- () const
 Returns opposite polynomial.
const sparse_polynomoperator+ () const
 Returns reference to this sparse_polynom. For sameness only.
sparse_polynomoperator++ ()
sparse_polynom operator++ (int)
sparse_polynomoperator-- ()
sparse_polynom operator-- (int)
template<typename T1>
sparse_polynomadd_scalar (const T1 &x)
template<typename T1>
sparse_polynomsub_scalar (const T1 &x)
template<typename T1>
sparse_polynommul_scalar (const T1 &x)
template<typename T1>
sparse_polynomdiv_scalar (const T1 &x)
template<typename T1>
sparse_polynommod_scalar (const T1 &x)
template<typename T1>
sparse_polynombitand_scalar (const T1 &x)
template<typename T1>
sparse_polynombitor_scalar (const T1 &x)
template<typename T1>
sparse_polynombitxor_scalar (const T1 &x)
template<typename T1>
sparse_polynomshl_scalar (const T1 &x)
template<typename T1>
sparse_polynomshr_scalar (const T1 &x)
template<typename T1>
sparse_polynomadd_sparse_polynom (const T1 &x)
template<typename T1>
sparse_polynomsub_sparse_polynom (const T1 &x)
template<typename T1>
sparse_polynommul_sparse_polynom (const T1 &x)
template<typename T1>
sparse_polynomdiv_sparse_polynom (const T1 &x)
template<typename T1>
sparse_polynommod_sparse_polynom (const T1 &x)
template<typename I1>
*sparse_polynompow (const I1 &n)
 Raise this polynomial to a power n.
void normalize ()
 Polynomial normalization.
template<typename F1, typename I1, bool REFCNT1>
void swap (sparse_polynom< F1, I1, REFCNT1 > &x)
 Swaps two polynomials without actually copying (if possible).
template<typename F1, typename Coef_factory>
F1 subs (const F1 &x, const Coef_factory &) const
 Variable substitution.
template<typename F1>
F1 subs (const F1 &x) const
 Variable substitution.
Standard mathematical operations with polynomial and scalar.
template<typename F1>
sparse_polynomoperator+= (const F1 &x)
template<typename F1>
sparse_polynomoperator-= (const F1 &x)
template<typename F1>
sparse_polynomoperator *= (const F1 &x)
template<typename F1>
sparse_polynomoperator/= (const F1 &x)
template<typename F1>
sparse_polynomoperator%= (const F1 &x)
template<typename F1>
sparse_polynomoperator &= (const F1 &x)
template<typename F1>
sparse_polynomoperator|= (const F1 &x)
template<typename F1>
sparse_polynomoperator^= (const F1 &x)
template<typename F1>
sparse_polynomoperator<<= (const F1 &x)
template<typename F1>
sparse_polynomoperator>>= (const F1 &x)
sparse_polynomoperator+= (const F &x)
sparse_polynomoperator-= (const F &x)
sparse_polynomoperator *= (const F &x)
sparse_polynomoperator/= (const F &x)
sparse_polynomoperator%= (const F &x)
sparse_polynomoperator &= (const F &x)
sparse_polynomoperator|= (const F &x)
sparse_polynomoperator^= (const F &x)
sparse_polynomoperator<<= (const F &x)
sparse_polynomoperator>>= (const F &x)
Standard mathematical operations with polynomial and monom.
template<typename F1, typename I1>
sparse_polynomoperator+= (const Arageli::monom< F1, I1 > &x)
template<typename F1, typename I1>
sparse_polynomoperator-= (const Arageli::monom< F1, I1 > &x)
template<typename F1, typename I1>
sparse_polynomoperator *= (const Arageli::monom< F1, I1 > &x)
template<typename F1, typename I1>
sparse_polynomoperator/= (const Arageli::monom< F1, I1 > &x)
template<typename F1, typename I1>
sparse_polynomoperator%= (const Arageli::monom< F1, I1 > &x)
Standard mathematical operations with two polynomials.
template<typename F1, typename I1, bool REFCNT1>
sparse_polynomoperator+= (const sparse_polynom< F1, I1, REFCNT1 > &x)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynomoperator-= (const sparse_polynom< F1, I1, REFCNT1 > &x)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynomoperator *= (const sparse_polynom< F1, I1, REFCNT1 > &x)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynomoperator/= (const sparse_polynom< F1, I1, REFCNT1 > &x)
template<typename F1, typename I1, bool REFCNT1>
sparse_polynomoperator%= (const sparse_polynom< F1, I1, REFCNT1 > &x)
Access via iterators.
monom_iterator monoms_begin ()
 Returns iterator on the begin of a monom sequence.
monom_const_iterator monoms_begin () const
 Returns iterator on the begin of a monom sequence.
monom_iterator monoms_end ()
 Returns iterator on the end of a monom sequence.
monom_const_iterator monoms_end () const
 Returns iterator on the end of a monom sequence.
coef_iterator coefs_begin ()
 Returns iterator on the begin of a coefficient sequence.
coef_const_iterator coefs_begin () const
 Returns iterator on the begin of a coefficient sequence.
coef_iterator coefs_end ()
 Returns iterator on the end of a coefficient sequence.
coef_const_iterator coefs_end () const
 Returns iterator on the end of a coefficient sequence.
degree_iterator degrees_begin ()
 Returns iterator on the begin of a degree sequence.
degree_const_iterator degrees_begin () const
 Returns iterator on the begin of a degree sequence.
degree_iterator degrees_end ()
 Returns iterator on the end of a degree sequence.
degree_const_iterator degrees_end () const
 Returns iterator on the end of a degree sequence.
Inserting and erasing monoms.
monom_iterator erase (monom_iterator pos)
 Erases the monom by iterator pos.
monom_iterator erase (monom_iterator first, monom_iterator last)
 Erases all monoms in iterator range [first, last).
template<typename F1, typename I1>
monom_iterator insert (monom_iterator pos, const Arageli::monom< F1, I1 > &x)
 Inserts the monom x before monom by pos in monom sequence.
template<typename Iter>
void insert (monom_iterator pos, Iter first, Iter last)
 Inserts monoms in range (first, last] before monom by pos in monom sequence.
Addition and subtraction of the some free monom sequence.
template<typename Iter>
void add (Iter first, Iter last, const any_monom_seq_t &)
template<typename Iter>
void add (Iter first, Iter last, const norm_monom_seq_t &)
template<typename Iter>
void sub (Iter first, Iter last, const any_monom_seq_t &)
template<typename Iter>
void sub (Iter first, Iter last, const norm_monom_seq_t &)
Monoms moving without actually copying (if possible).
template<typename F1, typename I1, bool REFCNT1>
void addsub (sparse_polynom< F1, I1, REFCNT1 > &x, typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator pos)
template<bool REFCNT1>
void addsub (sparse_polynom< F, I, REFCNT1 > &x, typename sparse_polynom< F, I, REFCNT1 >::monom_iterator pos)
template<typename F1, typename I1, bool REFCNT1>
void addsub (sparse_polynom< F1, I1, REFCNT1 > &x, typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator first, typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator last, const any_monom_seq_t &)
template<bool REFCNT1>
void addsub (sparse_polynom< F, I, REFCNT1 > &x, typename sparse_polynom< F, I, REFCNT1 >::monom_iterator first, typename sparse_polynom< F, I, REFCNT1 >::monom_iterator last, const any_monom_seq_t &)
template<typename F1, typename I1, bool REFCNT1>
void addsub (sparse_polynom< F1, I1, REFCNT1 > &x, typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator first, typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator last, const norm_monom_seq_t &)
template<bool REFCNT1>
void addsub (sparse_polynom< F, I, REFCNT1 > &x, typename sparse_polynom< F, I, REFCNT1 >::monom_iterator first, typename sparse_polynom< F, I, REFCNT1 >::monom_iterator last, const norm_monom_seq_t &)
template<typename F1, typename I1, bool REFCNT1>
void addsub (sparse_polynom< F1, I1, REFCNT1 > &x, const any_monom_seq_t &)
template<bool REFCNT1>
void addsub (sparse_polynom< F, I, REFCNT1 > &x, const any_monom_seq_t &)
template<typename F1, typename I1, bool REFCNT1>
void addsub (sparse_polynom< F1, I1, REFCNT1 > &x, const norm_monom_seq_t &)
template<bool REFCNT1>
void addsub (sparse_polynom< F, I, REFCNT1 > &x, const norm_monom_seq_t &)

Static Public Attributes

static const bool refcounting = REFCNT
 Признак включённого счётчика ссылок.

Classes

struct  other_coef

Detailed Description

template<typename F, typename I, bool REFCNT>
class Arageli::sparse_polynom< F, I, REFCNT >

Definition at line 907 of file sparse_polynom.hpp.


Member Typedef Documentation

template<typename F, typename I, bool REFCNT>
typedef apply_iterator<const coef_type, monom_const_iterator, coef_extractor<monom> > Arageli::sparse_polynom< F, I, REFCNT >::coef_const_iterator

This iterator represents a coefficients sequence of polynomial. Constant form.

Definition at line 1402 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef apply_iterator<coef_type, monom_iterator, coef_extractor<monom> > Arageli::sparse_polynom< F, I, REFCNT >::coef_iterator

This iterator represents a coefficients sequence of polynomial. Non-constant form.

Definition at line 1398 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef F Arageli::sparse_polynom< F, I, REFCNT >::coef_type

Тип коэффициентов полинома.

Definition at line 916 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef apply_iterator<const degree_type, monom_const_iterator, degree_extractor<monom> > Arageli::sparse_polynom< F, I, REFCNT >::degree_const_iterator

This iterator represents a degrees sequence of polynomial. Constant form.

Definition at line 1410 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef apply_iterator<degree_type, monom_iterator, degree_extractor<monom> > Arageli::sparse_polynom< F, I, REFCNT >::degree_iterator

This iterator represents a degrees sequence of polynomial. Non-constant form.

Definition at line 1406 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef I Arageli::sparse_polynom< F, I, REFCNT >::degree_type

Тип степени полинома.

Definition at line 919 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef monom<F, I> Arageli::sparse_polynom< F, I, REFCNT >::monom

Моном, использующийся для построения полинома.

Definition at line 922 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef Rep::const_iterator Arageli::sparse_polynom< F, I, REFCNT >::monom_const_iterator

This iterator represents polynomial as a sequence of monoms. Constant form.

Definition at line 1394 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
typedef Rep::iterator Arageli::sparse_polynom< F, I, REFCNT >::monom_iterator

This iterator represents polynomial as a sequence of monoms. Non-constant form.

Definition at line 1391 of file sparse_polynom.hpp.


Constructor & Destructor Documentation

template<typename F, typename I, bool REFCNT>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom (  )  [inline]

Нулевой полином (не содержит ни одного монома).

Definition at line 940 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom ( const F &  x  )  [inline]

Полином состоящий из одного монома 'monom(x)',.

если 'x' -- нулевой элемент, то результат эквивалентен sparse_polynom()

Definition at line 944 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom ( const F &  x,
const I &  p 
) [inline]

Полином состоящий из одного монома monom(x, p).

Если 'x' равен нулю, то результат эквивалентен sparse_polynom()

Definition at line 948 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom ( const Arageli::monom< F1, I1 > &  x  )  [inline]

Полином состоящий из одного монома x.

Если 'x' -- нулевой моном, то результат эквивалентен sparse_polynom().

Definition at line 956 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom ( const sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Creates a copy of the some object of type sparse_polynom.

Definition at line 962 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename In>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom ( In  first,
In  last,
const any_monom_seq_t  
) [inline]

Инициализирует полином произвольной последовательностью мономов.

Definition at line 971 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename In>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom ( In  first,
In  last,
const norm_monom_seq_t  
) [inline]

Инициализирует полином "нормализованной" последовательностью мономов.

Последовательность отсортированна по возростанию степеней, не содержbn мономов с одинаковыми степенями и мономов с нулевыми коэффициентами.

Definition at line 983 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
Arageli::sparse_polynom< F, I, REFCNT >::sparse_polynom ( const char *  str  ) 

Initializes sparse_polynom by its string notation.

Input rules are the same as for operator>> with default behaviour.


Member Function Documentation

template<typename F, typename I, bool REFCNT>
template<typename Iter>
void Arageli::sparse_polynom< F, I, REFCNT >::add ( Iter  first,
Iter  last,
const norm_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<typename Iter>
void Arageli::sparse_polynom< F, I, REFCNT >::add ( Iter  first,
Iter  last,
const any_monom_seq_t  
)

The third argument set restrictions on monoms sequence in range [first, last).

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::add_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::add_sparse_polynom ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F, I, REFCNT1 > &  x,
const norm_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F1, I1, REFCNT1 > &  x,
const norm_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F, I, REFCNT1 > &  x,
const any_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F1, I1, REFCNT1 > &  x,
const any_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F, I, REFCNT1 > &  x,
typename sparse_polynom< F, I, REFCNT1 >::monom_iterator  first,
typename sparse_polynom< F, I, REFCNT1 >::monom_iterator  last,
const norm_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F1, I1, REFCNT1 > &  x,
typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator  first,
typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator  last,
const norm_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F, I, REFCNT1 > &  x,
typename sparse_polynom< F, I, REFCNT1 >::monom_iterator  first,
typename sparse_polynom< F, I, REFCNT1 >::monom_iterator  last,
const any_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F1, I1, REFCNT1 > &  x,
typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator  first,
typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator  last,
const any_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F, I, REFCNT1 > &  x,
typename sparse_polynom< F, I, REFCNT1 >::monom_iterator  pos 
)

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::addsub ( sparse_polynom< F1, I1, REFCNT1 > &  x,
typename sparse_polynom< F1, I1, REFCNT1 >::monom_iterator  pos 
)

Функции 'addsub' производят перенос мономов из одного полинома в другой (из 'x' в 'this'). Т.е. из 'x' они вычитаются, а к 'this' прибавляются. Если это возможно (зависит от соотношения пар типов (F, I) этих полиномов и значений), то мономы перемещаются без копирования. Входные последовательности могут быть как сортированными так и несортированными.

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::bitand_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::bitor_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::bitxor_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
coef_const_iterator Arageli::sparse_polynom< F, I, REFCNT >::coefs_begin (  )  const [inline]

Returns iterator on the begin of a coefficient sequence.

Definition at line 1445 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
coef_iterator Arageli::sparse_polynom< F, I, REFCNT >::coefs_begin (  )  [inline]

Returns iterator on the begin of a coefficient sequence.

Definition at line 1441 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
coef_const_iterator Arageli::sparse_polynom< F, I, REFCNT >::coefs_end (  )  const [inline]

Returns iterator on the end of a coefficient sequence.

Definition at line 1453 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
coef_iterator Arageli::sparse_polynom< F, I, REFCNT >::coefs_end (  )  [inline]

Returns iterator on the end of a coefficient sequence.

Definition at line 1449 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
degree_type Arageli::sparse_polynom< F, I, REFCNT >::degree (  )  const [inline]

Returns degree of polynomial (greatest degree value).

For zeroth polynomial returns -1 from factory.

Definition at line 1122 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename Factory_degree>
degree_type Arageli::sparse_polynom< F, I, REFCNT >::degree ( const Factory_degree &  fctr  )  const [inline]

Returns degree of polynomial (greatest degree value).

For zeroth polynomial returns -1 from factory.

Definition at line 1110 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
degree_const_iterator Arageli::sparse_polynom< F, I, REFCNT >::degrees_begin (  )  const [inline]

Returns iterator on the begin of a degree sequence.

Definition at line 1461 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
degree_iterator Arageli::sparse_polynom< F, I, REFCNT >::degrees_begin (  )  [inline]

Returns iterator on the begin of a degree sequence.

Definition at line 1457 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
degree_const_iterator Arageli::sparse_polynom< F, I, REFCNT >::degrees_end (  )  const [inline]

Returns iterator on the end of a degree sequence.

Definition at line 1469 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
degree_iterator Arageli::sparse_polynom< F, I, REFCNT >::degrees_end (  )  [inline]

Returns iterator on the end of a degree sequence.

Definition at line 1465 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::div_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::div_sparse_polynom ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
monom_iterator Arageli::sparse_polynom< F, I, REFCNT >::erase ( monom_iterator  first,
monom_iterator  last 
) [inline]

Erases all monoms in iterator range [first, last).

Definition at line 1483 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
monom_iterator Arageli::sparse_polynom< F, I, REFCNT >::erase ( monom_iterator  pos  )  [inline]

Erases the monom by iterator pos.

Definition at line 1479 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename Iter>
void Arageli::sparse_polynom< F, I, REFCNT >::insert ( monom_iterator  pos,
Iter  first,
Iter  last 
) [inline]

Inserts monoms in range (first, last] before monom by pos in monom sequence.

Note that is_normal property is maybe lost after the operation.

Definition at line 1497 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
monom_iterator Arageli::sparse_polynom< F, I, REFCNT >::insert ( monom_iterator  pos,
const Arageli::monom< F1, I1 > &  x 
) [inline]

Inserts the monom x before monom by pos in monom sequence.

Note that is_normal property is maybe lost after the operation.

Definition at line 1490 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
bool Arageli::sparse_polynom< F, I, REFCNT >::is_const (  )  const [inline]

Returns true if polynomial have no monoms with positive degree of x.

Definition at line 1050 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
bool Arageli::sparse_polynom< F, I, REFCNT >::is_normal (  )  const

Returns true if polynomial has normal form.

Normal form of polynomial has ascending sorted (by degrees) monom sequence and all monoms have different degrees and nonzero coefficients.

template<typename F, typename I, bool REFCNT>
bool Arageli::sparse_polynom< F, I, REFCNT >::is_null (  )  const [inline]

Returns true if this is zeroth polynomial.

I.e. returns true if polynomial does not containes any monoms.

Definition at line 1026 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
bool Arageli::sparse_polynom< F, I, REFCNT >::is_opposite_unit (  )  const [inline]

Returns true if polynomial has only absolute term that equal to -1.

Definition at line 1042 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
bool Arageli::sparse_polynom< F, I, REFCNT >::is_unit (  )  const [inline]

Returns true if polynomial has only absolute term that equal to 1.

Definition at line 1034 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
bool Arageli::sparse_polynom< F, I, REFCNT >::is_x (  )  const [inline]

Returns true if polynomial is "x".

Returns true if polynomial contains only one monom with degree = 1 and coefficient = 1.

Definition at line 1060 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
const coef_type& Arageli::sparse_polynom< F, I, REFCNT >::leading_coef (  )  const [inline]

Returns const reference to coefficient of monom with the greatest degree.

Requirement: !is_null().

Definition at line 1143 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
coef_type& Arageli::sparse_polynom< F, I, REFCNT >::leading_coef (  )  [inline]

Returns non-const reference to coefficient of monom with the greatest degree.

Requirement: !is_null().

Definition at line 1138 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename Factory_coef>
coef_type Arageli::sparse_polynom< F, I, REFCNT >::leading_coef_cpy ( const Factory_coef &  fctr  )  const [inline]

Returns a copy of coefficient of monom with the greatest degree.

For zeroth polynomial returns zero from factory.

Definition at line 1161 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
coef_type Arageli::sparse_polynom< F, I, REFCNT >::leading_coef_cpy (  )  const [inline]

Returns a copy of coefficient of monom with the greatest degree.

For zeroth polynomial returns zero from dafault factory.

Definition at line 1148 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
const monom& Arageli::sparse_polynom< F, I, REFCNT >::leading_monom (  )  const [inline]

Returns const reference to monom with the greatest degree.

Requirement: !is_null().

Definition at line 1086 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
monom& Arageli::sparse_polynom< F, I, REFCNT >::leading_monom (  )  [inline]

Returns non-const reference to monom with the greatest degree.

Requirement: !is_null().

Definition at line 1075 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
monom Arageli::sparse_polynom< F, I, REFCNT >::leading_monom_cpy (  )  const [inline]

Returns a copy of monom with the greatest degree.

For zeroth polynomial returns zero monom.

Definition at line 1096 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::mod_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::mod_sparse_polynom ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
monom_const_iterator Arageli::sparse_polynom< F, I, REFCNT >::monoms_begin (  )  const [inline]

Returns iterator on the begin of a monom sequence.

Definition at line 1432 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
monom_iterator Arageli::sparse_polynom< F, I, REFCNT >::monoms_begin (  )  [inline]

Returns iterator on the begin of a monom sequence.

В нормализованном полиноме мономы расположены в порядке возростания их степеней. Последовательности коэффициентов и степеней соответсвуют последовательности мономов. ПРЕДУПРЕЖДЕНИЕ! При вызове неконстантной функции всегда вызывается unique, но при использовании любого итератора эта функция никогда не вызывается. Поэтому при включенном счётчике ссылок не рекомендуется делать копий полинома если существует хотя бы один неконстантный итератор, т.к. изменение полинома через этот итератор повлечёт за собой изменение всех или некоторых его копий.

Definition at line 1429 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
monom_const_iterator Arageli::sparse_polynom< F, I, REFCNT >::monoms_end (  )  const [inline]

Returns iterator on the end of a monom sequence.

Definition at line 1438 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
monom_iterator Arageli::sparse_polynom< F, I, REFCNT >::monoms_end (  )  [inline]

Returns iterator on the end of a monom sequence.

Definition at line 1435 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::mul_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::mul_sparse_polynom ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
void Arageli::sparse_polynom< F, I, REFCNT >::normalize (  ) 

Polynomial normalization.

Приводит мономы в полиноме к нормальному виду: приводит подобные члены, удаляет нулевые мономы, сортирует их по возростанию степеней.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator &= ( const F &  x  )  [inline]

Definition at line 1315 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator &= ( const F1 &  x  )  [inline]

Definition at line 1294 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator *= ( const sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Definition at line 1362 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator *= ( const Arageli::monom< F1, I1 > &  x  ) 

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator *= ( const F &  x  )  [inline]

Definition at line 1312 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator *= ( const F1 &  x  )  [inline]

Definition at line 1285 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator%= ( const sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Definition at line 1370 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator%= ( const Arageli::monom< F1, I1 > &  x  )  [inline]

Definition at line 1343 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator%= ( const F &  x  )  [inline]

Definition at line 1314 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator%= ( const F1 &  x  )  [inline]

Definition at line 1291 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
const sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator+ (  )  const [inline]

Returns reference to this sparse_polynom. For sameness only.

Definition at line 1204 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom Arageli::sparse_polynom< F, I, REFCNT >::operator++ ( int   )  [inline]

Definition at line 1226 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator++ (  )  [inline]

Definition at line 1206 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator+= ( const sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Each function returns reference to this polynomial.

Definition at line 1354 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator+= ( const Arageli::monom< F1, I1 > &  x  ) 

Each function returns reference to this polynomial.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator+= ( const F &  x  )  [inline]

Definition at line 1310 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator+= ( const F1 &  x  )  [inline]

Each function returns reference to this polynomial.

Definition at line 1279 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom Arageli::sparse_polynom< F, I, REFCNT >::operator- (  )  const [inline]

Returns opposite polynomial.

Definition at line 1195 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom Arageli::sparse_polynom< F, I, REFCNT >::operator-- ( int   )  [inline]

Definition at line 1248 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator-- (  )  [inline]

Definition at line 1228 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator-= ( const sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Definition at line 1358 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator-= ( const Arageli::monom< F1, I1 > &  x  ) 

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator-= ( const F &  x  )  [inline]

Definition at line 1311 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator-= ( const F1 &  x  )  [inline]

Definition at line 1282 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator/= ( const sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Definition at line 1366 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator/= ( const Arageli::monom< F1, I1 > &  x  ) 

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator/= ( const F &  x  )  [inline]

Definition at line 1313 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator/= ( const F1 &  x  )  [inline]

Definition at line 1288 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator<<= ( const F &  x  )  [inline]

Definition at line 1318 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator<<= ( const F1 &  x  )  [inline]

Definition at line 1303 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator= ( const char *  s  )  [inline]

Definition at line 1020 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator= ( const F1 &  x  )  [inline]

Definition at line 1017 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator= ( const Arageli::monom< F1, I1 > &  x  )  [inline]

Definition at line 1013 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator= ( const sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Creates a copy of polynomial x.

Definition at line 997 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator>>= ( const F &  x  )  [inline]

Definition at line 1319 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator>>= ( const F1 &  x  )  [inline]

Definition at line 1306 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator^= ( const F &  x  )  [inline]

Definition at line 1317 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator^= ( const F1 &  x  )  [inline]

Definition at line 1300 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator|= ( const F &  x  )  [inline]

Definition at line 1316 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::operator|= ( const F1 &  x  )  [inline]

Definition at line 1297 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::opposite (  ) 

Opposites all coefficients of polynomial.

For each coefficient x calls FT::opposite(&x). Returns reference to this polynomial.

template<typename F, typename I, bool REFCNT>
template<typename I1>
* sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::pow ( const I1 &  n  )  [inline]

Raise this polynomial to a power n.

Returns reference to this polynomial.

Definition at line 1383 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::shl_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::shr_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
Rep::size_type Arageli::sparse_polynom< F, I, REFCNT >::size (  )  const [inline]

Returns number of monoms in polynomial.

Returns 0 if and only if polynomial is zeroth.

Definition at line 1134 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename Iter>
void Arageli::sparse_polynom< F, I, REFCNT >::sub ( Iter  first,
Iter  last,
const norm_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<typename Iter>
void Arageli::sparse_polynom< F, I, REFCNT >::sub ( Iter  first,
Iter  last,
const any_monom_seq_t  
)

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::sub_scalar ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename T1>
sparse_polynom& Arageli::sparse_polynom< F, I, REFCNT >::sub_sparse_polynom ( const T1 &  x  ) 

template<typename F, typename I, bool REFCNT>
template<typename F1>
F1 Arageli::sparse_polynom< F, I, REFCNT >::subs ( const F1 &  x  )  const [inline]

Variable substitution.

Computes the value of polynomial at point x.

Definition at line 2436 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename Coef_factory>
F1 Arageli::sparse_polynom< F, I, REFCNT >::subs ( const F1 &  x,
const Coef_factory &   
) const

Variable substitution.

Computes the value of polynomial at point x.

template<typename F, typename I, bool REFCNT>
template<typename F1, typename I1, bool REFCNT1>
void Arageli::sparse_polynom< F, I, REFCNT >::swap ( sparse_polynom< F1, I1, REFCNT1 > &  x  )  [inline]

Swaps two polynomials without actually copying (if possible).

Definition at line 1621 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
void Arageli::sparse_polynom< F, I, REFCNT >::unique (  )  [inline]

Makes an individual representation for this object.

If ‘refcounting’ is false then this is empty operation. Otherwise it makes so that this sparse_polynom descriptor gets individual copy of internal representation. Thus after this operation reference counter value is equal to one exactly. Returns true if the internal representation object is still the same and false if new copy has been made.

Definition at line 1179 of file sparse_polynom.hpp.

template<typename F, typename I, bool REFCNT>
void Arageli::sparse_polynom< F, I, REFCNT >::unique_clear (  )  [inline]

Makes an individual or a clean individual representation for this object.

If ‘refcounting’ is false this is empty operation. Otherwise if reference counter value is one (only this descriptor refers to) then immediate returns true. Else create for this descriptor new clean internal representation object (zeroth polynomial) and return false.

Definition at line 1187 of file sparse_polynom.hpp.


Member Data Documentation

template<typename F, typename I, bool REFCNT>
const bool Arageli::sparse_polynom< F, I, REFCNT >::refcounting = REFCNT [static]

Признак включённого счётчика ссылок.

Definition at line 925 of file sparse_polynom.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Aug 31 17:38:28 2006 for Arageli by  doxygen 1.4.7