| Copyright | Thodoris Papakonstantinou 2017-2026 |
|---|---|
| License | LGPL-3 |
| Maintainer | dev@tpapak.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Data.Graph.AdjacencyList.Metrics
Description
Graph metrics computed from a Distances matrix (see Data.Graph.AdjacencyList.WFI):
eccentricity,
radius, diameter, and density.
Synopsis
- graphEccentricity :: Vertex -> Distances -> Maybe Weight
- graphRadius :: Distances -> Maybe Weight
- graphDiameter :: Distances -> Maybe Weight
- graphDensity :: Graph -> Rational
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