petgraph

Trait IntoWeightedEdge

Source
pub trait IntoWeightedEdge<E> {
    type NodeId;

    // Required method
    fn into_weighted_edge(self) -> (Self::NodeId, Self::NodeId, E);
}
Expand description

Convert an element like (i, j) or (i, j, w) into a triple of source, target, edge weight.

For Graph::from_edges and GraphMap::from_edges.

Required Associated Types§

Required Methods§

Source

fn into_weighted_edge(self) -> (Self::NodeId, Self::NodeId, E)

Implementations on Foreign Types§

Source§

impl<'a, Ix, E> IntoWeightedEdge<E> for &'a (Ix, Ix)
where Ix: Copy, E: Default,

Source§

impl<'a, Ix, E> IntoWeightedEdge<E> for &'a (Ix, Ix, E)
where Ix: Copy, E: Clone,

Source§

impl<'a, Ix, E> IntoWeightedEdge<E> for (Ix, Ix, &'a E)
where E: Clone,

Source§

impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix)
where E: Default,

Source§

impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix, E)

Implementors§