A generalised monoid.
More...
|
typedef _OP::D1 | D1 |
| The left-hand side input domain. More...
|
|
typedef _OP::D2 | D2 |
| The right-hand side input domain. More...
|
|
typedef _OP::D3 | D3 |
| The output domain. More...
|
|
template<typename IdentityType > |
using | Identity = _ID< IdentityType > |
| The underlying identity. More...
|
|
typedef _OP | Operator |
| The type of the underlying operator. More...
|
|
template<class _OP, template< typename > class _ID>
class grb::Monoid< _OP, _ID >
A generalised monoid.
- Template Parameters
-
_OP | The monoid operator. |
_ID | The monoid identity (the ‘0’). |
◆ D1
The left-hand side input domain.
◆ D2
The right-hand side input domain.
◆ D3
◆ Identity
◆ Operator
The type of the underlying operator.
◆ Monoid()
Constructor that infers a default operator, given the operator type.
Useful for stateless operators.
◆ getIdentity()
constexpr D getIdentity |
( |
| ) |
const |
|
inline |
Retrieves the identity corresponding to this monoid.
The identity value will be cast to the requested domain.
- Template Parameters
-
D | The requested domain of the identity. |
- Returns
- The identity corresponding to this monoid, cast to the requested domain.
◆ getOperator()
Retrieves the underlying operator.
- Returns
- The underlying operator. Any state is copied.
The documentation for this class was generated from the following file: