Docs.rs
  • seg-tree-0.3.0
    • seg-tree 0.3.0
    • Permalink
    • Docs.rs crate page
    • AGPL-3.0-or-later
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • N9199
    • Dependencies
      • criterion ^0.3.6 dev
      • rand ^0.8.5 dev
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate seg_tree

seg_tree0.3.0

  • All Items

Crate Items

  • Modules
  • Structs

Crates

  • seg_tree

Crate seg_tree

Source
Expand description

github crates-io docs-rs


This library provides simple and easy to use segment trees and some variations of them, by simply implementing certain traits. It also gives some already implemented nodes types, which serve can also serve as examples.


Modules§

nodes
Node traits.
utils
Provided node implementations.

Structs§

Iterative
Segment tree with range queries and point updates. It uses O(n) space, assuming that each node uses O(1) space. Note if you need to use lower_bound, just use the RecursiveSegmentTree it uses double the memory though and it’s less performant.
LazyPersistent
Lazy persistent segment tree, it saves every version of itself, it has range queries and range updates. It uses O(n+q*log(n)) space, where q is the amount of updates, and assuming that each node uses O(1) space.
LazyRecursive
Lazy segment tree with range queries and range updates. It uses O(n) space, assuming that each node uses O(1) space.
Persistent
Persistent segment tree, it saves every version of itself, it has range queries and point updates. It uses O(n+q*log(n)) space, where q is the amount of updates, and assuming that each node uses O(1) space.
Recursive
Segment tree with range queries and point updates. It uses O(n) space, assuming that each node uses O(1) space. Note if you don’t need to use lower_bound, just use the SegmentTree it uses half the memory and it’s more performant.

Results

Settings
Help

Query parser error: "Unexpected - (did you mean ->?)".