Function time_decay_weight

Source
pub fn time_decay_weight(
    edge_timestamp: i64,
    current_time: i64,
    lambda: f64,
) -> f32
Expand description

Time-decay weight for an edge.

Returns exp(-lambda * age) where age is in the same units as timestamps.