Struct h3ron_graph::graph::prepared::PreparedH3EdgeGraph
source · [−]Expand description
a prepared graph which can be used for routing
Consequent H3Edges without
Implementations
iterate over all edges of the graph
pub fn iter_edges_non_overlapping(
&self
) -> Result<impl Iterator<Item = (H3Edge, EdgeWeight<'_, W>)>, Error>
pub fn iter_edges_non_overlapping(
&self
) -> Result<impl Iterator<Item = (H3Edge, EdgeWeight<'_, W>)>, Error>
iterate over all edges of the graph, while skipping simple H3Edge
which are already covered in other LongEdge instances of the graph.
This function iterates the graph twice - the first time to collect all edges which are part of long-edges.
Trait Implementations
calculates a MultiPolygon of the area covered by a graph Read more
impl<'de, W: Send + Sync> Deserialize<'de> for PreparedH3EdgeGraph<W> where
W: Deserialize<'de>,
impl<'de, W: Send + Sync> Deserialize<'de> for PreparedH3EdgeGraph<W> where
W: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<W> From<PreparedH3EdgeGraph<W>> for H3EdgeGraph<W> where
W: PartialOrd + PartialEq + Add + Copy + Send + Ord + Zero + Sync,
impl<W> From<PreparedH3EdgeGraph<W>> for H3EdgeGraph<W> where
W: PartialOrd + PartialEq + Add + Copy + Send + Ord + Zero + Sync,
Performs the conversion.
type EdgeWeightType = W
Gets the index resolution (0-15)
type CellNodeIterator = TPMIter<'a, H3Cell, NodeType, 4>
impl<W> TryFrom<H3EdgeGraph<W>> for PreparedH3EdgeGraph<W> where
W: PartialOrd + PartialEq + Add + Copy + Send + Ord + Zero + Sync,
impl<W> TryFrom<H3EdgeGraph<W>> for PreparedH3EdgeGraph<W> where
W: PartialOrd + PartialEq + Add + Copy + Send + Ord + Zero + Sync,
Auto Trait Implementations
impl<W> RefUnwindSafe for PreparedH3EdgeGraph<W> where
W: RefUnwindSafe,
impl<W> Send for PreparedH3EdgeGraph<W>
impl<W> Unpin for PreparedH3EdgeGraph<W> where
W: Unpin,
impl<W> UnwindSafe for PreparedH3EdgeGraph<W> where
W: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<G, W> DifferentialShortestPath<W> for G where
W: PartialOrd<W> + PartialEq<W> + Add<W> + Copy + Send + Ord + Zero + Sync,
G: GetEdge<EdgeWeightType = W> + GetCellNode + HasH3Resolution + GetGapBridgedCellNodes + Sync + ShortestPathManyToMany<W>,
impl<G, W> DifferentialShortestPath<W> for G where
W: PartialOrd<W> + PartialEq<W> + Add<W> + Copy + Send + Ord + Zero + Sync,
G: GetEdge<EdgeWeightType = W> + GetCellNode + HasH3Resolution + GetGapBridgedCellNodes + Sync + ShortestPathManyToMany<W>,
pub fn differential_shortest_path_map<I, OPT, PM, O>(
&Self,
I,
I,
&H3Treemap<H3Cell>,
&OPT,
PM
) -> Result<HashMap<H3Cell, ExclusionDiff<O>, RandomState, Global>, Error> where
I: IntoIterator,
OPT: ShortestPathOptions + Send + Sync,
O: Send + Ord + Clone,
PM: Fn(Path<W>) -> O + Send + Sync,
<I as IntoIterator>::Item: Borrow<H3Cell>,
fn differential_shortest_path<I, OPT>(
&self,
origin_cells: I,
destination_cells: I,
exclude_cells: &H3Treemap<H3Cell>,
options: &OPT
) -> Result<HashMap<H3Cell, ExclusionDiff<Path<W>>>, Error> where
I: IntoIterator,
I::Item: Borrow<H3Cell>,
OPT: ShortestPathOptions + Send + Sync,
pub fn gap_bridged_corresponding_node_filtered<F>(
&Self,
&H3Cell,
u32,
F
) -> GapBridgedCellNode where
F: Fn(&H3Cell, &NodeType) -> bool + Send + Sync + Copy,
fn gap_bridged_corresponding_node(
&self,
cell: &H3Cell,
num_gap_cells_to_graph: u32
) -> GapBridgedCellNode
fn gap_bridged_corresponding_node(
&self,
cell: &H3Cell,
num_gap_cells_to_graph: u32
) -> GapBridgedCellNode
get the closest corresponding node in the graph to the given cell Read more
impl<W, G> ShortestPath<W> for G where
G: GetEdge<EdgeWeightType = W> + GetCellNode + HasH3Resolution + GetGapBridgedCellNodes,
W: PartialOrd<W> + PartialEq<W> + Add<W> + Copy + Send + Ord + Zero + Sync,
impl<W, G> ShortestPath<W> for G where
G: GetEdge<EdgeWeightType = W> + GetCellNode + HasH3Resolution + GetGapBridgedCellNodes,
W: PartialOrd<W> + PartialEq<W> + Add<W> + Copy + Send + Ord + Zero + Sync,
pub fn shortest_path<I, OPT>(
&Self,
H3Cell,
I,
&OPT
) -> Result<Vec<Path<W>, Global>, Error> where
I: IntoIterator,
OPT: ShortestPathOptions,
<I as IntoIterator>::Item: Borrow<H3Cell>,
impl<W, G> ShortestPathManyToMany<W> for G where
G: GetEdge<EdgeWeightType = W> + GetCellNode + HasH3Resolution + GetGapBridgedCellNodes + Sync,
W: PartialOrd<W> + PartialEq<W> + Add<W> + Copy + Send + Ord + Zero + Sync,
impl<W, G> ShortestPathManyToMany<W> for G where
G: GetEdge<EdgeWeightType = W> + GetCellNode + HasH3Resolution + GetGapBridgedCellNodes + Sync,
W: PartialOrd<W> + PartialEq<W> + Add<W> + Copy + Send + Ord + Zero + Sync,
pub fn shortest_path_many_to_many_map<I, OPT, PM, O>(
&Self,
I,
I,
&OPT,
PM
) -> Result<HashMap<H3Cell, Vec<O, Global>, RandomState, Global>, Error> where
I: IntoIterator,
OPT: ShortestPathOptions + Send + Sync,
PM: Fn(Path<W>) -> O + Send + Sync,
O: Send + Ord + Clone,
<I as IntoIterator>::Item: Borrow<H3Cell>,
pub fn shortest_path_many_to_many_map<I, OPT, PM, O>(
&Self,
I,
I,
&OPT,
PM
) -> Result<HashMap<H3Cell, Vec<O, Global>, RandomState, Global>, Error> where
I: IntoIterator,
OPT: ShortestPathOptions + Send + Sync,
PM: Fn(Path<W>) -> O + Send + Sync,
O: Send + Ord + Clone,
<I as IntoIterator>::Item: Borrow<H3Cell>,
Returns found paths, transformed by the path_map_fn and keyed by the
origin cell. Read more
pub fn cells_within_weight_threshold_many<I, AGG>(
&Self,
I,
W,
AGG
) -> HashMap<H3Cell, W, RandomState, Global> where
I: IntoParallelIterator,
AGG: Fn(&mut W, W) + Sync,
<I as IntoParallelIterator>::Item: Borrow<H3Cell>,
pub fn cells_within_weight_threshold_many<I, AGG>(
&Self,
I,
W,
AGG
) -> HashMap<H3Cell, W, RandomState, Global> where
I: IntoParallelIterator,
AGG: Fn(&mut W, W) + Sync,
<I as IntoParallelIterator>::Item: Borrow<H3Cell>,
Find all cells connected to the graph within a given weight_threshold around the
given origin_cells. Read more