[][src]Struct mrslac::matrix::sparse_crs::SparseCRS

pub struct SparseCRS { /* fields omitted */ }

Implementations

impl SparseCRS[src]

pub fn new(rows: usize, columns: usize) -> SparseCRS[src]

creates a new matrix

pub fn resize(&mut self, rows: usize, columns: usize)[src]

resizes the vector

Trait Implementations

impl BasicReadableMatrix for SparseCRS[src]

fn get_rows(&self) -> usize[src]

returns the number of rows in the matrix

fn get_columns(&self) -> usize[src]

returns the number of columns in the matrix

fn get_element(&self, i: usize, j: usize) -> f32[src]

returns the (i,j)-th element of the matrix

impl BasicWriteableMatrix for SparseCRS[src]

fn set_element(&mut self, i: usize, j: usize, new_value: f32)[src]

sets the (i,j)-th element of the sparse matrix

fn set_zero(&mut self)[src]

sets all elements to zero

impl SparseMatrix for SparseCRS[src]

fn nnz(&self) -> usize[src]

returns the number of non-null matrix elements

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.