[−][src]Trait libpuri::Monoid
Trait for associative binary operations with an identity element.
The trait requires that the following property holds:
ⓘThis example is not tested
// The operation * is associative. (a * b) * c == a * (b * c) // There exists an identity element. a * id == id * a == a
This property cannot be checked by the compiler so the implementer should verify it by themself.
Associated Constants
pub const ID: Self[src]
An identity requirement could be lifted if we implement the tree with complete tree instead of perfect tree, making this trait name a semigroup. But for the sake of simplicity, we leave it this way for now.