Series acceleration by Levin u-transform (GSL) More...
#include <series_acc.h>
Given an array of terms in a sum, this attempts to evaluate the entire sum with an estimate of the error.
Move the workspaces to classes?
Create an example
Definition at line 69 of file series_acc.h.
Public Member Functions | |
| series_acc (size_t size=0) | |
size is the number of terms in the series | |
| template<class vec_t > | |
| double | series_accel (size_t na, vec_t &array, double &abserr_trunc) |
| Return the accelerated sum of the series with a simple error estimate. More... | |
| template<class vec_t > | |
| double | series_accel_err (size_t na, vec_t &array, double &abserr) |
| Return the accelerated sum of the series with an accurate error estimate. More... | |
| void | set_size (size_t new_size) |
| Set the number of terms. | |
Protected Member Functions | |
| size_t | series_index (size_t i, size_t j, size_t nmax) |
| An internal function reducing two matrix indices, i and j, to index of a single array. | |
| int | levin_u_step (const double term, const size_t n, const size_t nmax, double &sum_accel) |
| Perform a step. | |
| int | levin_utrunc_step (const double term, const size_t n, double &sum_accel) |
| Perform a step. | |
Protected Attributes | |
| gsl_sum_levin_u_workspace * | w |
| The GSL workspace. | |
| gsl_sum_levin_utrunc_workspace * | wt |
| The GSL workspace. | |
| size_t | size |
| The workspace size. | |
|
inline |
The input vector x should be an array with n values from x[0] to x[n-1].
Definition at line 86 of file series_acc.h.
|
inline |
The input vector x should be an array with n values from x[0] to x[n-1].
Definition at line 209 of file series_acc.h.
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).