algraph-0.7.0.0: Graph library using adjacency list representation
CopyrightThodoris Papakonstantinou 2017-2026
LicenseLGPL-3
Maintainerdev@tpapak.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Graph.AdjacencyList.Metrics

Description

Graph metrics computed from a Distances matrix (see Data.Graph.AdjacencyList.WFI): eccentricity, radius, diameter, and density.

Synopsis

Documentation

graphEccentricity :: Vertex -> Distances -> Maybe Weight Source #

Eccentricity of a vertex: the maximum shortest-path distance from v to any other reachable vertex. Returns Nothing if v is not in the distance matrix.

graphRadius :: Distances -> Maybe Weight Source #

Radius of the graph: the minimum eccentricity over all vertices (excluding zero and absent eccentricities).

graphDiameter :: Distances -> Maybe Weight Source #

Diameter of the graph: the maximum eccentricity over all vertices.

graphDensity :: Graph -> Rational Source #

Since the representation of undirected graphs dublicated edges no need for undirected version of density