Trait SampleRangePowerIteration

Source
pub trait SampleRangePowerIteration<A: Scalar> {
    // Required method
    fn sample_range_power_iteration<R: Rng>(
        &self,
        k: usize,
        p: usize,
        it_count: usize,
        rng: &mut R,
    ) -> Result<Array2<A>>;
}
Expand description

Randomly sample the range of an operator through a power iteration

Let $A\in\mathbb{C}{m\times n}$ be a matrix. To sample the range of rank $k$ one can multiply $A$ by a Gaussian random matrix $\Omega$ of dimension $n\times k + p$, where $p$ is a small oversampling parameter. To improve the accuracy of the range computation this is then it_count times multiplied with the operator $AA^H$. Each intermediate result is QR orthogonalized to stabilise this power iteration. The result of the power iteration is post-processed by a pivoted QR decomposition and the first $k$ columns of the $Q$ matrix in the pivoted QR decomposition returned.

Required Methods§

Source

fn sample_range_power_iteration<R: Rng>( &self, k: usize, p: usize, it_count: usize, rng: &mut R, ) -> Result<Array2<A>>

Randomly sample the range of an operator refined through a power iteration Return an approximate orthogonal basis of the dominant range.

§Arguments
  • k: The target rank of the basis for the range.
  • p: Oversampling parameter. p should be chosen small. A typical size is p=5.
  • it_count: The number of steps in the power iteration. For it_count = 0 the routine is identical to sample_range_by_rank.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§