WeightedEdge

Type Alias WeightedEdge 

Source
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: NodeId

The node this edge originates from.

§target: NodeId

The node this edge points to.

§weight: f64

The edge weight. Use () for unweighted graphs.