Description Usage Arguments Value Author(s) References Examples
Computes the hyperbolic distance between a point at polar coordinates (ZI$r
, ZI$theta
) and m
points at polar coordinates (ZJ$r
, ZJ$theta
).
1 | hyperbolic_dist(ZI, ZJ)
|
ZI |
single-element data frame; A node in hyperbolic space placed at polar coordinates ( |
ZJ |
data frame; m entries representing m nodes in hyperbolic space placed at polar coordinates ( |
An m
-element vector with the hyperbolic distance between node ZI
and nodes ZJ
.
Gregorio Alanis-Lobato galanisl@uni-mainz.de
Krioukov, D. et al. (2010) Hyperbolic geometry of complex networks. Physical Review E 82(3).
1 2 3 4 5 6 7 8 | # Generate an artificial network with the PS model
net <- ps_model(500, 6, 2.5, 0)
# If nodes data frame contains m nodes, use the following
# to compute the distance between node 1 and the rest (including itself):
nodes <- net$polar
d <- hyperbolic_dist(nodes[1,], nodes)
# To compute the pairwise distances between m nodes use:
D <- sapply(seq(nrow(nodes)), function(i) hyperbolic_dist(nodes[i, ], nodes))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.