Module malachite_base::slices
source · Expand description
Functions for working with slices.
Structs
Generates every permutation of a slice.
Uniformly generates a random permutation of references to a slice.
Uniformly generates a random reference to a value from a nonempty slice.
Functions
Generates every permutation of a slice.
Given a slice with nonzero length $\ell$, returns the smallest $n$ such that the slice consists
of $n/\ell$ copies of a length-$\ell$ subslice.
Uniformly generates a random permutation of references to a slice.
Uniformly generates a random reference to a value from a nonempty slice.
Counts the number of zeros that a slice starts with.
Given a slice and an starting index, copies the subslice starting from that index to the
beginning of the slice.
Sets all values in a slice to 0.
Tests whether all values in a slice are equal to 0.
Counts the number of zeros that a slice ends with.