# `library.sum` Submodule¶

## Module Summary¶

Interfaces for the NAG Mark 29.0 sum Chapter.

`sum` - Summation of Series

This module is concerned with the following tasks:

1. calculating the discrete Fourier transform of a sequence of real or complex data values;

2. calculating the discrete convolution or the discrete correlation of two sequences of real or complex data values using discrete Fourier transforms;

3. calculating the inverse Laplace transform of a user-supplied function;

4. calculating the fast Gauss transform approximation to the discrete Gauss transform;

5. direct summation of orthogonal series;

6. acceleration of convergence of a sequence of real values.

`naginterfaces.library.examples.sum` :

This subpackage contains examples for the `sum` module. See also the Examples subsection.

## Functionality Index¶

Acceleration of convergence: `accelerate()`

Convolution or Correlation

complex vectors: `convcorr_complex()`

real vectors

Discrete Fourier Transform

multidimensional

complex sequence

multiple half - and quarter-wave transforms

Fourier cosine transforms

Fourier cosine transforms, simple use: `fft_cosine()`

Fourier sine transforms

Fourier sine transforms, simple use: `fft_sine()`

quarter-wave cosine transforms

quarter-wave cosine transforms, simple use: `fft_qtrcosine()`

quarter-wave sine transforms

quarter-wave sine transforms, simple use: `fft_qtrsine()`

one-dimensional

multiple transforms

complex sequence

complex storage, contiguous sequence elements: `fft_complex_1d_multi_col()`

complex storage by rows: `fft_complex_1d_multi_row()`

Hermitian/real sequence

complex storage, contiguous sequence elements: `fft_realherm_1d_multi_col()`

complex storage, strided sequence elements: `fft_realherm_1d_multi_row()`

multi-variable

single transforms

complex sequence

time-saving

Hermitian/real sequence

time-saving

Hermitian sequence

time-saving

real sequence

time-saving

three-dimensional

complex sequence

Hermitian/real sequence

two-dimensional

complex sequence

Hermitian/real sequence

Fast Gauss Transform: `fast_gauss()`

Inverse Laplace Transform

Crump’s method: `invlaplace_crump()`

Weeks’ method

compute coefficients of solution: `invlaplace_weeks()`

evaluate solution: `invlaplace_weeks_eval()`

Summation of Chebyshev series: `chebyshev()`

For full information please refer to the NAG Library document

https://www.nag.com/numeric/nl/nagdoc_29/flhtml/c06/c06intro.html

## Examples¶

naginterfaces.library.examples.sum.convcorr_real_ex.main()[source]

Circular convolution or correlation of two real vectors.

```>>> main()
naginterfaces.library.sum.convcorr_real Python Example Results.
Circular convolution of two real vectors.
Convolution:
(2.000000, 2.000000, 2.000000, 2.000000, 2.000000).
```