Module indexing_and_bijection

Module indexing_and_bijection 

Source
Expand description

Bijective functions.

See also the binary_search module.

Structs§

SuperVec
Returns a constant value for all indices greater than the length of the internall stored vector.

Traits§

EndIndex
SuperIndex

Functions§

compose_f_after_g
Returns [ g[f[ 0 ]] .. g[f[ f.len() ]] ]
inverse_perm
Given a vector of length n+1 representing a permutation on {0, .., n}, returns a vector that represents the inverse permutation.
sort_perm
Returns a permutation that sorts the elements of the vector.
sort_perm_by
Returns a permutation that sorts the elements of the vector according to given comparison function.
sort_perm_by_key
Returns a permutation that sorts the elements of the vector according to a key.