Learn R Programming

fastnet (version 1.0.0)

metric.graph.density: Graph Density

Description

Calculate the density of a graph.

Usage

metric.graph.density(g)

Arguments

g

The input network.

Value

A real constant.

Details

Computes the ratio of the number of edges and the number of possible edges.

Examples

Run this code
# NOT RUN {
x <-  net.erdos.renyi.gnp(1000, 0.01)
metric.graph.density(x)
# }

Run the code above in your browser using DataLab