gives the graph density of the graph g.
uses rules vw to specify the graph g.
Details and Options
- GraphDensity is the ratio of the number of edges divided by the number of edges of a complete graph with the same number of vertices.
- A simple undirected graph with vertices and edges has graph density .
- A simple directed graph with vertices and edges has graph density .
Examplesopen allclose all
Basic Examples (2)
Distribution of density in BernoulliGraphDistribution[n,p]:
Properties & Relations (6)
Get the density from AdjacencyMatrix:
Use EmptyGraphQ to test for emptiness:
Use CompleteGraphQ to test for complete graphs:
LocalClusteringCoefficient gives a local measure of density:
Wolfram Research (2012), GraphDensity, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphDensity.html (updated 2015).
Wolfram Language. 2012. "GraphDensity." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/GraphDensity.html.
Wolfram Language. (2012). GraphDensity. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphDensity.html