Module malachite_base::iterators
source · Expand description
Functions and adaptors for iterators.
Modules§
- Contains
BitDistributor
, which helps generate tuples exhaustively. - Functions that compare adjacent iterator elements.
- Contains
IteratorCache
, which remembers values produced by an iterator.
Structs§
- Generates sliding windows of elements from an iterator.
- Generates all the nonzero values of a provided iterator.
- An iterator that generates the Thue-Morse sequence. See
thue_morse_sequence
for more information.
Functions§
- Returns whether an iterator returns at least some number of values.
- Returns whether an iterator returns at most some number of values.
- Returns the first and last elements of an iterator, or
None
if it is empty. - Returns whether all of the values generated by an iterator are equal.
- Returns whether an iterator never returns the same value twice.
- Returns windows of $n$ adjacent elements of an iterator, advancing the window by 1 in each iteration. The values are cloned each time a new window is generated.
- Groups elements of an iterator into intervals of adjacent elements that match a predicate. The endpoints of each interval are returned.
- Returns an iterator that generates all the nonzero values of a provided iterator.
- Converts a prefix of an iterator to a string.
- Returns an iterator that generates the Thue-Morse sequence.