extendr_api::prelude::modules::cholesky::llt::update

Function rank_r_update_clobber

pub fn rank_r_update_clobber<E>(
    cholesky_factor: MatMut<'_, E>,
    w: MatMut<'_, E>,
    alpha: ColMut<'_, E>,
) -> Result<(), CholeskyError>
where E: ComplexField,
Expand description

Performs a rank-r update in place, while clobbering the inputs.

Takes the Cholesky factor $L$ of a matrix $A$, i.e., $LL^H = A$, a matrix $W$ and a column vector $\alpha$, which is interpreted as a diagonal matrix.

This function computes the Cholesky factor of $A + W\text{Diag}(\alpha)W^H$, and stores the result in the storage of the original cholesky factors.

The matrix $W$ and the vector $\alpha$ are clobbered, meaning that the values they contain after the function is called are unspecified.

ยงPanics

Panics if any of these conditions is violated:

  • cholesky_factor must be square of dimension n.
  • w must have n rows.
  • alpha must have one column.
  • alpha must have the same number of rows as the number of columns in w.