Struct matrix::format::banded::Banded [] [src]

pub struct Banded<T: Element> {
    pub rows: usize,
    pub columns: usize,
    pub superdiagonals: usize,
    pub subdiagonals: usize,
    pub values: Vec<T>,
}

A banded matrix.

Fields

rows: usize

The number of rows.

columns: usize

The number of columns.

superdiagonals: usize

The number of superdiagonals.

subdiagonals: usize

The number of subdiagonals.

values: Vec<T>

The values of the diagonal elements stored as a (superdiagonals + 1 + subdiagonals) × columns matrix such that the first row corresponds to the uppermost superdiagonal whereas the last row corresponds to the lowest supdiagonal.

Methods

impl<T: Element> Banded<T>
[src]

fn new<S: Size>(size: S, superdiagonals: usize, subdiagonals: usize) -> Self

Create a zero matrix.

fn diagonals(&self) -> usize

Return the number of diagonals.

fn iter<'l>(&'l self) -> Iterator<'l, T>

Return a sparse iterator.

Trait Implementations

impl<'l, T: Element> From<&'l Diagonal<T>> for Banded<T>
[src]

fn from(matrix: &'l Diagonal<T>) -> Self

Performs the conversion.

impl<T: Element> From<Diagonal<T>> for Banded<T>
[src]

fn from(matrix: Diagonal<T>) -> Self

Performs the conversion.

impl<T: Element> Transpose for Banded<T>
[src]

fn transpose(&self) -> Self

Perform the transpose.

impl<T: Element> Size for Banded<T>
[src]

fn rows(&self) -> usize

Return the number of rows.

fn columns(&self) -> usize

Return the number of columns.

fn dimensions(&self) -> (usize, usize)

Return the number of rows and columns.

impl<T: Element> Matrix for Banded<T>
[src]

type Element = T

The element type.

fn nonzeros(&self) -> usize

Count nonzero elements.

fn zero<S: Size>(size: S) -> Self

Create a zero matrix.

Derived Implementations

impl<T: PartialEq + Element> PartialEq for Banded<T>
[src]

fn eq(&self, __arg_0: &Banded<T>) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &Banded<T>) -> bool

This method tests for !=.

impl<T: Debug + Element> Debug for Banded<T>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl<T: Clone + Element> Clone for Banded<T>
[src]

fn clone(&self) -> Banded<T>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more