scalation.database.graph_pm.GraphMetrics
See theGraphMetrics companion object
The GraphMetrics
class provides methods for determining graph metrics that can be efficiently computed using Breadth-First Search (BFS). This works for undirected graphs. If a directed graph is passed in, it will be converted to a corresponding undirected graph.
Value parameters
g
the graph whose metrics are sought
isUndirected
indicates whether the graph is undirected
Attributes
Companion
object
Graph
Reset zoom Hide graph Show graph
Supertypes
class Object
trait Matchable
class Any
Members list
Return the central vertices, those with eccentricities equal to the radius.
Return the central vertices, those with eccentricities equal to the radius.
Attributes
Compute the diameter of graph g (i.e., maximum eccentricity). This also equals the "longest shortest path" between any pair of vertices in graph g.
Compute the diameter of graph g (i.e., maximum eccentricity). This also equals the "longest shortest path" between any pair of vertices in graph g.
Attributes
Compute the eccentricity of vertex i (the length of the longest path from vertex i to any other vertex).
Compute the eccentricity of vertex i (the length of the longest path from vertex i to any other vertex).
Value parameters
i
the vertex whose eccentricity is sought
Attributes
Compute the radius of graph g (i.e., minimum eccentricity).
Compute the radius of graph g (i.e., minimum eccentricity).
Attributes