power_iteration4

Function power_iteration4 

Source
pub fn power_iteration4(
    a: ArrayView2<'_, f64>,
    x: &mut Array1<f64>,
    options: &Options,
) -> (f64, usize)
Expand description

Computes the dominant eigenvector of the given matrix a using a modified power iteration algorithm.

This function is similar to the power_iteration function, but uses a different normalization approach. Instead of normalizing the eigenvector by its L2 norm, it is normalized by its L1 norm. This can sometimes lead to faster convergence, especially for sparse matrices.

The function takes the matrix a, an initial guess for the eigenvector x, and a set of options controlling the algorithm’s behavior. It returns the dominant eigenvalue and the number of iterations performed.