pub trait Grid<T>where
Self: Sized,{
// Required methods
fn get_adj_4(&self, rrange: (T, T), crange: (T, T)) -> Vec<Self>;
fn get_adj_8(&self, rrange: (T, T), crange: (T, T)) -> Vec<Self>;
fn right(&self) -> (T, T);
fn upright(&self) -> (T, T);
fn up(&self) -> (T, T);
fn upleft(&self) -> (T, T);
fn left(&self) -> (T, T);
fn downleft(&self) -> (T, T);
fn down(&self) -> (T, T);
fn downright(&self) -> (T, T);
}Expand description
グリッドの探索
Required Methods§
Sourcefn get_adj_4(&self, rrange: (T, T), crange: (T, T)) -> Vec<Self>
fn get_adj_4(&self, rrange: (T, T), crange: (T, T)) -> Vec<Self>
座標(i,j)に上下左右で隣接する座標を取得
(グリッドサイズHxWでバリデーション)
探索順
2 ↑ 3 ← → 1 ↓ 4
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.