metric.distance.diameter {fastnet}R Documentation

Diameter

Description

Calculate the diameter of a graph.

Usage

metric.distance.diameter(
  Network,
  probability = 0.95,
  error = 0.03,
  Cores = detectCores(),
  full = TRUE
)

Arguments

Network

The input network.

probability

The confidence level probability

error

The sampling error

Cores

Number of cores to use in the computations. By default uses parallel function detecCores().

full

It will calculate the popular full version by default. If it is set to FALSE, the estimated diameter will be calculated.

Details

The diameter is the largest shortest path lengths of all pairs of nodes in graph Network.

metric.distance.diameter calculates the (estimated) diameter of graph Network with a justified error.

Value

A real value.

Author(s)

Luis Castro, Nazrul Shaikh.

References

E. W. Dijkstra. 1959. A note on two problems in connexion with graphs. Numer. Math. 1, 1 (December 1959), 269-271.

Castro L, Shaikh N. Estimation of Average Path Lengths of Social Networks via Random Node Pair Sampling. Department of Industrial Engineering, University of Miami. 2016.

Examples

## Not run: 
##Default function
x <-  net.erdos.renyi.gnp(1000,0.01)
metric.distance.diameter(x)
##Population APL
metric.distance.diameter(x, full=TRUE)
##Sampling at 99% level with an error of 10% using 5 cores
metric.distance.diameter(Network = x, probability=0.99, error=0.1, Cores=5)

## End(Not run)


[Package fastnet version 1.0.0 Index]