piranha  0.10
piranha::polynomial< Cf, Key > Class Template Reference

Polynomial class. More...

#include <piranha/polynomial.hpp>

Inheritance diagram for piranha::polynomial< Cf, Key >:
[legend]
Collaboration diagram for piranha::polynomial< Cf, Key >:
[legend]

## Public Types

template<typename Cf2 >
using rebind = polynomial< Cf2, Key >
Series rebind alias.

using term_type = term< Cf, Key >
Alias for term type.

using size_type = typename container_type::size_type
Size type. More...

using const_iterator = const_iterator_impl
Const iterator. More...

## Public Member Functions

polynomial ()=default
Defaulted default constructor. More...

polynomial (const polynomial &)=default
Defaulted copy constructor.

polynomial (polynomial &&)=default
Defaulted move constructor.

template<typename Str , str_enabler< Str > = 0>
polynomial (Str &&name)
Constructor from symbol name. More...

~polynomial ()
Trivial destructor.

polynomialoperator= (const polynomial &other)=default
Copy assignment operator. More...

polynomialoperator= (polynomial &&other)=default
Move assignment operator. More...

template<typename T >
pow_ret_type< T > pow (const T &x) const
Override default exponentiation method. More...

template<typename Series = polynomial>
inverse_type< Series > invert () const
Inversion. More...

template<typename T = polynomial>
integrate_type< T > integrate (const std::string &name) const
Integration. More...

template<typename T , find_cf_enabler< T > = 0>
Cf find_cf (const T &c) const
Find coefficient. More...

template<typename T , find_cf_init_list_enabler< T > = 0>
Cf find_cf (std::initializer_list< T > l) const
Find coefficient. More...

degree_type< T > degree () const
Total degree. More...

pdegree_type< T > degree (const symbol_fset &names) const
Partial degree. More...

ldegree_type< T > ldegree () const
Total low degree. More...

pldegree_type< T > ldegree (const symbol_fset &names) const
Partial low degree. More...

polynomial< Cf, Key > truncate_degree (const T &max_degree) const
Total degree truncation. More...

polynomial< Cf, Key > truncate_degree (const T &max_degree, const symbol_fset &names) const
Partial degree truncation. More...

t_degree_type< T > t_degree () const
Trigonometric degree. More...

pt_degree_type< T > t_degree (const symbol_fset &names) const
Partial trigonometric degree. More...

t_ldegree_type< T > t_ldegree () const
Trigonometric low degree. More...

pt_ldegree_type< T > t_ldegree (const symbol_fset &names) const
Partial trigonometric low degree. More...

t_order_type< T > t_order () const
Trigonometric order. More...

pt_order_type< T > t_order (const symbol_fset &names) const
Partial trigonometric order. More...

t_lorder_type< T > t_lorder () const
Trigonometric low order. More...

pt_lorder_type< T > t_lorder (const symbol_fset &names) const
Partial trigonometric low order. More...

ipow_subs_type< T > ipow_subs (const std::string &name, const integer &n, const T &x) const
Substitution. More...

ipow_subs_type< T > ipow_subs (const std::string &name, const Int &n, const T &x) const
Substitution. More...

subs_type< T > subs (const symbol_fmap< T > &dict) const
Substitution. More...

t_subs_type< T, U > t_subs (const std::string &name, const T &c, const U &s) const
Trigonometric substitution. More...

size_type size () const
Series size. More...

bool empty () const
Empty test. More...

bool is_single_coefficient () const
Test for single-coefficient series. More...

void insert (T &&term)
Insert term. More...

void insert (T &&term)
Insert generic term with Sign = true. More...

polynomial< Cf, Key > operator+ () const
Identity operator. More...

polynomial< Cf, Key > operator- () const
Negation operator. More...

void negate ()
Negate series in-place. More...

partial_type< Series > partial (const std::string &name) const
Partial derivative. More...

const_iterator begin () const
Begin iterator. More...

const_iterator end () const
End iterator. More...

polynomial< Cf, Key > filter (std::function< bool(const std::pair< typename term_type::cf_type, polynomial< Cf, Key > > &)> func) const
Term filtering. More...

polynomial< Cf, Key > transform (std::function< std::pair< typename term_type::cf_type, polynomial< Cf, Key > >(const std::pair< typename term_type::cf_type, polynomial< Cf, Key > > &)> func) const
Term transformation. More...

polynomial< Cf, Key > trim () const
Trim. More...

void print_tex (std::ostream &os) const
Print in TeX mode. More...

std::size_t hash () const
Hash value. More...

bool is_identical (const polynomial< Cf, Key > &other) const
Check for identical series. More...

const symbol_fsetget_symbol_set () const
Symbol set getter. More...

void set_symbol_set (const symbol_fset &args)
Symbol set setter. More...

Table-querying methods

Methods to query the properties of the internal container used to store the terms.

sparsity_info_type table_sparsity () const
Table sparsity. More...

size_type table_bucket_count () const
Table bucket count. More...

Low-level interface

Low-level methods.

container_type_container ()
Get a mutable reference to the container of terms. More...

const container_type_container () const
Get a const reference to the container of terms. More...

## Static Public Member Functions

template<typename U , typename T = polynomial, at_degree_set_enabler< T, U > = 0>
static void set_auto_truncate_degree (const U &max_degree)
Set total-degree-based auto-truncation. More...

template<typename U , typename T = polynomial, at_degree_set_enabler< T, U > = 0>
static void set_auto_truncate_degree (const U &max_degree, const symbol_fset &names)
Set partial-degree-based auto-truncation. More...

template<typename T = polynomial, at_degree_enabler< T > = 0>
static void unset_auto_truncate_degree ()
Disable degree-based auto-truncation. More...

template<typename T = polynomial, at_degree_enabler< T > = 0>
static std::tuple< int, degree_type< T >, symbol_fsetget_auto_truncate_degree ()
Query the status of the degree-based auto-truncation mechanism. More...

template<typename T = polynomial, um_enabler< T > = 0>
static polynomial untruncated_multiplication (const polynomial &p1, const polynomial &p2)
Untruncated multiplication. More...

