sstadick / rust-lapper

Rust implementation of a fast, easy, interval tree library nim-lapper
https://docs.rs/rust-lapper
MIT License
55 stars 7 forks source link

Open up your Interval type to u64, u128 #4

Closed Geigerkind closed 3 years ago

Geigerkind commented 3 years ago

I use it for timestamp intervals which are in ms.

sstadick commented 3 years ago

(for my own reference) I also want to update it since htslib returns u64 as coordinates.

@Geigerkind A new release will be coming in the next week or so. Thanks for making an issue!

sstadick commented 3 years ago

@Geigerkind see v0.5.0, which makes Interval<T> now Interval<I, T> where I: Unsigned + PrimInt + Ord (any unsigned number type. see num-traits crate for details in case you want to implement your own numeric type for the timestamps.

But both u64 and u128 work now. Also, all the return types of various methods match I.

Performance wise there were no regressions.

lmk if you run into any issues.