diameter: Diameter

Description Usage Arguments Value Author(s) References Examples

View source: R/diameter.R

Description

This method calculates the diameter of a given graph.

Usage

1

Arguments

g

a graph as a graphNEL object.

dist

the distance matrix of the graph. If the parameter is empty the distance matrix will be calculated within the function.

Value

This method returns the diameter of a given graph.

Author(s)

Laurin Mueller

References

F. Harary, Graph Theory, Addison-Wesley series in mathematics, Perseus Books, 1994.

Examples

1
2
3
4
5
library(RBGL)
set.seed(123)
g <- randomGraph(1:8, 1:5, 0.36, weights=FALSE)

diameter(g)

QuACN documentation built on May 29, 2017, 9:51 p.m.

Search within the QuACN package
Search all R packages, documentation and source code