mod constants;
#[macro_use]
mod util;
mod hashes;
mod minstrobes;
mod randstrobes;
pub use constants::*;
pub use hashes::{KmerHasher, compute_min_hashes};
pub use minstrobes::MinStrobes;
pub use randstrobes::RandStrobes;
pub use util::*;
use nthash_rs::NtHashError;
pub type Result<T, E = StrobeError> = core::result::Result<T, E>;
#[derive(thiserror::Error, Debug, Clone, PartialEq, Eq)]
pub enum StrobeError {
#[error("strobemer order not supported (must be 2 or 3)")]
OrderNotSupported,
#[error("strobemer order must be ≥ 2")]
InvalidOrder,
#[error("invalid DNA sequence (empty or contains non-ASCII)")]
InvalidSequence,
#[error("sequence too short for given parameters")]
SequenceTooShort,
#[error("strobe length (l) must be ≥ 1 and ≤ 64")]
StrobeLengthTooSmall,
#[error("window offsets must be > 0 and w_min ≤ w_max")]
InvalidWindowOffsets,
#[error("incomplete pre-computed hash values (nthash)")]
IncompleteHashValues,
#[error("prime number too small (must be ≥ 256)")]
PrimeNumberTooSmall,
#[error(transparent)]
NtHashError(#[from] NtHashError),
}