pub trait Weights<C> {
    // Required methods
    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;
}
Expand description

Adjacency matrix for weights.

Required Methods§

source

fn rows(&self) -> usize

Return the number of rows.

source

fn columns(&self) -> usize

Return the number of columns.

source

fn at(&self, row: usize, col: usize) -> C

Return the element at position.

source

fn neg(&self) -> Self
where Self: Sized, C: Signed,

Return the negated weights.

Implementors§

source§

impl<C: Copy> Weights<C> for Matrix<C>