Description Usage Arguments Details Value Author(s) References Examples
Calculate the average path length of a graph.
1 2 | metric.distance.apl(Network, probability = 0.95, error = 0.03,
Cores = detectCores(), full.apl = FALSE)
|
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 |
full.apl |
It will calculate the sampling version by default. If it is set to true, the population APL will be calculated and the rest of the parameters will be ignored. |
The average path length (APL) is the average shortest path lengths of all
pairs of nodes in graph Network. metric.distance.apl
calculates
the population APL and estimated APL of graph g with a sampling error set by the user.
The calculation uses a parallel load balancing approach, distributing jobs equally among the cores defined by the user.
A real value.
Luis Castro, Nazrul Shaikh.
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.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
##Default function
x <- net.erdos.renyi.gnp(1000,0.01)
metric.distance.apl(x)
##Population APL
metric.distance.apl(x, full.apl=TRUE)
##Sampling at 99% level with an error of 10% using 5 cores
metric.distance.apl(Network = x, probability=0.99, error=0.1, Cores=5)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.