Struct pathfinding::Matrix [] [src]

pub struct Matrix<C> {
    pub rows: usize,
    pub columns: usize,
    // some fields omitted
}

Matrix of an arbitrary type

Fields

Rows

Columns

Methods

impl<C: Clone> Matrix<C>
[src]

[src]

Create new matrix with an initial value.

[src]

Create new square matrix with initial value.

[src]

Fill with a known value.

impl<C> Matrix<C>
[src]

[src]

Create new matrix from vector values. The first value will be assigned to index (0, 0), the second one to index (0, 1), and so on.

Panics

This function will panic if the number of values does not correspond to the announced size.

[src]

Create new square matrix from vector values. The first value will be assigned to index (0, 0), the second one to index (0, 1), and so on.

Panics

This function will panic if the number of values is not a square number.

[src]

Check if a matrix is a square one.

Trait Implementations

impl<C: Copy> Weights<C> for Matrix<C>
[src]

[src]

Return the number of rows.

[src]

Return the number of columns.

[src]

Return the element at position.

[src]

Return the negated weights.

impl<C: Debug> Debug for Matrix<C>
[src]

[src]

Formats the value using the given formatter.

impl<C: Clone> Clone for Matrix<C>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<C: Clone + Signed> Neg for Matrix<C>
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a, C> Index<&'a (usize, usize)> for Matrix<C>
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl<'a, C> IndexMut<&'a (usize, usize)> for Matrix<C>
[src]

[src]

Performs the mutable indexing (container[index]) operation.