periphery

Function periphery 

Source
pub fn periphery<G>(graph: G) -> Vec<G::NodeId>
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()]);