Skip to main content

ComplexCooMatrix

Type Alias ComplexCooMatrix 

Source
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

Source

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) · other

Thus:

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).

Source

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) · other

Thus:

this[p].real += α · other[p]
this[p].imag += β · other[p]

other[p] ∈ Reals
p = [0, nnz(other)]
§Arguments
  • alpha – scaling factor
  • other – the other matrix to be added. It must be at most as large as this.
§Requirements
  • other.nrow ≤ this.nrow
  • other.ncol ≤ this.ncol
  • other.symmetric == this.symmetric
§Note
  • make sure to allocate max_nnz ≥ nnz(this) + nnz(other).