piranha  0.10
Public Member Functions | List of all members
piranha::ipow_substitutable_series< Series, Derived > Class Template Reference

Toolbox for series suitable for integral power substitution. More...

#include <piranha/ipow_substitutable_series.hpp>

Inherits Series, and ipow_substitutable_series_tag.

Public Member Functions

 ipow_substitutable_series ()=default
 Defaulted default constructor.
 
 ipow_substitutable_series (const ipow_substitutable_series &)=default
 Defaulted copy constructor.
 
 ipow_substitutable_series (ipow_substitutable_series &&)=default
 Defaulted move constructor.
 
ipow_substitutable_seriesoperator= (const ipow_substitutable_series &other)=default
 Copy assignment operator. More...
 
ipow_substitutable_seriesoperator= (ipow_substitutable_series &&other)=default
 Defaulted move assignment operator. More...
 
 ~ipow_substitutable_series ()
 Trivial destructor.
 
template<typename T >
ipow_subs_type< T > ipow_subs (const std::string &name, const integer &n, const T &x) const
 Substitution. More...
 
template<typename T , typename Int , ipow_subs_int_enabler< Int > = 0>
ipow_subs_type< T > ipow_subs (const std::string &name, const Int &n, const T &x) const
 Substitution. More...
 

Detailed Description

template<typename Series, typename Derived>
class piranha::ipow_substitutable_series< Series, Derived >

Toolbox for series suitable for integral power substitution.

This toolbox will conditionally augment a Series type by adding methods to subtitute integral powers of symbols with generic objects. Such augmentation takes place if the series' coefficient and/or key types expose substitution methods (as established by the piranha::has_ipow_subs and piranha::key_has_ipow_subs type traits). If the requirements outlined above are not satisfied, the substitution methods will be disabled.

This class satisfies the piranha::is_series type trait.

Type requirements

Exception safety guarantee

This class provides the same guarantee as Series.

Move semantics

Move semantics is equivalent to the move semantics of Series.

Definition at line 75 of file ipow_substitutable_series.hpp.

Member Function Documentation

◆ ipow_subs() [1/2]

template<typename Series, typename Derived>
template<typename T >
ipow_subs_type<T> piranha::ipow_substitutable_series< Series, Derived >::ipow_subs ( const std::string &  name,
const integer n,
const T &  x 
) const
inline

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
namename of the symbol to be substituted.
nintegral power of the symbol to be substituted.
xobject used for the substitution.
Returns
the result of the substitution.
Exceptions
unspecifiedany 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]

template<typename Series, typename Derived>
template<typename T , typename Int , ipow_subs_int_enabler< Int > = 0>
ipow_subs_type<T> piranha::ipow_substitutable_series< Series, Derived >::ipow_subs ( const std::string &  name,
const Int &  n,
const T &  x 
) const
inline

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
namename of the symbol to be substituted.
nintegral power of the symbol to be substituted.
xobject used for the substitution.
Returns
the result of the substitution.
Exceptions
unspecifiedany 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.

◆ operator=() [1/2]

template<typename Series, typename Derived>
ipow_substitutable_series& piranha::ipow_substitutable_series< Series, Derived >::operator= ( const ipow_substitutable_series< Series, Derived > &  other)
default

Copy assignment operator.

Parameters
otherthe assignment argument.
Returns
a reference to this.
Exceptions
unspecifiedany exception thrown by the assignment operator of the base class.

◆ operator=() [2/2]

template<typename Series, typename Derived>
ipow_substitutable_series& piranha::ipow_substitutable_series< Series, Derived >::operator= ( ipow_substitutable_series< Series, Derived > &&  other)
default

Defaulted move assignment operator.

Parameters
otherthe assignment argument.
Returns
a reference to this.

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