template<typename U , typename T = polynomial, tm_enabler< T, U > = 0>
static polynomial truncated_multiplication (const polynomial &p1, const polynomial &p2, const U &max_degree)
Truncated multiplication (total degree). More...

template<typename U , typename T = polynomial, tm_enabler< T, U > = 0>
static polynomial truncated_multiplication (const polynomial &p1, const polynomial &p2, const U &max_degree, const symbol_fset &names)
Truncated multiplication (partial degree). More...

static void clear_pow_cache ()
Clear the internal cache of natural powers. More...

static void register_custom_derivative (const std::string &name, F func)
Register custom partial derivative. More...

static void unregister_custom_derivative (const std::string &name)
Unregister custom partial derivative. More...

static void unregister_all_custom_derivatives ()
Unregister all custom partial derivatives. More...

## Protected Types

using container_type = hash_set< term_type >
Container type for terms.

## Protected Attributes

symbol_fset m_symbol_set
Symbol set.

container_type m_container
Terms container.

## Detailed Description

### template<typename Cf, typename Key> class piranha::polynomial< Cf, Key >

Polynomial class.

This class represents multivariate polynomials as collections of multivariate polynomial terms. Cf represents the ring over which the polynomial is defined, while Key represents the monomial type.

Polynomials support an automatic degree-based truncation mechanism, disabled by default, which comes into play during polynomial multiplication. It allows to discard automatically all those terms, generated during series multiplication, whose total or partial degree is greater than a specified limit. This mechanism can be configured via a set of thread-safe static methods, and it is enabled if:

• the total and partial degree of the series are represented by the same type D,
• all the truncation-related requirements in piranha::power_series are satsified,
• the type D is equality-comparable, subtractable and the type resulting from the subtraction is still D.

This class satisfies the piranha::is_series and piranha::is_cf type traits.

## Type requirements

Cf must be suitable for use in piranha::series as first template argument, Key must be an instance of either piranha::monomial or piranha::kronecker_monomial.

## Exception safety guarantee

This class provides the same guarantee as the base series type it derives from.

## Move semantics

Move semantics is equivalent to the move semantics of the base series type it derives from.

Definition at line 149 of file polynomial.hpp.

## ◆ const_iterator

 using piranha::series< Cf, Key, polynomial< Cf, Key > >::const_iterator = const_iterator_impl
inherited

Const iterator.

Iterator type that can be used to iterate over the terms of the series. The object returned upon dereferentiation is an std::pair in which the first element is a copy of the coefficient of the term, the second element a single-term instance of Derived constructed from the term's key and a unitary coefficient.

This iterator is an input iterator which additionally offers the multi-pass guarantee.

piranha::series::begin() and piranha::series::end().

Definition at line 1994 of file series.hpp.

## ◆ size_type

 using piranha::series< Cf, Key, polynomial< Cf, Key > >::size_type = typename container_type::size_type
inherited

Size type.

Used to represent the number of terms in the series. Equivalent to piranha::hash_set::size_type.

Definition at line 1981 of file series.hpp.

## ◆ polynomial() [1/2]

template<typename Cf , typename Key >
 piranha::polynomial< Cf, Key >::polynomial ( )
default

Defaulted default constructor.

Will construct a polynomial with zero terms.

## ◆ polynomial() [2/2]

template<typename Cf , typename Key >
template<typename Str , str_enabler< Str > = 0>
 piranha::polynomial< Cf, Key >::polynomial ( Str && name )
inlineexplicit

Constructor from symbol name.

Note
This template constructor is enabled only if the decay type of Str is a C or C++ string.

Will construct a univariate polynomial made of a single term with unitary coefficient and exponent, representing the symbolic variable name. The type of name must be a string type (either C or C++).

Parameters
 name name of the symbolic variable that the polynomial will represent.
Exceptions
 unspecified any exception thrown by: the public interface of piranha::symbol_fset, the invoked constructor of the coefficient type, the invoked constructor of the key type, the constructor of the term type from coefficient and key, piranha::series::insert().

Definition at line 480 of file polynomial.hpp.

## ◆ _container() [1/2]

 container_type& piranha::series< Cf, Key, polynomial< Cf, Key > >::_container ( )
inlineinherited

Get a mutable reference to the container of terms.

Returns
a reference to the internal container of terms.

Definition at line 2788 of file series.hpp.

## ◆ _container() [2/2]

 const container_type& piranha::series< Cf, Key, polynomial< Cf, Key > >::_container ( ) const
inlineinherited

Get a const reference to the container of terms.

Returns
a const reference to the internal container of terms.

Definition at line 2796 of file series.hpp.

## ◆ begin()

 const_iterator piranha::series< Cf, Key, polynomial< Cf, Key > >::begin ( ) const
inlineinherited

Begin iterator.

Return an iterator to the first term of the series. The returned iterator will provide, when dereferenced, an std::pair in which the first element is a copy of the coefficient of the term, whereas the second element is a single-term instance of Derived built from the term's key and a unitary coefficient.

Note that terms are stored unordered in the series, hence it is not defined which particular term will be returned by calling this method. The only guarantee is that the iterator can be used to transverse all the series' terms until piranha::series::end() is eventually reached.

Calling any non-const method on the series will invalidate the iterators obtained via piranha::series::begin() and piranha::series::end().

Returns
an iterator to the first term of the series.
Exceptions
 unspecified any exception thrown by: construction and assignment of piranha::symbol_fset, insert(), construction of term, coefficient and key instances.

Definition at line 2504 of file series.hpp.

## ◆ clear_pow_cache()

 static void piranha::series< Cf, Key, polynomial< Cf, Key > >::clear_pow_cache ( )
inlinestaticinherited

Clear the internal cache of natural powers.

This method can be used to clear the cache of natural powers of series maintained by piranha::series::pow().

Exceptions
 unspecified any exception thrown by threading primitives.

Definition at line 2371 of file series.hpp.

