pub fn periphery<G>(graph: G) -> Vec<G::NodeId>where
G: Visitable + NodeIndexable + IntoEdges + IntoNodeIdentifiers,
Expand description
Peripheral graph vertices.
Returns a vector of indices of the peripheral vertices of the graph.
Examples
use graphalgs::metrics::periphery;
use petgraph::Graph;
let graph = Graph::<(), ()>::from_edges(&[(0, 1), (1, 0), (1, 2)]);
assert_eq!(periphery(&graph), vec![2.into()]);