Trait ShortestPathManyToMany

Source
pub trait ShortestPathManyToMany<W>
where W: Send + Sync + Ord + Copy,
{ // Required method fn shortest_path_many_to_many_map<I, OPT, PM, O>( &self, origin_cells: I, destination_cells: I, options: &OPT, path_transform_fn: PM, ) -> Result<H3CellMap<Vec<O>>, Error> where I: IntoIterator, I::Item: Borrow<H3Cell>, OPT: ShortestPathOptions + Send + Sync, PM: Fn(Path<W>) -> Result<O, Error> + Send + Sync, O: Send + Ord + Clone; // Provided method fn shortest_path_many_to_many<I, OPT>( &self, origin_cells: I, destination_cells: I, options: &OPT, ) -> Result<H3CellMap<Vec<Path<W>>>, Error> where I: IntoIterator, I::Item: Borrow<H3Cell>, OPT: ShortestPathOptions + Send + Sync { ... } }
Expand description

Variant of the ShortestPath trait routing from multiple origins in parallel.

Required Methods§

Source

fn shortest_path_many_to_many_map<I, OPT, PM, O>( &self, origin_cells: I, destination_cells: I, options: &OPT, path_transform_fn: PM, ) -> Result<H3CellMap<Vec<O>>, Error>
where I: IntoIterator, I::Item: Borrow<H3Cell>, OPT: ShortestPathOptions + Send + Sync, PM: Fn(Path<W>) -> Result<O, Error> + Send + Sync, O: Send + Ord + Clone,

Returns found paths, transformed by the path_map_fn and keyed by the origin cell.

path_transform_fn can be used to directly convert the paths to a less memory intensive type.

All cells must be in the h3 resolution of the graph.

Provided Methods§

Source

fn shortest_path_many_to_many<I, OPT>( &self, origin_cells: I, destination_cells: I, options: &OPT, ) -> Result<H3CellMap<Vec<Path<W>>>, Error>

Returns found paths keyed by the origin cell.

All cells must be in the h3 resolution of the graph.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<W, G> ShortestPathManyToMany<W> for G
where G: GetCellEdges<EdgeWeightType = W> + GetCellNode + HasH3Resolution + NearestGraphNodes + Sync, W: PartialOrd + PartialEq + Add + Copy + Send + Ord + Zero + Sync,