## ◆ degree() [1/2]

 degree_type piranha::power_series< trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > > , polynomial< Cf, Key > >::degree ( ) const
inlineinherited

Total degree.

Note
This method is available only if the requisites outlined in piranha::power_series are satisfied.

The degree of the series is the maximum degree of its terms. If the series is empty, zero will be returned.

Returns
the total degree of the series.
Exceptions
 std::overflow_error if the computation results in an overflow. unspecified any exception thrown by: the construction of return type, the calculation of the degree of each term, the assignment and less-than operators for the return type.

Definition at line 390 of file power_series.hpp.

## ◆ degree() [2/2]

 pdegree_type piranha::power_series< trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > > , polynomial< Cf, Key > >::degree ( const symbol_fset & names ) const
inlineinherited

Partial degree.

Note
This method is available only if the requisites outlined in piranha::power_series are satisfied.

The partial degree of the series is the maximum partial degree of its terms. If the series is empty, zero will be returned.

Parameters
 names names of the variables to be considered in the computation of the degree.
Returns
the partial degree of the series.
Exceptions
 std::overflow_error if the computation results in an overflow. unspecified any exception thrown by: the construction of return type, the calculation of the degree of each term, the assignment and less-than operators for the return type.

Definition at line 444 of file power_series.hpp.

## ◆ empty()

 bool piranha::series< Cf, Key, polynomial< Cf, Key > >::empty ( ) const
inlineinherited

Empty test.

Returns
true if size() is nonzero, false otherwise.

Definition at line 2103 of file series.hpp.

## ◆ end()

 const_iterator piranha::series< Cf, Key, polynomial< Cf, Key > >::end ( ) const
inlineinherited

End iterator.

Return an iterator one past the last term of the series. See the documentation of piranha::series::begin() on how the returned iterator can be used.

Returns
an iterator to the end of the series.
Exceptions
 unspecified any exception thrown by: construction and assignment of piranha::symbol_fset, insert(), construction of term, coefficient and key instances.

Definition at line 2523 of file series.hpp.

## ◆ filter()

 polynomial< Cf, Key > piranha::series< Cf, Key, polynomial< Cf, Key > >::filter ( std::function< bool(const std::pair< typename term_type::cf_type, polynomial< Cf, Key > > &)> func ) const
inlineinherited

Term filtering.

This method will apply the functor func to each term in the series, and produce a return series containing all terms in this for which func returns true. Terms are passed to func in the format resulting from dereferencing the iterators obtained via piranha::series::begin().

Parameters
 func filtering functor.
Returns
filtered series.
Exceptions
 unspecified any exception thrown by: the call operator of func, insert(), the assignment operator of piranha::symbol_fset, term, coefficient, key construction.

Definition at line 2547 of file series.hpp.

## ◆ find_cf() [1/2]

template<typename Cf , typename Key >
template<typename T , find_cf_enabler< T > = 0>
 Cf piranha::polynomial< Cf, Key >::find_cf ( const T & c ) const
inline

Find coefficient.

Note
This method is enabled only if:

This method will first construct a term with zero coefficient and key initialised from the begin/end iterators of c and the symbol set of this, and it will then try to locate the term inside this. If the term is found, its coefficient will be returned. Otherwise, a coefficient initialised from 0 will be returned.

Parameters
 c the container that will be used to construct the Key to be located.
Returns
the coefficient of the term whose Key corresponds to c if such term exists, zero otherwise.
Exceptions
 unspecified any exception thrown by: term, coefficient and key construction, piranha::hash_set::find().

Definition at line 754 of file polynomial.hpp.

## ◆ find_cf() [2/2]

template<typename Cf , typename Key >
template<typename T , find_cf_init_list_enabler< T > = 0>
 Cf piranha::polynomial< Cf, Key >::find_cf ( std::initializer_list< T > l ) const
inline

Find coefficient.

Note
This method is enabled only if Key can be constructed from the begin/end iterators of l and a piranha::symbol_fset.

This method is identical to the other overload with the same name, and it is provided for convenience.

Parameters
 l the list that will be used to construct the Key to be located.
Returns
the coefficient of the term whose Key corresponds to l if such term exists, zero otherwise.
Exceptions
 unspecified any exception thrown by the other overload.

Definition at line 774 of file polynomial.hpp.

## ◆ get_auto_truncate_degree()

template<typename Cf , typename Key >
template<typename T = polynomial, at_degree_enabler< T > = 0>
 static std::tuple, symbol_fset> piranha::polynomial< Cf, Key >::get_auto_truncate_degree ( )
inlinestatic

Query the status of the degree-based auto-truncation mechanism.

Note
This method is available only if the requisites outlined in piranha::polynomial are satisfied.

This method will return a tuple of three elements describing the status of the degree-based auto-truncation mechanism. The elements of the tuple have the following meaning:

• truncation mode (0 if disabled, 1 for total-degree truncation and 2 for partial-degree truncation),
• the maximum degree allowed,
• the list of names to be considered for partial truncation.
Returns
a tuple representing the status of the degree-based auto-truncation mechanism.
Exceptions
 unspecified any exception thrown by threading primitives or by the involved constructors.

Definition at line 727 of file polynomial.hpp.

## ◆ get_symbol_set()

 const symbol_fset& piranha::series< Cf, Key, polynomial< Cf, Key > >::get_symbol_set ( ) const
inlineinherited

Symbol set getter.

Returns
const reference to the piranha::symbol_fset associated to the series.

Definition at line 2762 of file series.hpp.

## ◆ hash()

 std::size_t piranha::series< Cf, Key, polynomial< Cf, Key > >::hash ( ) const
inlineinherited

Hash value.

The hash value for a series is zero if the series is empty, otherwise it is computed by adding the hash values of all terms. This ensures that two identical series in which the terms are stored in different order still produce the same hash value.

Note, however, that the arguments of the series are not considered in the hash value and that, in general, two series that compare equal according to operator==() will not have the same hash value (as the equality operator merges the arguments of two series before actually performing the comparison). Instead of operator==(), is_identical() should be used for storing series as keys in associative containers.

