pub struct FaerSparseMat<T: FaerScalar> { /* private fields */ }Trait Implementations§
Source§impl<T: Scalar + FaerScalar> Add<&FaerSparseMat<T>> for FaerSparseMat<T>
impl<T: Scalar + FaerScalar> Add<&FaerSparseMat<T>> for FaerSparseMat<T>
Source§type Output = FaerSparseMat<T>
type Output = FaerSparseMat<T>
The resulting type after applying the
+ operator.Source§impl<T: Clone + FaerScalar> Clone for FaerSparseMat<T>
impl<T: Clone + FaerScalar> Clone for FaerSparseMat<T>
Source§fn clone(&self) -> FaerSparseMat<T>
fn clone(&self) -> FaerSparseMat<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug + FaerScalar> Debug for FaerSparseMat<T>
impl<T: Debug + FaerScalar> Debug for FaerSparseMat<T>
Source§impl<T: FaerScalar> DefaultSolver for FaerSparseMat<T>
impl<T: FaerScalar> DefaultSolver for FaerSparseMat<T>
type LS = FaerSparseLU<T>
fn default_solver() -> Self::LS
Source§impl<T: FaerScalar> LinearSolver<FaerSparseMat<T>> for FaerSparseLU<T>
impl<T: FaerScalar> LinearSolver<FaerSparseMat<T>> for FaerSparseLU<T>
Source§fn set_linearisation<C: LinearOp<T = T, V = FaerVec<T>, M = FaerSparseMat<T>, C = FaerContext>>(
&mut self,
op: &C,
)
fn set_linearisation<C: LinearOp<T = T, V = FaerVec<T>, M = FaerSparseMat<T>, C = FaerContext>>( &mut self, op: &C, )
Set the point at which the linear operator
A is evaluated and factorise it. Read morefn solve_in_place(&self, x: &mut FaerVec<T>) -> Result<(), LaError>
Source§fn set_sparsity<C: LinearOp<T = T, V = FaerVec<T>, M = FaerSparseMat<T>, C = FaerContext>>(
&mut self,
op: &C,
)
fn set_sparsity<C: LinearOp<T = T, V = FaerVec<T>, M = FaerSparseMat<T>, C = FaerContext>>( &mut self, op: &C, )
Set the sparsity of the problem to be solved, any previous problem is discarded. Read more
Source§impl<T: FaerScalar> Matrix for FaerSparseMat<T>
impl<T: FaerScalar> Matrix for FaerSparseMat<T>
type Sparsity = SymbolicSparseColMat<Own<usize>>
type SparsityRef<'a> = SymbolicSparseColMat<Ref<'a, usize>>
Source§fn sparsity(&self) -> Option<Self::SparsityRef<'_>>
fn sparsity(&self) -> Option<Self::SparsityRef<'_>>
Return sparsity information, or
None if the matrix is dense.Source§fn context(&self) -> &FaerContext
fn context(&self) -> &FaerContext
Get the context associated with this matrix (for device placement, memory management, etc.).
Source§fn inner_mut(&mut self) -> &mut Self::Inner
fn inner_mut(&mut self) -> &mut Self::Inner
Get a mutable reference to the inner representation of the matrix.
Source§fn gather(&mut self, other: &Self, indices: &<Self::V as Vector>::Index)
fn gather(&mut self, other: &Self, indices: &<Self::V as Vector>::Index)
Gather values from another matrix at specified indices into this matrix. Read more
Source§fn set_data_with_indices(
&mut self,
dst_indices: &<Self::V as Vector>::Index,
src_indices: &<Self::V as Vector>::Index,
data: &Self::V,
)
fn set_data_with_indices( &mut self, dst_indices: &<Self::V as Vector>::Index, src_indices: &<Self::V as Vector>::Index, data: &Self::V, )
Assign the values in the
data vector to this matrix at the indices in dst_indices
from the indices in src_indices. Read moreSource§fn add_column_to_vector(&self, j: IndexType, v: &mut Self::V)
fn add_column_to_vector(&self, j: IndexType, v: &mut Self::V)
Add a column of this matrix to a vector: v += self[:, j]
Source§fn triplet_iter(
&self,
) -> (impl Iterator<Item = (IndexType, IndexType)> + '_, impl Iterator<Item = Self::T> + '_)
fn triplet_iter( &self, ) -> (impl Iterator<Item = (IndexType, IndexType)> + '_, impl Iterator<Item = Self::T> + '_)
Iterate over structural positions and values of the matrix. Read more
Source§fn try_from_triplets(
nrows: IndexType,
ncols: IndexType,
indices: Vec<(IndexType, IndexType)>,
values: Vec<Self::T>,
ctx: Self::C,
) -> Result<Self, LaError>
fn try_from_triplets( nrows: IndexType, ncols: IndexType, indices: Vec<(IndexType, IndexType)>, values: Vec<Self::T>, ctx: Self::C, ) -> Result<Self, LaError>
Create a new matrix from structural indices and values. Read more
Source§fn gemv(&self, alpha: Self::T, x: &Self::V, beta: Self::T, y: &mut Self::V)
fn gemv(&self, alpha: Self::T, x: &Self::V, beta: Self::T, y: &mut Self::V)
Perform a matrix-vector multiplication: y = alpha * self * x + beta * y
Source§fn zeros(nrows: IndexType, ncols: IndexType, ctx: Self::C) -> Self
fn zeros(nrows: IndexType, ncols: IndexType, ctx: Self::C) -> Self
Create a new matrix of shape
nrows x ncols filled with zeros.Source§fn from_diagonal(v: &FaerVec<T>) -> Self
fn from_diagonal(v: &FaerVec<T>) -> Self
Create a new diagonal matrix from a vector holding the diagonal elements.
Source§fn partition_indices_by_zero_diagonal(
&self,
) -> (<Self::V as Vector>::Index, <Self::V as Vector>::Index)
fn partition_indices_by_zero_diagonal( &self, ) -> (<Self::V as Vector>::Index, <Self::V as Vector>::Index)
Partition the diagonal indices into two groups: those with zero diagonal elements and those with non-zero diagonal elements. Read more
Source§fn set_column(&mut self, j: IndexType, v: &Self::V)
fn set_column(&mut self, j: IndexType, v: &Self::V)
Source§fn scale_add_and_assign(&mut self, x: &Self, beta: Self::T, y: &Self)
fn scale_add_and_assign(&mut self, x: &Self, beta: Self::T, y: &Self)
Perform the assignment: self = x + beta * y where x and y are matrices and beta is a scalar. Read more
Source§fn new_from_sparsity(
nrows: IndexType,
ncols: IndexType,
sparsity: Option<Self::Sparsity>,
ctx: Self::C,
) -> Self
fn new_from_sparsity( nrows: IndexType, ncols: IndexType, sparsity: Option<Self::Sparsity>, ctx: Self::C, ) -> Self
Create a new matrix from a sparsity pattern. Non-zero elements are not initialized.
Source§impl<T: Scalar + FaerScalar> MatrixCommon for FaerSparseMat<T>
impl<T: Scalar + FaerScalar> MatrixCommon for FaerSparseMat<T>
Source§impl<T: FaerScalar> MatrixSparsity<FaerSparseMat<T>> for SymbolicSparseColMat<IndexType>
impl<T: FaerScalar> MatrixSparsity<FaerSparseMat<T>> for SymbolicSparseColMat<IndexType>
fn union( self, other: SymbolicSparseColMatRef<'_, IndexType>, ) -> Result<SymbolicSparseColMat<IndexType>, LaError>
fn as_ref(&self) -> SymbolicSparseColMatRef<'_, IndexType>
fn nrows(&self) -> IndexType
fn ncols(&self) -> IndexType
fn is_sparse() -> bool
fn indices(&self) -> Vec<(IndexType, IndexType)>
fn new_diagonal(n: IndexType) -> Self
fn try_from_indices( nrows: IndexType, ncols: IndexType, indices: Vec<(IndexType, IndexType)>, ) -> Result<Self, LaError>
fn get_index( &self, indices: &[(IndexType, IndexType)], ctx: FaerContext, ) -> <<FaerSparseMat<T> as MatrixCommon>::V as Vector>::Index
Source§impl<'a, T: FaerScalar> MatrixSparsityRef<'a, FaerSparseMat<T>> for SymbolicSparseColMatRef<'a, IndexType>
impl<'a, T: FaerScalar> MatrixSparsityRef<'a, FaerSparseMat<T>> for SymbolicSparseColMatRef<'a, IndexType>
fn to_owned(&self) -> SymbolicSparseColMat<IndexType>
fn nrows(&self) -> IndexType
fn ncols(&self) -> IndexType
fn is_sparse() -> bool
fn split( &self, indices: &<<FaerSparseMat<T> as MatrixCommon>::V as Vector>::Index, ) -> [(SymbolicSparseColMat<IndexType>, <<FaerSparseMat<T> as MatrixCommon>::V as Vector>::Index); 4]
fn indices(&self) -> Vec<(IndexType, IndexType)>
Source§impl<'a, T: FaerScalar> Mul<Scale<T>> for FaerSparseMat<T>
impl<'a, T: FaerScalar> Mul<Scale<T>> for FaerSparseMat<T>
Source§impl<'a, T: FaerScalar> Mul<Scale<T>> for &FaerSparseMat<T>
impl<'a, T: FaerScalar> Mul<Scale<T>> for &FaerSparseMat<T>
Source§impl<T: Scalar + FaerScalar> Sub<&FaerSparseMat<T>> for FaerSparseMat<T>
impl<T: Scalar + FaerScalar> Sub<&FaerSparseMat<T>> for FaerSparseMat<T>
Source§type Output = FaerSparseMat<T>
type Output = FaerSparseMat<T>
The resulting type after applying the
- operator.Auto Trait Implementations§
impl<T> Freeze for FaerSparseMat<T>
impl<T> RefUnwindSafe for FaerSparseMat<T>where
T: RefUnwindSafe,
impl<T> Send for FaerSparseMat<T>
impl<T> Sync for FaerSparseMat<T>
impl<T> Unpin for FaerSparseMat<T>where
T: Unpin,
impl<T> UnsafeUnpin for FaerSparseMat<T>
impl<T> UnwindSafe for FaerSparseMat<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<M, Rhs, Output> MatrixOpsByValue<Rhs, Output> for M
impl<RefT, M> MatrixRef<M> for RefT
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.