Trait pathfinding::Weights
[−]
[src]
pub trait Weights<C> {
fn rows(&self) -> usize;
fn columns(&self) -> usize;
fn at(&self, row: usize, col: usize) -> C;
fn neg(&self) -> Self
where
Self: Sized,
C: Signed;
}Adjacency matrix for weights.
Required Methods
fn rows(&self) -> usize
Return the number of rows.
fn columns(&self) -> usize
Return the number of columns.
fn at(&self, row: usize, col: usize) -> C
Return the element at position.
fn neg(&self) -> Self where
Self: Sized,
C: Signed,
Self: Sized,
C: Signed,
Return the negated weights.