Returns
a hash value for the series.
Exceptions
 unspecified any exception thrown by computing the hash of a term.

Definition at line 2730 of file series.hpp.

## ◆ insert() [1/2]

 void piranha::series< Cf, Key, polynomial< Cf, Key > >::insert ( T && term )
inlineinherited

Insert term.

Note
This method is enabled only if the decay type of T is piranha::series::term_type.

This method will insert term into the series using internally piranha::hash_set::insert.

The insertion algorithm proceeds as follows:

• if the term is not compatible for insertion, an std::invalid_argument exception is thrown;
• if the term is ignorable, the method will return without performing any insertion;
• if the term is already in the series, then:
• its coefficient is added (if Sign is true) or subtracted (if Sign is false) to the existing term's coefficient;
• if, after the addition/subtraction the existing term is ignorable, it will be erased;
• else:
• the term is inserted into the term container and, if Sign is false, its coefficient is negated.

After any modification to an existing term in the series (e.g., via insertion with negative Sign or via in-place addition or subtraction of existing coefficients), the term will be checked again for compatibility and ignorability, and, in case the term has become incompatible or ignorable, it will be erased from the series.

The exception safety guarantee upon insertion is that the series will be left in an undefined but valid state. Such a guarantee relies on the fact that the addition/subtraction and negation methods of the coefficient type will leave the coefficient in a valid (possibly undefined) state in face of exceptions.

Parameters
 term term to be inserted.
Exceptions
 unspecified any exception thrown by: piranha::hash_set::insert(), piranha::hash_set::find(), piranha::hash_set::erase(), piranha::math::negate(), in-place addition/subtraction on coefficient types. std::invalid_argument if term is incompatible.

Definition at line 2161 of file series.hpp.

## ◆ insert() [2/2]

 void piranha::series< Cf, Key, polynomial< Cf, Key > >::insert ( T && term )
inlineinherited

Insert generic term with Sign = true.

Note
This method is enabled only if the decay type of T is piranha::series::term_type.

Convenience wrapper for the generic insert() method, with Sign set to true.

Parameters
 term term to be inserted.
Exceptions
 unspecified any exception thrown by generic insert().

Definition at line 2177 of file series.hpp.

## ◆ integrate()

template<typename Cf , typename Key >
template<typename T = polynomial>
 integrate_type piranha::polynomial< Cf, Key >::integrate ( const std::string & name ) const
inline

Integration.

Note
This method is enabled only if the algorithm described below is supported by all the involved types.

This method will attempt to compute the antiderivative of the polynomial term by term. If the term's coefficient does not depend on the integration variable, the result will be calculated via the integration of the corresponding monomial. Integration with respect to a variable appearing to the power of -1 will fail.

Otherwise, a strategy of integration by parts is attempted, its success depending on the integrability of the coefficient and on the value of the exponent of the integration variable. The integration will fail if the exponent is negative or non-integral.

Parameters
 name integration variable.
Returns
the antiderivative of this with respect to name.
Exceptions
 std::invalid_argument if the integration procedure fails. unspecified any exception thrown by: the public interface of piranha::symbol_fset, piranha::math::partial(), piranha::math::is_zero(), piranha::math::integrate(), piranha::safe_cast() and piranha::math::negate(), term construction, coefficient construction, assignment and arithmetics, integration, construction, assignment, differentiation and degree querying methods of the key type, insert(), series arithmetics.

Definition at line 591 of file polynomial.hpp.

## ◆ invert()

template<typename Cf , typename Key >
template<typename Series = polynomial>
 inverse_type piranha::polynomial< Cf, Key >::invert ( ) const
inline

Inversion.

Note
This method is enabled only if piranha::polynomial::pow(-1) is a well-formed expression.
Returns
the calling polynomial raised to -1 using piranha::polynomial::pow().
Exceptions
 unspecified any exception thrown by piranha::polynomial::pow().

Definition at line 557 of file polynomial.hpp.

## ◆ ipow_subs() [1/2]

 ipow_subs_type piranha::ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > , polynomial< Cf, Key > >::ipow_subs ( const std::string & name, const integer & n, const T & x ) const
inlineinherited

Substitution.

Note
This method is enabled only if the coefficient and/or key types support integral power substitution, and if the types involved in the substitution support the necessary arithmetic operations to compute the result.

This method will return an object resulting from the substitution of the integral power of the symbol called name in this with the generic object x.

Parameters
 name name of the symbol to be substituted. n integral power of the symbol to be substituted. x object used for the substitution.
Returns
the result of the substitution.
Exceptions
 unspecified any exception resulting from: the substitution routines for the coefficients and/or keys, the computation of the return value, piranha::series::insert().

Definition at line 224 of file ipow_substitutable_series.hpp.

## ◆ ipow_subs() [2/2]

 ipow_subs_type piranha::ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > , polynomial< Cf, Key > >::ipow_subs ( const std::string & name, const Int & n, const T & x ) const
inlineinherited

Substitution.

Note
This method is enabled only if the other ipow_subs() overload is enabled, and Int is a C++ integral type.

This is a convenience method that will call the other ipow_subs() overload after converting n to piranha::integer.

Parameters
 name name of the symbol to be substituted. n integral power of the symbol to be substituted. x object used for the substitution.
Returns
the result of the substitution.
Exceptions
 unspecified any exception resulting from calling the other ipow_subs() overload, or by constructing a piranha::integer from a C++ integral type.

Definition at line 252 of file ipow_substitutable_series.hpp.

## ◆ is_identical()

 bool piranha::series< Cf, Key, polynomial< Cf, Key > >::is_identical ( const polynomial< Cf, Key > & other ) const
inlineinherited

Check for identical series.

Note
This method is enabled only if Derived is equality-comparable.

This method will return true if the symbol sets of this and other are the same, and other == *this.

Parameters
 other argument for the comparison.
Returns
true if this and other are identical, false otherwise.
Exceptions
 unspecified any exception thrown by the comparison operator of Derived.

Definition at line 2754 of file series.hpp.

