pub trait Grid: Debug + Sync + Send {
// Required methods
fn bands(&self) -> usize;
fn contains(&self, coord: &Coor4D, margin: f64) -> bool;
fn at(&self, at: &Coor4D, margin: f64) -> Option<Coor4D>;
}
Returns true if coord
is contained by self
or lies within a margin of
margin
grid cell units. Typically margin
should be on the order of 1
Returns None
if the grid or any of its sub-grids do not contain the point.
Contain is in the sense of the contains
method, i.e. the point is
considered contained if it is inside a margin of margin
grid units of
the grid.