Module iterators

Source
Expand description

Functions and adaptors for iterators.

Modules§

bit_distributor
Contains BitDistributor, which helps generate tuples exhaustively.
comparison
Functions that compare adjacent iterator elements.
iterator_cache
Contains IteratorCache, which remembers values produced by an iterator.

Structs§

IterWindows
Generates sliding windows of elements from an iterator.
NonzeroValues
Generates all the nonzero values of a provided iterator.
ThueMorseSequence
An iterator that generates the Thue-Morse sequence. See thue_morse_sequence for more information.

Functions§

count_is_at_least
Returns whether an iterator returns at least some number of values.
count_is_at_most
Returns whether an iterator returns at most some number of values.
first_and_last
Returns the first and last elements of an iterator, or None if it is empty.
is_constant
Returns whether all of the values generated by an iterator are equal.
is_unique
Returns whether an iterator never returns the same value twice.
iter_windows
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.
matching_intervals_in_iterator
Groups elements of an iterator into intervals of adjacent elements that match a predicate. The endpoints of each interval are returned.
nonzero_values
Returns an iterator that generates all the nonzero values of a provided iterator.
prefix_to_string
Converts a prefix of an iterator to a string.
thue_morse_sequence
Returns an iterator that generates the Thue-Morse sequence.