Module h3ron::iter

source ·
Expand description

Iterator functionalities

Most iterators in this module are implemented as generic functions. This allow to not just use them with the collections in std::collections, but also to apply them to custom data structures.

Resolution handling

Grid traversal

Edges

Cell boundaries

Structs

GridDiskBuilder allows building k-rings with allocations only on the creation of the struct. This can be more efficient for large numbers of small (~ k_max <= 6) disks. (See the included k_ring_variants benchmark)
Creates H3DirectedEdge from cells while only requiring a single memory allocation when the struct is created.
A H3Cell and one of its neighboring cells, combined with associated generic values.

Functions

Returns an iterator to change the resolution of the given cells to the output_h3_resolution.
Returns an iterator to change the resolution of the given cells to the output_h3_resolution. The iterator iterates over tuples of (input_index, output_index), where output_index is the index after the resolution change has been applied.
convert an iterator of continuous (= neighboring) cells to edges connecting consecutive cells from the iterator.
Returns an iterator to visit all neighbors of the cells of cell_iter by accessing the values using the get_cell_value_fn function. Neighbors of cells which do not have a value returned by that function will not be visited.