Program.cs
/// <summary>
/// Calculate the radius and diameter from the node eccentricity.
/// Radius == node with the smallest eccentricity
/// Diameter == node with the highest eccentricity
/// </summary>
/// <param name="e"></param>
/// <returns></returns>
Calculate the radius and diameter from the node eccentricity.
Radius == node with the smallest eccentricity
Diameter == node with the highest eccentricity
Calculate the radius and diameter from the node eccentricity . Radius == node with the smallest eccentricity Diameter == node with the highest eccentricity
static (int, int) GetRadiusAndDiameter(int[] e)
        {
            var rad = INF;
            var diam = 0;
            for (var i = 0; i < vertices.Length; i++)
            {
                rad = Math.Min(rad, e[i]); 
                diam = Math.Max(diam, e[i]); 
            }
            return (rad, diam);
        }
static ( int , int ) GetRadiusAndDiameter ( int [ ] e ) { var rad = INF ; var diam = 0 ; for ( var i = 0 ; i < vertices . Length ; i ++ ) { rad = Math . Min ( rad , e [ i ] ) ; diam = Math . Max ( diam , e [ i ] ) ; } return ( rad , diam ) ; }
Calculate the radius and diameter from the node eccentricity.
Calculate the radius and diameter from the node eccentricity .
// node with the smallest max distance // node with the largest max distance
None
e
int[]
None