# barycenter -- Returns the barycenter of a grah

## Synopsis

• Usage:
H = barycenter G
• Inputs:
• G, an instance of the type Graph,
• Outputs:
• H, an instance of the type Graph, The barycenter of G

## Description

The barycenter of a graph is the subgraph induced by all the vertices with eccentricity equal to the graph's radius, in other words, it is the subgraph induced by the center of a graph.

 i1 : barycenter pathGraph 6 o1 = Graph{2 => {3}} 3 => {2} o1 : Graph i2 : barycenter completeGraph 6 o2 = Graph{0 => {1, 2, 3, 4, 5}} 1 => {0, 2, 3, 4, 5} 2 => {0, 1, 3, 4, 5} 3 => {0, 1, 2, 4, 5} 4 => {0, 1, 2, 3, 5} 5 => {0, 1, 2, 3, 4} o2 : Graph