[][src]Function hwt::search::search_radius

pub fn search_radius(
    bits: u32,
    sl: u32,
    sw: u32,
    tw: u32,
    radius: u32
) -> impl Iterator<Item = ([u32; 2], u32)>

Iterator over the indices that fall within a radius of a number.

  • bits - The number of bits the that make up the bit substring sl comes from.
  • sl - The weight of the left half of the search number.
  • sw - The weight of the whole search number.
  • tw - The weight of the whole target number.
  • radius - The maximum possible sum of distances (sod) of matches.

Returns the iterator over (tl, tr, sod).