MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / set

Method set

src/data_structures/fenwick_tree.rs:172–174  ·  view source on GitHub ↗

Sets the value at a specific index in the tree, updating the structure accordingly. This operation updates the value at `index` by computing the difference between the desired value and the current value, then applying that difference using `update`. # Arguments `index` - The zero-based index of the element to set. `value` - The new value to set at the specified index. # Returns A `Result` in

(&mut self, index: usize, value: T)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

point_queryMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected