[−][src]Trait contest_algorithms::range_query::specs::ArqSpec
Associated Types
type S: Clone
Type of underlying array elements.
type F: Clone
Type of data representing an endomorphism.
Required methods
fn op(a: &Self::S, b: &Self::S) -> Self::S
Must satisfy the Associative Law: For all a,b,c, op(a, op(b, c)) = op(op(a, b), c)
fn identity() -> Self::S
Must satisfy the Identity Law: For all a, op(a, identity()) = op(identity(), a) = a
fn compose(f: &Self::F, g: &Self::F) -> Self::F
Must satisfy the Composition Law: For all f,g,a, apply(compose(f, g), a) = apply(f, apply(g, a))
fn apply(f: &Self::F, a: &Self::S, size: i64) -> Self::S
Must satisfy the Distributive Law:
For all f,a,b, apply(f, op(a, b), s+t) = op(apply(f, a, s), apply(f, b, t))
The size
parameter makes this law easier to satisfy in certain cases.