pub trait Heuristic: Clone {
type Iter: Iterator<Item = bool>;
// Required methods
fn enter(&mut self, side: bool);
fn iter(&self) -> Self::Iter;
}Expand description
The Heuristic chooses which side to explore next.
This is not useful for finding perfect nearest neighbors because it can take a path first that eliminates another better match in another branch. This will work well to find things of a particular distance, which is useful for discrete nearest neighbor searches in a given radius. It is also useful to find all things within a given radius, but the outputs will only be approximately ordered with respect to distance.
This is cloned right before entering a side, so it is expected that
enter updates the state of the Heuristic.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.