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
GridDiskBuilder
neighbors_within_distance_window_or_default
neighbors_within_distance_window
neighbors_within_distance
Edges
Cell boundaries
Structs
The iterator implementation returned by
neighbors_within_distance_window_or_default
.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.
Simplified wrapper for
neighbors_within_distance_window_or_default
.Simplified wrapper for
neighbors_within_distance_window_or_default
.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.