extendr_api::prelude::modules::core::householder

Function make_householder_in_place

pub fn make_householder_in_place<E>(
    essential: Option<ColMut<'_, E>>,
    head: E,
    tail_norm: <E as ComplexField>::Real,
) -> (E, E)
where E: ComplexField,
Expand description

Computes the Householder reflection $I - \frac{v v^H}{\tau}$ such that when multiplied by $x$ from the left, The result is $\beta e_0$. $\tau$ and $\beta$ are returned and $\tau$ is real-valued.

$x$ is determined by $x_0$, contained in head, and $|x_{1\dots}|$, contained in tail_norm. The vector $v$ is such that $v_0 = 1$ and $v_{1\dots}$ is stored in essential (when provided).