Struct matrix::band::Band [] [src]

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

A band 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> Band<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<T: PartialEq + Element> PartialEq for Band<T>
[src]

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

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

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

This method tests for !=.

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

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

Formats the value using the given formatter.

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

fn clone(&self) -> Band<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

impl<T: Element> Size for Band<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 Band<T>
[src]

type Element = T

The element type.

fn nonzeros(&self) -> usize

Count the number of nonzero elements.

fn transpose(&mut self)

Transpose the matrix in place.

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

Create a zero matrix.

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

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

Performs the conversion.

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

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

Performs the conversion.