Crate substrate_median

Crate substrate_median 

Source
Expand description

§Substrate Median

An efficient implementation of a median algorithm within a Substrate runtime.

Structs§

LexicographicReverse
A wrapper such that a.cmp(&b).reverse() == e(LexicographicReverse(a)).cmp(&e(LexicographicReverse(b))).

Enums§

Policy
The policy to use to select the median when the list of candidates is of even length.

Traits§

Average
A trait to take the average of two values
LexicographicEncoding
A trait to obtain an encoding whose lexicographic order corresponds to the value’s.
Median
A median.
MedianStore
The store for a median.