[][src]Trait bintrie::Heuristic

pub trait Heuristic: Clone {
    type Iter: Iterator<Item = usize>;
    fn enter(&mut self, group: usize);
fn iter(&self) -> Self::Iter; }

The Heuristic chooses which of the 16 groups to explore next. This is useful for searching spaces for nearest neighbors because you can check the nearest bits first.

This is cloned right before entering a group, so it is expected that choose update the state of the Heuristic.

Associated Types

type Iter: Iterator<Item = usize>

Loading content...

Required methods

fn enter(&mut self, group: usize)

This is passed the group (guaranteed to be less than 16).

fn iter(&self) -> Self::Iter

Must return an iterator which returns values below 16, otherwise panics.

Loading content...

Implementors

Loading content...