## ◆ is_single_coefficient()

 bool piranha::series< Cf, Key, polynomial< Cf, Key > >::is_single_coefficient ( ) const
inlineinherited

Test for single-coefficient series.

A series is considered to be single-coefficient when it is symbolically equivalent to a coefficient. That is, the series is either empty (in which case it is considered to be equivalent to a coefficient constructed from zero) or consisting of a single term with unitary key (in which case the series is considered equivalent to its only coefficient).

Returns
true in case of single-coefficient series, false otherwise.
Exceptions
 unspecified any exception thrown by the is_unitary() method of the key type.

Definition at line 2118 of file series.hpp.

## ◆ ldegree() [1/2]

 ldegree_type piranha::power_series< trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > > , polynomial< Cf, Key > >::ldegree ( ) const
inlineinherited

Total low degree.

Note
This method is available only if the requisites outlined in piranha::power_series are satisfied.

The low degree of the series is the minimum low degree of its terms. If the series is empty, zero will be returned.

Returns
the total low degree of the series.
Exceptions
 std::overflow_error if the computation results in an overflow. unspecified any exception thrown by: the construction of return type, the calculation of the low degree of each term, the assignment and less-than operators for the return type.

Definition at line 416 of file power_series.hpp.

## ◆ ldegree() [2/2]

 pldegree_type piranha::power_series< trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > > , polynomial< Cf, Key > >::ldegree ( const symbol_fset & names ) const
inlineinherited

Partial low degree.

Note
This method is available only if the requisites outlined in piranha::power_series are satisfied.

The partial low degree of the series is the minimum partial low degree of its terms. If the series is empty, zero will be returned.

Parameters
 names names of the variables to be considered in the computation of the low degree.
Returns
the partial low degree of the series.
Exceptions
 std::overflow_error if the computation results in an overflow. unspecified any exception thrown by: the construction of return type, the calculation of the low degree of each term, the assignment and less-than operators for the return type.

Definition at line 475 of file power_series.hpp.

## ◆ negate()

 void piranha::series< Cf, Key, polynomial< Cf, Key > >::negate ( )
inlineinherited

Negate series in-place.

This method will call math::negate() on the coefficients of all terms. In case of exceptions, the basic exception safety guarantee is provided.

If any term becomes ignorable or incompatible after negation, it will be erased from the series.

Exceptions
 unspecified any exception thrown by math::negate() on the coefficient type.

Definition at line 2214 of file series.hpp.

## ◆ operator+()

 polynomial< Cf, Key > piranha::series< Cf, Key, polynomial< Cf, Key > >::operator+ ( ) const
inlineinherited

Identity operator.

Returns
copy of this, cast to Derived.
Exceptions
 unspecified any exception thrown by the copy constructor.

Definition at line 2187 of file series.hpp.

## ◆ operator-()

 polynomial< Cf, Key > piranha::series< Cf, Key, polynomial< Cf, Key > >::operator- ( ) const
inlineinherited

Negation operator.

Returns
a copy of this on which negate() has been called.
Exceptions
 unspecified any exception thrown by: negate(), the copy constructor of Derived.

Definition at line 2199 of file series.hpp.

## ◆ operator=() [1/2]

template<typename Cf , typename Key >
 polynomial& piranha::polynomial< Cf, Key >::operator= ( const polynomial< Cf, Key > & other )
default

Copy assignment operator.

Parameters
 other the assignment argument.
Returns
a reference to this.
Exceptions
 unspecified any exception thrown by the assignment operator of the base class.

## ◆ operator=() [2/2]

template<typename Cf , typename Key >
 polynomial& piranha::polynomial< Cf, Key >::operator= ( polynomial< Cf, Key > && other )
default

Move assignment operator.

Parameters
 other the assignment argument.
Returns
a reference to this.

## ◆ partial()

 partial_type piranha::series< Cf, Key, polynomial< Cf, Key > >::partial ( const std::string & name ) const
inlineinherited

Partial derivative.

Note
This method is enabled only if the coefficient and key are differentiable (i.e., they satisfy the piranha::is_differentiable and piranha::key_is_differentiable type traits), and if the arithmetic operations needed to compute the partial derivative are supported by all the involved types.

This method will return the partial derivative of this with respect to the variable called name. The method will construct the return value from the output of the differentiation methods of coefficient and key, and via arithmetic and/or term insertion operations.

Note that, contrary to the specialisation of piranha::math::partial() for series types, this method will not take into account custom derivatives registered via piranha::series::register_custom_derivative().

Parameters
 name name of the argument with respect to which the derivative will be calculated.
Returns
partial derivative of this with respect to the symbol name.
Exceptions
 unspecified any exception thrown by: the differentiation methods of coefficient and key, term construction and insertion, arithmetic operations on the involved types, construction of the return type.

Definition at line 2405 of file series.hpp.

## ◆ pow()

template<typename Cf , typename Key >
template<typename T >
 pow_ret_type piranha::polynomial< Cf, Key >::pow ( const T & x ) const
inline

Override default exponentiation method.

Note
This method is enabled only if piranha::series::pow() can be called with exponent x and the key type can be raised to the power of x via its exponentiation method.

This exponentiation override will check if the polynomial consists of a single-term with non-unitary key. In that case, the return polynomial will consist of a single term with coefficient computed via piranha::math::pow() and key computed via the monomial exponentiation method. Otherwise, the base (i.e., default) exponentiation method will be used.

Parameters
 x exponent.
Returns
this to the power of x.
Exceptions
 unspecified any exception thrown by: the is_unitary() and exponentiation methods of the key type, piranha::math::pow(), construction of coefficient, key and term, piranha::series::insert() , piranha::series::set_symbol_set() and piranha::series::pow().

Definition at line 530 of file polynomial.hpp.

## ◆ print_tex()

 void piranha::series< Cf, Key, polynomial< Cf, Key > >::print_tex ( std::ostream & os ) const
inlineinherited

Print in TeX mode.

