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
.
Required Associated Types§
Required Methods§
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)
Convert an element like &(i, j)
into a triple of source, target, edge weight.
impl<'a, Ix, E> IntoWeightedEdge<E> for &'a (Ix, Ix)
Convert an element like &(i, j)
into a triple of source, target, edge weight.
See that the element &(i, j)
is a reference.
type NodeId = Ix
fn into_weighted_edge(self) -> (Ix, Ix, E)
Source§impl<'a, Ix, E> IntoWeightedEdge<E> for &'a (Ix, Ix, E)
Convert an element like &(i, j, w)
into a triple of source, target, edge weight.
impl<'a, Ix, E> IntoWeightedEdge<E> for &'a (Ix, Ix, E)
Convert an element like &(i, j, w)
into a triple of source, target, edge weight.
Clone the edge weight from the reference.
See that the element &(i, j, w)
is a reference.
type NodeId = Ix
fn into_weighted_edge(self) -> (Ix, Ix, E)
Source§impl<'a, Ix, E> IntoWeightedEdge<E> for (Ix, Ix, &'a E)where
E: Clone,
Convert an element like (i, j, w)
into a triple of source, target, edge weight.
impl<'a, Ix, E> IntoWeightedEdge<E> for (Ix, Ix, &'a E)where
E: Clone,
Convert an element like (i, j, w)
into a triple of source, target, edge weight.
Clone the edge weight from the reference.
type NodeId = Ix
fn into_weighted_edge(self) -> (Ix, Ix, E)
Source§impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix)where
E: Default,
Convert an element like (i, j)
into a triple of source, target, edge weight.
impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix)where
E: Default,
Convert an element like (i, j)
into a triple of source, target, edge weight.
type NodeId = Ix
fn into_weighted_edge(self) -> (Ix, Ix, E)
Source§impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix, E)
Convert an element like (i, j, w)
into a triple of source, target, edge weight.
impl<Ix, E> IntoWeightedEdge<E> for (Ix, Ix, E)
Convert an element like (i, j, w)
into a triple of source, target, edge weight.
Meaning do no change, just return.