Skip to main content

tanimoto_bits

Function tanimoto_bits 

Source
pub fn tanimoto_bits(a: &[bool], b: &[bool]) -> f64
Expand description

Tanimoto (Jaccard) similarity of two equal-length boolean fingerprints: |A ∩ B| / |A ∪ B|. Returns 0.0 when the union is empty (both all-zero). If lengths differ, only the overlapping prefix is compared.