UnweightedEdge

Type Alias UnweightedEdge 

Source
pub type UnweightedEdge = Edge<()>;
Expand description

An unweighted directed edge (weight type ()).

§Examples

use graph_core::{UnweightedEdge, NodeId};

let e = UnweightedEdge::new(NodeId::new(0), NodeId::new(1), ());
assert_eq!(e.source, NodeId::new(0));

Aliased Type§

pub struct UnweightedEdge {
    pub source: NodeId,
    pub target: NodeId,
    pub weight: (),
}

Fields§

§source: NodeId

The node this edge originates from.

§target: NodeId

The node this edge points to.

§weight: ()

The edge weight. Use () for unweighted graphs.