Struct rgsl::types::series_acceleration::LevinUWorkspace [] [src]

pub struct LevinUWorkspace {
    // some fields omitted
}

Workspace for Levin U Transform with error estimation

Methods

impl LevinUWorkspace
[src]

fn new(n: usize) -> Option<LevinUWorkspace>

This function allocates a workspace for a Levin u-transform of n terms. The size of the workspace is O(2n2 + 3n).

fn accel(&self, array: &[f64], sum_accel: &mut f64, abserr: &mut f64) -> Value

This function takes the terms of a series in array of size array_size and computes the extrapolated limit of the series using a Levin u-transform. Additional working space must be provided in w. The extrapolated sum is stored in sum_accel, with an estimate of the absolute error stored in abserr. The actual term-by-term sum is returned in w->sum_plain. The algorithm calculates the truncation error (the difference between two successive extrapolations) and round-off error (propagated from the individual terms) to choose an optimal number of terms for the extrapolation. All the terms of the series passed in through array should be non-zero.

fn sum_plain(&self) -> f64

fn terms_used(&self) -> usize

fn size(&self) -> usize

Trait Implementations

impl Drop for LevinUWorkspace
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more