minimizer-queue

Crates.iominimizer-queue
lib.rsminimizer-queue
version1.2.3
sourcesrc
created_at2024-05-29 20:40:42.059072
updated_at2024-06-25 18:40:25.685225
descriptionFast computation of minimizers using a monotone queue
homepagehttps://crates.io/crates/minimizer-queue
repositoryhttps://github.com/imartayan/minimizer-queue
max_upload_size
id1256094
size16,819
Igor Martayan (imartayan)

documentation

https://docs.rs/minimizer-queue

README

minimizer-queue

crates.io docs

Fast computation of minimizers using a monotone queue.

Features

  • insertion in amortized constant time
  • lookup in constant time
  • keeps track of the relative position of the minimizers
  • supports custom hasher, using wyhash by default
  • can be seeded to produce a different ordering
  • optimized modulo computation with strength_reduce

Example usage

use minimizer_queue::MinimizerQueue;

let mut queue = MinimizerQueue::new(3); // width 3
queue.insert(1);
queue.insert(2);
queue.insert(3);
queue.get_min(); // element with the smallest hash among 1, 2 and 3

queue.insert(4);
queue.get_min(); // element with the smallest hash among 2, 3 and 4
Commit count: 21

cargo fmt