pub type WeightedEdge = Edge<f64>;Expand description
A weighted directed edge with f64 weights.
§Examples
use graph_core::{WeightedEdge, NodeId};
let e = WeightedEdge::new(NodeId::new(0), NodeId::new(2), 1.5);
assert_eq!(e.weight, 1.5);Aliased Type§
pub struct WeightedEdge {
pub source: NodeId,
pub target: NodeId,
pub weight: f64,
}Fields§
§source: NodeIdThe node this edge originates from.
target: NodeIdThe node this edge points to.
weight: f64The edge weight. Use () for unweighted graphs.