Skip to main content

random_level

Function random_level 

Source
pub fn random_level(m_l: f64, rng_val: f64) -> usize
Expand description

Compute the layer assignment for a newly inserted node.

m_l is the level multiplier (typically 1 / ln(M)). rng_val must be drawn from [0, 1).