Print series to stream os in TeX mode. The representation is constructed in the same way as explained in piranha::series::operator<<(), but using piranha::print_tex_coefficient() and the key's TeX printing method instead of the plain printing functions.

Parameters
 os target stream.
Exceptions
 unspecified any exception thrown by: piranha::print_tex_coefficient(), the TeX printing method of the key type, memory allocation errors in standard containers, piranha::settings::get_max_term_output(), streaming to os or to instances of std::ostringstream.
operator<<().

Definition at line 2654 of file series.hpp.

## ◆ register_custom_derivative()

 static void piranha::series< Cf, Key, polynomial< Cf, Key > >::register_custom_derivative ( const std::string & name, F func )
inlinestaticinherited

Register custom partial derivative.

Note
This method is enabled only if piranha::series::partial() is enabled for Derived, and if F is a type that can be used to construct std::function<partial_type(const Derived &), where partial_type is the type resulting from the partial derivative of Derived.

Register a copy of a callable func associated to the symbol name for use by piranha::math::partial(). func will be used to compute the partial derivative of instances of type Derived with respect to name in place of the default partial differentiation algorithm.

It is safe to call this method from multiple threads.

Parameters
 name symbol for which the custom partial derivative function will be registered. func custom partial derivative function.
Exceptions
 unspecified any exception thrown by: failure(s) in threading primitives, lookup and insertion operations on std::unordered_map, construction and move-assignment of std::function.

Definition at line 2432 of file series.hpp.

## ◆ set_auto_truncate_degree() [1/2]

template<typename Cf , typename Key >
template<typename U , typename T = polynomial, at_degree_set_enabler< T, U > = 0>
 static void piranha::polynomial< Cf, Key >::set_auto_truncate_degree ( const U & max_degree )
inlinestatic

Set total-degree-based auto-truncation.

Note
This method is available only if the requisites outlined in piranha::polynomial are satisfied and if U can be safely cast to the degree type.

Setup the degree-based auto-truncation mechanism to truncate according to the total maximum degree. If the new auto truncation settings are different from the currently active ones, the natural power cache defined in piranha::series will be cleared.

Parameters
 max_degree maximum total degree that will be retained during automatic truncation.
Exceptions
 unspecified any exception thrown by: threading primitives, piranha::safe_cast(), the constructor of the degree type.

Definition at line 637 of file polynomial.hpp.

## ◆ set_auto_truncate_degree() [2/2]

template<typename Cf , typename Key >
template<typename U , typename T = polynomial, at_degree_set_enabler< T, U > = 0>
 static void piranha::polynomial< Cf, Key >::set_auto_truncate_degree ( const U & max_degree, const symbol_fset & names )
inlinestatic

Set partial-degree-based auto-truncation.

Note
This method is available only if the requisites outlined in piranha::polynomial are satisfied and if U can be safely cast to the degree type.

Setup the degree-based auto-truncation mechanism to truncate according to the partial degree. If the new auto truncation settings are different from the currently active ones, the natural power cache defined in piranha::series will be cleared.

Parameters
 max_degree maximum partial degree that will be retained during automatic truncation. names names of the variables that will be considered during the computation of the partial degree.
Exceptions
 unspecified any exception thrown by: threading primitives, piranha::safe_cast(), the constructor of the degree type, memory allocation errors in standard containers.

Definition at line 676 of file polynomial.hpp.

## ◆ set_symbol_set()

 void piranha::series< Cf, Key, polynomial< Cf, Key > >::set_symbol_set ( const symbol_fset & args )
inlineinherited

Symbol set setter.

Parameters
 args piranha::symbol_fset that will be associated to the series.
Exceptions
 std::invalid_argument if the series is not empty. unspecified any exception thrown by the copy assignment operator of piranha::symbol_fset.

Definition at line 2773 of file series.hpp.

## ◆ size()

 size_type piranha::series< Cf, Key, polynomial< Cf, Key > >::size ( ) const
inlineinherited

Series size.

Returns
the number of terms in the series.

Definition at line 2095 of file series.hpp.

## ◆ subs()

 subs_type piranha::substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > > , polynomial< Cf, Key > >::subs ( const symbol_fmap< T > & dict ) const
inlineinherited

Substitution.

Note
This method is enabled only if the coefficient and/or key types support substitution, and if the types involved in the substitution support the necessary arithmetic operations to compute the result. Also, the return type must satisfy piranha::is_returnable, and T must be suitable for use in sm_intersect_idx().

This method will return an object resulting from the substitution in this of the symbols in dict with the mapped values.

Parameters
 dict a dictionary mapping a set of symbols to the values that will be substituted for them.
Returns
the result of the substitution.
Exceptions
 unspecified any exception resulting from: the substitution routines for the coefficients and/or keys, the computation of the return value, piranha::series::insert().

Definition at line 218 of file substitutable_series.hpp.

## ◆ t_degree() [1/2]

 t_degree_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_degree ( ) const
inlineinherited

Trigonometric degree.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Returns
the total trigonometric degree of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the degree of the individual terms.

Definition at line 204 of file trigonometric_series.hpp.

## ◆ t_degree() [2/2]

 pt_degree_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_degree ( const symbol_fset & names ) const
inlineinherited

Partial trigonometric degree.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Parameters
 names the names of the variables to be considered in the computation.
Returns
the partial trigonometric degree of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the degree of the individual terms.

Definition at line 226 of file trigonometric_series.hpp.

## ◆ t_ldegree() [1/2]

 t_ldegree_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_ldegree ( ) const
inlineinherited

Trigonometric low degree.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Returns
the total trigonometric low degree of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the degree of the individual terms.

Definition at line 248 of file trigonometric_series.hpp.

## ◆ t_ldegree() [2/2]

 pt_ldegree_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_ldegree ( const symbol_fset & names ) const
inlineinherited

Partial trigonometric low degree.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Parameters
 names the names of the variables to be considered in the computation.
Returns
the partial trigonometric low degree of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the degree of the individual terms.

Definition at line 270 of file trigonometric_series.hpp.

## ◆ t_lorder() [1/2]

 t_lorder_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_lorder ( ) const
