pub type ComplexCooMatrix = NumCooMatrix<Complex64>;Expand description
Defines an alias to NumCooMatrix with Complex64
Aliased Type§
pub struct ComplexCooMatrix { /* private fields */ }Implementations§
Source§impl ComplexCooMatrix
impl ComplexCooMatrix
Sourcepub fn assign_real(
&mut self,
alpha: f64,
beta: f64,
other: &CooMatrix,
) -> Result<(), StrError>
pub fn assign_real( &mut self, alpha: f64, beta: f64, other: &CooMatrix, ) -> Result<(), StrError>
Assigns this matrix to the values of another real matrix (scaled)
Performs:
this = (α + βi) · otherThus:
this[p].real = α · other[p]
this[p].imag = β · other[p]
other[p] ∈ Reals
p = [0, nnz(other)]Warning: make sure to allocate max_nnz ≥ nnz(other).
Sourcepub fn add_real(
&mut self,
alpha: f64,
beta: f64,
other: &CooMatrix,
) -> Result<(), StrError>
pub fn add_real( &mut self, alpha: f64, beta: f64, other: &CooMatrix, ) -> Result<(), StrError>
Puts the entries of another real matrix into this matrix
Effectively, performs:
this += (α + βi) · otherThus:
this[p].real += α · other[p]
this[p].imag += β · other[p]
other[p] ∈ Reals
p = [0, nnz(other)]§Arguments
alpha– scaling factorother– the other matrix to be added. It must be at most as large asthis.
§Requirements
other.nrow ≤ this.nrowother.ncol ≤ this.ncolother.symmetric == this.symmetric
§Note
- make sure to allocate
max_nnz ≥ nnz(this) + nnz(other).