pub struct Grid {
pub width: usize,
pub height: usize,
pub costs: Vec<Vec<f32>>,
pub size: usize,
}
Fields§
§width: usize
§height: usize
§costs: Vec<Vec<f32>>
§size: usize
Implementations§
Source§impl Grid
impl Grid
pub fn from(grid: &[&[f32]]) -> Grid
pub fn outside(&self, coord: (usize, usize)) -> bool
pub fn within(&self, coord: (usize, usize)) -> bool
pub fn node_id(&self, coord: (usize, usize)) -> usize
pub fn coords(&self, node_id: usize) -> (usize, usize)
pub fn cost(&self, node_id: usize) -> f32
Auto Trait Implementations§
impl Freeze for Grid
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnwindSafe for Grid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more