inlineinherited

Trigonometric low order.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Returns
the total trigonometric low order of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the order of the individual terms.

Definition at line 335 of file trigonometric_series.hpp.

## ◆ t_lorder() [2/2]

 pt_lorder_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_lorder ( const symbol_fset & names ) const
inlineinherited

Partial trigonometric low order.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Parameters
 names the names of the variables to be considered in the computation.
Returns
the partial trigonometric low order of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the order of the individual terms.

Definition at line 357 of file trigonometric_series.hpp.

## ◆ t_order() [1/2]

 t_order_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_order ( ) const
inlineinherited

Trigonometric order.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Returns
the total trigonometric order of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the order of the individual terms.

Definition at line 292 of file trigonometric_series.hpp.

## ◆ t_order() [2/2]

 pt_order_type piranha::trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > >::t_order ( const symbol_fset & names ) const
inlineinherited

Partial trigonometric order.

Note
This method is enabled only if the requirements outlined in piranha::trigonometric_series are satisfied.
Parameters
 names the names of the variables to be considered in the computation.
Returns
the partial trigonometric order of the series.
Exceptions
 unspecified any exception resulting from the computation and comparison of the order of the individual terms.

Definition at line 314 of file trigonometric_series.hpp.

## ◆ t_subs()

 t_subs_type piranha::t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > > , polynomial< Cf, Key > >::t_subs ( const std::string & name, const T & c, const U & s ) const
inlineinherited

Trigonometric substitution.

Note
This method is available only if the requirements outlined in piranha::t_substitutable_series are satisfied.

Trigonometric substitution is the substitution of the cosine and sine of name for c and s.

Parameters
 name name of the symbol that will be subject to substitution. c cosine of name. s sine of name.
Returns
the result of the trigonometric substitution.
Exceptions
 unspecified any exception resulting from: construction of the return type, the assignment operator of piranha::symbol_fset, term construction, arithmetics on the intermediary values needed to compute the return value, piranha::series::insert(), the substitution methods of coefficient and key.

Definition at line 219 of file t_substitutable_series.hpp.

## ◆ table_bucket_count()

 size_type piranha::series< Cf, Key, polynomial< Cf, Key > >::table_bucket_count ( ) const
inlineinherited

Table bucket count.

Returns
the bucket count of the internal container.

Definition at line 2263 of file series.hpp.

 double piranha::series< Cf, Key, polynomial< Cf, Key > >::table_load_factor ( ) const
inlineinherited

Will call piranha::hash_set::load_factor() on the internal terms container and return the result.

Returns
the load factor of the internal container.

Definition at line 2255 of file series.hpp.

## ◆ table_sparsity()

 sparsity_info_type piranha::series< Cf, Key, polynomial< Cf, Key > >::table_sparsity ( ) const
inlineinherited

Table sparsity.

Will call piranha::hash_set::evaluate_sparsity() on the internal terms container and return the result.

Returns
the output of piranha::hash_set::evaluate_sparsity().
Exceptions
 unspecified any exception thrown by piranha::hash_set::evaluate_sparsity().

Definition at line 2244 of file series.hpp.

## ◆ transform()

 polynomial< Cf, Key > piranha::series< Cf, Key, polynomial< Cf, Key > >::transform ( std::function< std::pair< typename term_type::cf_type, polynomial< Cf, Key > >(const std::pair< typename term_type::cf_type, polynomial< Cf, Key > > &)> func ) const
inlineinherited

Term transformation.

This method will apply the functor func to each term in the series, and will use the return value of the functor to construct a new series. Terms are passed to func in the same format resulting from dereferencing the iterators obtained via piranha::series::begin(), and func is expected to produce a return value of the same type.

The return series is first initialised as an empty series. For each input term t, the return value of func is used to construct a new temporary series from the multiplication of t.first and t.second. Each temporary series is then added to the return value series.

This method requires the coefficient type to be multipliable by Derived.

Parameters
 func transforming functor.
Returns
transformed series.
Exceptions
 unspecified any exception thrown by: the call operator of func, insert(), the assignment operator of piranha::symbol_fset, term, coefficient, key construction, series multiplication and addition.

Definition at line 2585 of file series.hpp.

## ◆ trim()

 polynomial< Cf, Key > piranha::series< Cf, Key, polynomial< Cf, Key > >::trim ( ) const
inlineinherited

Trim.

This method will return a series mathematically equivalent to this in which discardable arguments have been removed from the internal set of symbols. Which symbols are removed depends on the trimming method trim_identify() of the key type (e.g., in a polynomial a symbol can be discarded if its exponent is zero in all monomials).

If the coefficient type is an instance of piranha::series, trim() will be called recursively on the coefficients while building the return value.

Returns
trimmed version of this.
Exceptions
 unspecified any exception thrown by: piranha::safe_cast(), operations on piranha::symbol_fset, the trimming methods of coefficient and/or key, insert(), term, coefficient and key type construction.

Definition at line 2619 of file series.hpp.

## ◆ truncate_degree() [1/2]

 polynomial< Cf, Key > piranha::power_series< trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > > , polynomial< Cf, Key > >::truncate_degree ( const T & max_degree ) const
inlineinherited

Total degree truncation.

Note
This method is available only if the requisites outlined in piranha::power_series are satisfied.

This method can be used to eliminate the parts of a series whose degree is greater than max_degree. This includes the elimination of whole terms, but also the recursive truncation of coefficients via the piranha::math::truncate_degree() function, if supported by the coefficient. It must be noted that, in general, this method is not guaranteed to eliminate all the parts whose degree is greater than max_degree (in particular, in the current implementation there is no truncation implemented for keys - a key is kept as-is or completely eliminated).

Parameters
 max_degree maximum allowed total degree.
Returns
the truncated counterpart of this.
Exceptions
 unspecified any exception thrown by: piranha::math::truncate_degree(), if used, the constructor of the term type, the computation and comparison of degree types, piranha::series::insert().

Definition at line 510 of file power_series.hpp.

