[−][src]Trait libpuri::LazyAct
Trait for the relationship between two monoids in the LazySegTree
A lazy segment tree requires two monoids M and A, which represent the property of interval and the lazy action on the range, respectively.
M only need to be a monoid while A need to satisfy both monoid and lazy action properties.
By implementing LazyAct you are confirming that the action of A on M satisfies
following conditions:
ⓘThis example is not tested
// Composite of two maps is the product of two corresponding monoids. f(g(m)) == (f * g)(m) // The identity of `A` should map m from `M` to itself. id(m) == m // The corresponding map of an element of `A` should be homomorphic. f(m * n) == f(m) * f(n)
Here the first two conditions are for a monoid action and the third is only for the lazy segment tree.