![]() |
Eigen-Contrib
5.0.1
|
#include <contrib/Eigen/src/StructuredMatrices/Circulant.h>
An n x n circulant matrix represented by its first column.
For first column \(c\) and unitary DFT matrix \(F\),
\[ C_{ij}=c_{(i-j)\bmod n}, \qquad C=F^*\operatorname{diag}(Fc)F. \]
Thus its eigenvalues – the operator's symbol – are \(Fc\), computed once at construction and reused by every product. This yields an O(n log n) matrix-vector product (operator*), an O(n log n) direct (pseudo-inverse) solve (solve), and closed-form factorizations: the eigendecomposition (eigenvalues, eigenvectors) and the SVD (singularValues, matrixU, matrixV) in the Fourier basis, plus rank, inverse and determinant. The class is closed under transpose, conjugate and adjoint, which reuse the cached symbol instead of recomputing FFTs.
The operator stores its own copy of the generating column and derives from EigenBase. Because operator* returns an Eigen product expression, a Circulant also drops into the matrix-free iterative solvers, and it can be assigned to a dense matrix when an explicit representation is needed. As with any matrix-free operator, the iterative solvers must be instantiated with IdentityPreconditioner (e.g. ConjugateGradient<Circulant<double>,Lower|Upper,IdentityPreconditioner>): the default preconditioners read individual coefficients through col() or InnerIterator, which the structured operators do not expose.
| Scalar_ | the scalar type, real or complex. |
| Size_ | the dimension at compile time, or Dynamic (the default). |
Inheritance diagram for Eigen::Circulant< Scalar_, Size_ >:Public Member Functions | |
| Circulant | adjoint () const |
| template<typename Derived> | |
| Circulant (const MatrixBase< Derived > &col) | |
| Scalar | coeff (Index row, Index col) const |
| const GeneratorType & | column () const |
| Circulant | conjugate () const |
| Scalar | determinant () const |
| ComplexVector | eigenvalues () const |
| ComplexMatrix | eigenvectors () const |
| Circulant | inverse () const |
| ComplexMatrix | matrixU () const |
| ComplexMatrix | matrixV () const |
| template<typename Rhs> | |
| Product< Circulant, Rhs > | operator* (const MatrixBase< Rhs > &x) const |
| Index | rank () const |
| RealVector | singularValues () const |
| template<typename Rhs> | |
| Matrix< Scalar, Size_, Rhs::ColsAtCompileTime > | solve (const MatrixBase< Rhs > &b) const |
| ComplexVector | symbol () const |
| Circulant | transpose () const |
|
inlineexplicit |
Builds a circulant matrix from its first column col.
When the matrix is large enough for products to take the FFT path, the DFT of col – the eigenvalues of the matrix – is computed here, once, and reused by every subsequent product and solve.
|
inline |
*this, itself a Circulant operator. The cached symbols, when present, are reused: the symbols of the adjoint are the elementwise conjugates of the symbols (the eigenvalues conjugate while the Fourier eigenbasis stays fixed).
|
inline |
|
inline |
|
inline |
*this, itself a Circulant operator. The cached symbols, when present, are reused: the symbols of the conjugate are the conjugated index reversals of the symbols.
|
inline |
m * 2^e (the split fraction/exponent determinant convention of LINPACK's xGEDI [4]) – every factor and the running product are renormalized to unit magnitude with the power of two tracked separately – so the partial products can neither overflow nor underflow when the determinant itself is representable, whatever the ordering of large and small eigenvalues. For a real operator the product is real up to roundoff, and its real part is returned.
|
inline |
k is symbol()[k], and its (unit-norm) eigenvector is the Fourier vector f_k with \( (f_k)_j = e^{2\pi i j k / n} / \sqrt{n} \), see eigenvectors. Every circulant matrix is diagonalized by this same Fourier basis.
|
inline |
k is the Fourier vector f_k matching eigenvalues()[k]. n x n matrix; unlike the other methods of this class this costs O(n^2) storage.
|
inline |
|
inline |
U: column t is the Fourier vector of the t-th largest symbol entry, scaled by its phase (phase 1 for a zero entry). Dense n x n, see the note in eigenvectors.
|
inline |
V: column t is the Fourier vector of the t-th largest symbol entry. Dense n x n, see the note in eigenvectors.
|
inline |
(*this) * x, evaluated through a fast FFT-based matrix-vector product. The expression carries the default product tag, so assigning it behaves like any dense product: a temporary resolves aliasing between the destination and x, and .noalias() skips it.
|
inline |
n * epsilon * max_k|symbol[k]|, clamped from below by the smallest normal number. This is the same threshold solve uses to decide which Fourier components to invert, and the comparison is strict like SVDBase's, so an entry sitting exactly on the threshold still counts as non-zero.
|
inline |
*this = U * singularValues().asDiagonal() * V^H. A real operator has a conjugate-symmetric symbol, so the two modes of a conjugate pair carry exactly equal singular values.
|
inline |
(*this) * x = b, computed directly in the Fourier domain. Symbol entries whose modulus reaches the rank threshold (see rank) are inverted; the remaining ones are treated as exact zeros, so the result is the pseudo-inverse applied to b. For a non-singular operator this is the exact solution x = ifft( fft(b) ./ fft(c) ). Supports multiple right-hand sides.
|
inline |
|
inline |
*this, itself a Circulant operator: the one generated by the index-reversed column. The cached symbols, when present, are reused – the symbols of the transpose are the index reversals of the symbols – so no FFT is recomputed.