Module utils

Source
Expand description

Provided node implementations.

Structsยง

LazySetWrapper
A wrapper for nodes to easily implement LazyNode with an update which sets the range to a value. If the wrapped node implements PersistentNode the wrapper also implements it.
Max
Implementation of range max for generic type T, it only implements Node.
MaxSubArraySum
Implementation of the solution to the maximum subarray problem. It just implements Node.
Min
Implementation of range min for generic type T, it only implements Node.
PersistentWrapper
A simple wrapper for nodes to easily implement PersistentNode. If the wrapped node implements LazyNode the wrapper also implements it.
Sum
Implementation of range sum for generic type T, it implements Node and LazyNode, as such it can be used as a node in every segment tree type.