[][src]Module natural_slice::position

Functions

decode_position

Decode the position number of a slice Returns a Vec filled with false for all uninteresting elements and true for all interesting elements. This Vec can be used as a mapping of indices to interesting elements.

encode_position

Encode the position of the interesting elements in a slice as a single natural number. Note that we don't care about the relative positions of the interesting elements, which allows us to deal with a smaller number of possibilities.