Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
xmakro committed Jan 12, 2024
1 parent 3b6229e commit 45a03ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rand_distr/src/weighted_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use serde::{Deserialize, Serialize};
/// A [`WeightedTreeIndex<W>`] with `n` elements requires `O(n)` memory.
///
/// Time complexity for the operations of a [`WeightedTreeIndex<W>`] are:
/// * Constructing: Building the initial tree from a slice of weights takes `O(n)` time.
/// * Constructing: Building the initial tree from an iterator of weights takes `O(n)` time.
/// * Sampling: Choosing an index (traversing down the tree) requires `O(log n)` time.
/// * Weight Update: Modifying a weight (traversing up the tree), requires `O(log n)` time.
/// * Weight Addition (Pushing): Adding a new weight (traversing up the tree), requires `O(log n)` time.
Expand Down

0 comments on commit 45a03ac

Please sign in to comment.