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

Toolbox for substitutable series. More...

#include <piranha/substitutable_series.hpp>

Inherits Series, and piranha::detail::substitutable_series_tag.

Public Member Functions

 substitutable_series ()=default
 Defaulted default constructor.
 
 substitutable_series (const substitutable_series &)=default
 Defaulted copy constructor.
 
 substitutable_series (substitutable_series &&)=default
 Defaulted move constructor.
 
 ~substitutable_series ()
 Trivial destructor.
 
substitutable_seriesoperator= (const substitutable_series &other)=default
 Copy assignment operator. More...
 
substitutable_seriesoperator= (substitutable_series &&other)=default
 Move assignment operator. More...
 
template<typename T >
subs_type< T > subs (const symbol_fmap< T > &dict) const
 Substitution. More...
 

Detailed Description

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

Toolbox for substitutable series.

This toolbox will conditionally augment a Series type by adding a method to subtitute 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_subs and piranha::key_has_subs type traits). If the requirements outlined above are not satisfied, the substitution method 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 76 of file substitutable_series.hpp.

Member Function Documentation

◆ operator=() [1/2]

template<typename Series, typename Derived>
substitutable_series& piranha::substitutable_series< Series, Derived >::operator= ( const 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>
substitutable_series& piranha::substitutable_series< Series, Derived >::operator= ( substitutable_series< Series, Derived > &&  other)
default

Move assignment operator.

Parameters
otherthe assignment argument.
Returns
a reference to this.

◆ subs()

template<typename Series, typename Derived>
template<typename T >
subs_type<T> piranha::substitutable_series< Series, Derived >::subs ( const symbol_fmap< T > &  dict) const
inline

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
dicta dictionary mapping a set of symbols to the values that will be substituted for them.
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 218 of file substitutable_series.hpp.


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