|
piranha
0.10
|
Term class. More...
#include <piranha/term.hpp>
Public Types | |
| using | cf_type = Cf |
| Alias for the coefficient type. | |
| using | key_type = Key |
| Alias for the key type. | |
Public Member Functions | |
| term () | |
| Default constructor. More... | |
| term (const term &)=default | |
| Default copy constructor. More... | |
| term (term &&)=default | |
| Defaulted move constructor. | |
| template<typename T , typename U , binary_ctor_enabler< T, U > = 0> | |
| term (T &&cf, U &&key) | |
| Constructor from generic coefficient and key. More... | |
| ~term () | |
| Destructor. | |
| term & | operator= (const term &other)=default |
| Copy assignment operator. More... | |
| term & | operator= (term &&other) noexcept |
| Move assignment operator. More... | |
| bool | operator== (const term &other) const |
| Equality operator. More... | |
| std::size_t | hash () const |
| Hash value. More... | |
| bool | is_compatible (const symbol_fset &args) const noexcept |
| Compatibility test. More... | |
| bool | is_zero (const symbol_fset &args) const noexcept |
| Zero test. More... | |
Public Attributes | |
| Cf | m_cf |
| Coefficient member. | |
| Key | m_key |
| Key member. | |
Term class.
This class represents series terms, which are parametrised over a coefficient type Cf and a key type Key. One mutable coefficient instance and one key instance are the only data members and they can be accessed directly.
Cf must satisfy piranha::is_cf.Key must satisfy piranha::is_key.Unless otherwise specified, this class provides the strong exception safety guarantee for all operations.
Move semantics is equivalent to the data members' move semantics.
|
inline |
|
default |
Default copy constructor.
| unspecified | any exception thrown by the copy constructors of Cf and Key. |
|
inlineexplicit |
Constructor from generic coefficient and key.
Cf and Key are constructible from T and U respectively.This constructor will forward perfectly cf and key to construct coefficient and key.
| cf | argument used for the construction of the coefficient. |
| key | argument used for the construction of the key. |
| unspecified | any exception thrown by the constructors of Cf and Key. |
|
inline |
|
inlinenoexcept |
Compatibility test.
| args | reference piranha::symbol_fset. |
is_compatible() method.
|
inlinenoexcept |
Zero test.
Note that this method is not allowed to throw, so any exception thrown by calling piranha::math::is_zero() on the coefficient will result in the termination of the program.
| args | reference piranha::symbol_fset. |
true if either the key's is_zero() method or piranha::math::is_zero() on the coefficient return true, false otherwise.
|
default |
Copy assignment operator.
The copy assignment operator offers the basic exception safety guarantee.
| other | assignment argument. |
this.| unspecified | any exception thrown by the assignment operators of Cf and Key. |
|
inlinenoexcept |
|
inline |
1.8.14