pub fn hyperbolic_random_graph<R: Rng>(
n: usize,
r: f64,
alpha: f64,
rng: &mut R,
) -> Result<Graph<usize, f64>>Expand description
Generate a hyperbolic random graph (HRG) in the Poincaré disk model.
n nodes are placed uniformly at random in a hyperbolic disk of radius r
according to the quasi-uniform distribution with curvature parameter alpha
(controls degree heterogeneity; alpha = 0.5 recovers the pure geometric
model, higher values concentrate nodes near the boundary). Two nodes are
connected if their hyperbolic distance is at most r.
The hyperbolic distance between nodes at (r₁, θ₁) and (r₂, θ₂) in polar-hyperbolic coordinates is:
d(u,v) = acosh(cosh(r₁)·cosh(r₂) − sinh(r₁)·sinh(r₂)·cos(θ₁−θ₂))§Arguments
n– number of nodesr– disk radius; largerrgives sparser graphsalpha– radial density exponent (> 0; 0.5 ≤ α ≤ 1 for scale-free degree)rng– random-number generator
§Reference
Krioukov et al., “Hyperbolic geometry of complex networks”, Phys. Rev. E, 82(3), 036106, 2010.