Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
A newer version of this document is available. Customers should click here to go to the newest version.
Convolution and Correlation Mathematical Notation and Definitions
The following notation is necessary to explain the underlying mathematical definitions used in the text:
\(\mathbb{R} = (-\infty, +\infty)\) |
The set of real numbers. |
\(\mathbb{Z} = \{0, \pm 1, \pm 2, \dots\}\) |
The set of integer numbers. |
\(\mathbb{Z}^{N} = \mathbb{Z} \times \dots \times \mathbb{Z}\) |
The set of \(N\)-dimensional series of integer numbers. |
\(p = (p_{1}, \dots, p_{N}) \in \mathbb{Z}^{N}\) |
N-dimensional series of integers. |
\(u : \mathbb{Z}^{N} \to \mathbb{R}\) |
Function \(u\) with arguments from \(\mathbb{Z}^{N}\) and values from \(\mathbb{R}\). |
\(u(p) = u(p_1, \dots, p_N)\) |
The value of the function \(u\) for the argument \((p_1, \dots, p_N)\). |
\(w = u \ast v\) |
Function \(w\) is the convolution of the functions \(u\) and \(v\). |
\(w = u \star v\) |
Function \(w\) is the correlation of the functions \(u\) and \(v\). |
Given series \(p, q \in \mathbb{Z}^N\):
series \(r = p + q\) is defined as \(r_{n} = p_{n} + q_{n}\) for every \(n = 1, \dots, N\)
series \(r = p - q\) is defined as \(r_{n} = p_{n} - q_{n}\) for every \(n = 1, \dots, N\)
series \(r = sup\{p, q\}\) is defines as \(r_{n} = max\{p_{n}, q_{n}\}\) for every \(n = 1, \dots, N\)
series \(r = inf\{p, q\}\) is defined as \(r_{n} = min\{p_{n}, q_{n}\}\) for every \(n = 1, \dots, N\)
inequality \(p \le q\) means that \(p^n \le q^n\) for every \(n = 1, \dots, N\).
A function \(u(p)\) is called a finite function if there exist series \(P^{min}, P^{max} \in \mathbb{Z}^{N}\) such that:
\(u(p) \ne 0\) implies \(P^{min} \le p \le P^{max}\).
Operations of convolution and correlation are only defined for finite functions.
Consider functions \(u\), \(v\) and series \(P^{min}, P^{max}, Q^{min}, Q^{max} \in \mathbb{Z}^{N}\) such that:
\(u(p) \ne 0\) implies \(P^{min} \le p \le P^{max}\).
\(v(q) \ne 0\) implies \(Q^{min} \le q \le Q^{max}.\)
Definitions of linear correlation and linear convolution for functions \(u\) and \(v\) are given below.
Linear Convolution
If function \(w = u \ast v\) is the convolution of \(u\) and \(v\), then:
\(w(r) \ne 0\) implies \(R^{min} \le r \le R^{max}\), where \(R^{min} = P^{min} + Q^{min}\) and \(R^{max} = P^{max} + Q^{max}.\)
If \(R^{min} \le r \le R^{max}\), then:
\[w(r) = \sum_{t = T^{min}}^{T^{max}} u(t) v(r - t)\]
where \(T^{min} = sup\{P^{min}, r - Q^{max}\}\) and \(T^{max} = inf\{P^{max}, r - Q^{min}\}\).
Linear Correlation
If function \(w = u \star v\) is the correlation of \(u\) and \(v\), then:
\(w(r) \ne 0\) implies \(R^{min} \le r \le R^{max}\), where \(R^{min} = Q^{min} - P^{max}\) and \(R^{max} = Q^{max} - P^{min}\).
If \(R^{min} \le r \le R^{max}\), then:
\[w(r) = \sum_{t = T^{min}}^{T^{max}} u(t) v(r + t)\]
where \(T^{min} = sup\{P^{min}, Q^{min} - r\}\) and \(T^{max} = inf\{P^{max}, Q^{max} - r\}\).
Representation of the functions \(u\), \(v\), \(w\) as the input/output data for the Intel® oneAPI Math Kernel Library (oneMKL) convolution and correlation functions is described in Data Allocation.