metric.distance.effdia {fastnet} | R Documentation |
Effective Diameter
Description
Calculate the effective diameter of a graph.
Usage
metric.distance.effdia(
Network,
probability = 0.95,
error = 0.03,
effective_rate = 0.9,
Cores = detectCores(),
full = TRUE
)
Arguments
Network |
The input network. |
probability |
The confidence level probability |
error |
The sampling error |
effective_rate |
The effective rate (by default it is set to be 0.9) |
Cores |
Number of cores to use in the computations. By default uses parallel function |
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
Dijkstra EW. A note on two problems in connexion with graphs:(numerische mathematik, _1 (1959), p 269-271). 1959.
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.effdia(x)
##Population APL
metric.distance.effdia(x, full=TRUE)
##Sampling at 99% level with an error of 10% using 5 cores
metric.distance.effdia(Network = x, probability=0.99, error=0.1, Cores=5)
## End(Not run)