[][src]Module natural_slice::property

Functions

decode_property

Decode a property number into a unique ordering of this slice's property.

encode_property

Encode a property of a slice of data with finite cardinality into a single number There must be a mapping from this property to a digit in a certain base The output is bound by base^(data.len() - 1) Precondition: the property being encoded must satisfy the parity property, which is to say that summing all the values of the property should give a multiple of the base. This is used to omit one "bit" in that base as it can be reconstituted later using parity.