bisection_key 0.0.1

lexiographic fractional index key algorithm
Documentation
  • Coverage
  • 40%
    2 out of 5 items documented2 out of 2 items with examples
  • Size
  • Source code size: 29.53 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.32 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Cumulo/bisection-key.rs
    2 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tiye

Bisection Key

insert between two different keys infinitely.

Charset:

+-/0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz

numeral repersentation: 0 ~ 64, middle size is 32, corresponding to T.

Usage

LexiconKey is in lexicographic order:

use bisection_key::{LexiconKey}

let k0 = LexiconKey::default(); // defaults to "T"
k0.bisect_beginning()
k0.bisect_end()
let k1 = LexiconKey::new("a").unwrap();
b0.bisect(&k1)

BalancedKey is a different attempt, like said, it's balanced around T like "balanced ternary" and has its own implementation of Ord trait:

use bisection_key::{BalancedKey}

let k0 = LexiconKey::default(); // defaults to "T"
k0.bisect_beginning()
k0.bisect_end()
let k1 = LexiconKey::new("a").unwrap();
b0.bisect(&k1)

License

MIT