pub trait IndexFromPosition<P> {
type Location: Ord;
// Required method
fn location_from_position(&self, position: &P) -> Self::Location;
}Expand description
Locate the index of a given point.
This is used by Microstate to sort for cache coherency.
Required Associated Types§
Required Methods§
Sourcefn location_from_position(&self, position: &P) -> Self::Location
fn location_from_position(&self, position: &P) -> Self::Location
Determine the location of a site based on its position.
Many positions can map to the same location. The ideal mapping will place points close together in physical space close together in the ordering.