## ◆ truncate_degree() [2/2]

 polynomial< Cf, Key > piranha::power_series< trigonometric_series< ipow_substitutable_series< substitutable_series< t_substitutable_series< series< Cf, Key, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > >, polynomial< Cf, Key > > > , polynomial< Cf, Key > >::truncate_degree ( const T & max_degree, const symbol_fset & names ) const
inlineinherited

Partial degree truncation.

Note
This method is available only if the requisites outlined in piranha::power_series are satisfied.

This method is equivalent to the other overload, the only difference being that the partial degree is considered in the computation.

Parameters
 max_degree maximum allowed partial degree. names names of the variables to be considered in the computation of the partial degree.
Returns
the truncated counterpart of this.
Exceptions
 unspecified any exception thrown by: piranha::math::truncate_degree(), if used, the constructor of the term type, the computation and comparison of degree types, piranha::series::insert().

Definition at line 543 of file power_series.hpp.

## ◆ truncated_multiplication() [1/2]

template<typename Cf , typename Key >
template<typename U , typename T = polynomial, tm_enabler< T, U > = 0>
 static polynomial piranha::polynomial< Cf, Key >::truncated_multiplication ( const polynomial< Cf, Key > & p1, const polynomial< Cf, Key > & p2, const U & max_degree )
inlinestatic

Truncated multiplication (total degree).

Note
This function template is enabled only if the following conditions hold:

This function will return the product of p1 and p2, truncated to the maximum total degree of max_degree (regardless of the current automatic truncation settings). Note that this function is available only if the operands are of the same type and no type promotions affect the coefficient types during multiplication.

Parameters
 p1 the first operand. p2 the second operand. max_degree the maximum total degree in the result.
Returns
the truncated product of p1 and p2.
Exceptions
 unspecified any exception thrown by: the public interface of the specialisation of piranha::series_multiplier for piranha::polynomial, the public interface of piranha::symbol_fset, the public interface of piranha::series, piranha::safe_cast().

Definition at line 835 of file polynomial.hpp.

## ◆ truncated_multiplication() [2/2]

template<typename Cf , typename Key >
template<typename U , typename T = polynomial, tm_enabler< T, U > = 0>
 static polynomial piranha::polynomial< Cf, Key >::truncated_multiplication ( const polynomial< Cf, Key > & p1, const polynomial< Cf, Key > & p2, const U & max_degree, const symbol_fset & names )
inlinestatic

Truncated multiplication (partial degree).

Note
This function template is enabled only if the following conditions hold:

This function will return the product of p1 and p2, truncated to the maximum partial degree of max_degree (regardless of the current automatic truncation settings). Note that this function is available only if the operands are of the same type and no type promotions affect the coefficient types during multiplication.

Parameters
 p1 the first operand. p2 the second operand. max_degree the maximum degree in the result. names the set of the symbols that will be considered in the computation of the degree.
Returns
the truncated product of p1 and p2.
Exceptions
 unspecified any exception thrown by: the public interface of the specialisation of piranha::series_multiplier for piranha::polynomial, the public interface of piranha::symbol_fset, the public interface of piranha::series, piranha::safe_cast().

Definition at line 872 of file polynomial.hpp.

## ◆ unregister_all_custom_derivatives()

 static void piranha::series< Cf, Key, polynomial< Cf, Key > >::unregister_all_custom_derivatives ( )
inlinestaticinherited

Unregister all custom partial derivatives.

Note
This method is enabled only if piranha::series::partial() is enabled for Derived.

Will unregister all custom derivatives currently registered via register_custom_derivative(). It is safe to call this method from multiple threads.

Exceptions
 unspecified any exception thrown by failure(s) in threading primitives.

Definition at line 2478 of file series.hpp.

## ◆ unregister_custom_derivative()

 static void piranha::series< Cf, Key, polynomial< Cf, Key > >::unregister_custom_derivative ( const std::string & name )
inlinestaticinherited

Unregister custom partial derivative.

Note
This method is enabled only if piranha::series::partial() is enabled for Derived.

Unregister the custom partial derivative function associated to the symbol name. If no custom partial derivative was previously registered using register_custom_derivative(), calling this function will be a no-op.

It is safe to call this method from multiple threads.

Parameters
 name symbol for which the custom partial derivative function will be unregistered.
Exceptions
 unspecified any exception thrown by: failure(s) in threading primitives, lookup and erase operations on std::unordered_map.

Definition at line 2459 of file series.hpp.

## ◆ unset_auto_truncate_degree()

template<typename Cf , typename Key >
template<typename T = polynomial, at_degree_enabler< T > = 0>
 static void piranha::polynomial< Cf, Key >::unset_auto_truncate_degree ( )
inlinestatic

Disable degree-based auto-truncation.

Note
This method is available only if the requisites outlined in piranha::polynomial are satisfied.

Disable the degree-based auto-truncation mechanism.

Exceptions
 unspecified any exception thrown by: threading primitives, the constructor of the degree type, memory allocation errors in standard containers.

Definition at line 701 of file polynomial.hpp.

## ◆ untruncated_multiplication()

template<typename Cf , typename Key >
template<typename T = polynomial, um_enabler< T > = 0>
 static polynomial piranha::polynomial< Cf, Key >::untruncated_multiplication ( const polynomial< Cf, Key > & p1, const polynomial< Cf, Key > & p2 )
inlinestatic

Untruncated multiplication.

Note
This function template is enabled only if the calling piranha::polynomial satisfies piranha::is_multipliable, returning the calling piranha::polynomial as return type.

This function will return the product of p1 and p2, computed without truncation (regardless of the current automatic truncation settings). Note that this function is available only if the operands are of the same type and no type promotions affect the coefficient types during multiplication.

Parameters
 p1 the first operand. p2 the second operand.
Returns
the product of p1 and p2.
Exceptions
 unspecified any exception thrown by: the public interface of the specialisation of piranha::series_multiplier for piranha::polynomial, the public interface of piranha::symbol_fset, the public interface of piranha::series.

Definition at line 800 of file polynomial.hpp.

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