Monoid
A Monoid is a concept that describes a simple kind of algebraic system. A monoid consists of a set of elements S, a binary operation, and an identity element. The C++ representation of a monoid consists of a function object that implements the binary operation, a set of objects that represent the elements of S, and an object that represents the identity element.
Refinement of
The element type must be a model of Assignable and CopyConstructible. The function object type must be a model of BinaryFunction.
Notation
X |
Is the element type of the Monoid. |
|---|---|
|
are objects of type |
|
Is the function object implementing the Monoid operation. |
|
is an object of type |
Valid Expressions
|
See below for semantics. |
|
Returns true if |
|
Returns true if |