[−][src]Struct ohsl::matrix::Sparse
Implementations
impl<T: Clone + Number> Sparse<T>
[src]
pub fn empty(rows: usize, cols: usize) -> Self
[src]
Create a new sparse matrix where all values are zero
pub fn new(
rows: usize,
cols: usize,
mut triplets: &mut Vector<Triplet<T>>
) -> Self
[src]
rows: usize,
cols: usize,
mut triplets: &mut Vector<Triplet<T>>
) -> Self
Create a new sparse matrix from a Vector of Triplets
pub fn rows(&self) -> usize
[src]
Return the number of rows in the sparse matrix
pub fn cols(&self) -> usize
[src]
Return the number of columns in the sparse matrix
pub fn nonzero(&self) -> usize
[src]
Return the number of nonzero values
pub fn val(&self) -> Vector<T>
[src]
Return the Vector of nonzero values
pub fn row_index(&self) -> Vector<usize>
[src]
Return the vector of row indices
pub fn col_start(&self) -> Vector<usize>
[src]
Return the vector of pointers to start of columns
pub fn scale(&mut self, scalar: T)
[src]
Scale the Sparse matrix by a constant factor
pub fn multiply(&self, x: &Vector<T>) -> Vector<T>
[src]
Multiply the Sparse matrix by a Vector to the right
pub fn transpose_multiply(&self, x: &Vector<T>) -> Vector<T>
[src]
Multiply the transpose of the Sparse matrix by a Vector to the right
pub fn col_index(&self) -> Vector<usize>
[src]
Return a Vector of column indices relating to each value (triplet form)
pub fn insert(&mut self, row: usize, col: usize, value: T)
[src]
Insert a nonzero element into the SparseMatrix
impl Sparse<f64>
[src]
pub fn solve_bicg(
&self,
b: Vec64,
guess: Vec64,
max_iter: usize,
tol: f64
) -> Vec64
[src]
&self,
b: Vec64,
guess: Vec64,
max_iter: usize,
tol: f64
) -> Vec64
Solve the system of equations Ax=b using the biconjugate gradient method
pub fn solve_bicgstab(
&self,
b: Vec64,
guess: Vec64,
max_iter: usize,
tol: f64
) -> Vec64
[src]
&self,
b: Vec64,
guess: Vec64,
max_iter: usize,
tol: f64
) -> Vec64
Solve the system of equations Ax=b using the stabilised biconjugate gradient method
Auto Trait Implementations
impl<T> RefUnwindSafe for Sparse<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for Sparse<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for Sparse<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for Sparse<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for Sparse<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,