hyperbolic_dist: Hyperbolic distance between points

Description Usage Arguments Value Author(s) References Examples

Description

Computes the hyperbolic distance between a point at polar coordinates (ZI$r, ZI$theta) and m points at polar coordinates (ZJ$r, ZJ$theta).

Usage

1

Arguments

ZI

single-element data frame; A node in hyperbolic space placed at polar coordinates (ZI$r, ZI$theta).

ZJ

data frame; m entries representing m nodes in hyperbolic space placed at polar coordinates (ZJ$r, ZJ$theta).

Value

An m-element vector with the hyperbolic distance between node ZI and nodes ZJ.

Author(s)

Gregorio Alanis-Lobato galanisl@uni-mainz.de

References

Krioukov, D. et al. (2010) Hyperbolic geometry of complex networks. Physical Review E 82(3).

Examples

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))

galanisl/NetHypGeom documentation built on May 16, 2019, 5:36 p.m.