Module segment_tree::ops
[−]
[src]
Module of operations that can be performed in a segment tree.
A segment tree needs some operation, and this module contains the main Operation
trait,
together with the marker trait CommutativeOperation
. This module also contains
implementations for simple operations.
Structs
Add |
Each node contains the sum of the interval it represents. |
And |
Each node contains the bitwise and of the interval it represents. |
Max |
Each node contains the maximum value in the interval it represents. |
MaxIgnoreNaN |
Variant of |
MaxTakeNaN |
Variant of |
Min |
Each node contains the minimum value in the interval it represents. |
MinIgnoreNaN |
Variant of |
MinTakeNaN |
Variant of |
Mul |
Each node contains the product of the interval it represents. |
Or |
Each node contains the bitwise or of the interval it represents. |
Pair |
Store more information in each node. |
WithIdentity |
Adds an identity to an operation by wrapping the type in |
Xor |
Each node contains the bitwise xor of the interval it represents. |
Traits
CommutativeOperation |
A marker trait that specifies that an |
Identity |
A trait that specifies that this type has an identity under this operation. |
Inverse |
A trait that specifies that this type allows uncombining. |
Operation |
A trait that specifies which associative operator to use in a segment tree. |