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

Toolbox for series that support trigonometric substitution. More...

#include <piranha/t_substitutable_series.hpp>

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

Public Member Functions

 t_substitutable_series ()=default
 Defaulted default constructor.
 
 t_substitutable_series (const t_substitutable_series &)=default
 Defaulted copy constructor.
 
 t_substitutable_series (t_substitutable_series &&)=default
 Defaulted move constructor.
 
t_substitutable_seriesoperator= (const t_substitutable_series &other)=default
 Copy assignment operator. More...
 
t_substitutable_seriesoperator= (t_substitutable_series &&other)=default
 Move assignment operator. More...
 
 ~t_substitutable_series ()
 Trivial destructor.
 
template<typename T , typename U >
t_subs_type< T, U > t_subs (const std::string &name, const T &c, const U &s) const
 Trigonometric substitution. More...
 

Detailed Description

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

Toolbox for series that support trigonometric substitution.

This toolbox extends a series class with methods to perform trigonometric substitution (i.e., substitution of cosine and sine of a symbolic variable). These methods are enabled only if either the coefficient or the key supports trigonometric substitution, as established by the piranha::has_t_subs and piranha::key_has_t_subs type traits, and if the types involved in the computation of the substitution are constructible from int and support basic arithmetics.

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 79 of file t_substitutable_series.hpp.

Member Function Documentation

◆ operator=() [1/2]

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

Move assignment operator.

Parameters
otherthe assignment argument.
Returns
a reference to this.

◆ t_subs()

template<typename Series, typename Derived>
template<typename T , typename U >
t_subs_type<T, U> piranha::t_substitutable_series< Series, Derived >::t_subs ( const std::string &  name,
const T &  c,
const U &  s 
) const
inline

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
namename of the symbol that will be subject to substitution.
ccosine of name.
ssine of name.
Returns
the result of the trigonometric substitution.
Exceptions
unspecifiedany 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.


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