Eigen-Contrib  5.0.1
 
Loading...
Searching...
No Matches
Eigen::Hankel< Scalar_, Rows_, Cols_ > Class Template Reference

#include <contrib/Eigen/src/StructuredMatrices/Hankel.h>

Detailed Description

template<typename Scalar_, int Rows_, int Cols_>
class Eigen::Hankel< Scalar_, Rows_, Cols_ >

An m x n Hankel matrix represented by its first column and last row.

A Hankel matrix has constant anti-diagonals: entry (i,j) equals h[i+j], where h is the length m+n-1 sequence formed by the first column followed by the tail of the last row. The overlap entry h[m-1] is taken from the column, so row[0] is ignored. Every column of the matrix is a contiguous slice of h. A real square Hankel matrix is symmetric.

The matrix-vector product (operator*) is evaluated in O(n log n): a Hankel matrix is a column-reversed Toeplitz matrix, so the product is a circulant convolution of h with the reversed input, evaluated through a DFT symbol computed once at construction. (Small operators, and single-row or single-column ones – whose products cost O(n) directly – skip the FFT for a direct evaluation.) As with Toeplitz, operator* returns an Eigen product expression, so a Hankel plugs into the matrix-free iterative solvers (including the least-squares solvers, through adjoint), 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. LeastSquaresConjugateGradient<Hankel<double>,IdentityPreconditioner>): the default preconditioners read individual coefficients through col() or InnerIterator, which the structured operators do not expose.

The class is closed under transpose, conjugate and adjoint. The transpose is the Hankel matrix of the same sequence with the dimensions swapped, and its symbol is obtained from the cached one by a diagonal phase multiplication instead of a new FFT.

Square linear systems are solved directly in O(n^2) through the column-reversed Toeplitz equivalent (toToeplitz) and the LookAheadLevinson solver, see solve.

Template Parameters
Scalar_the scalar type, real or complex.
Rows_the number of rows at compile time, or Dynamic (the default).
Cols_the number of columns at compile time, or Dynamic (the default).
See also
class Toeplitz, class Circulant, makeHankel()
+ Inheritance diagram for Eigen::Hankel< Scalar_, Rows_, Cols_ >:

Public Member Functions

Hankel< Scalar, Cols_, Rows_ > adjoint () const
 
Scalar coeff (Index row, Index col) const
 
ColGeneratorType column () const
 
Hankel conjugate () const
 
const GeneratorType & generator () const
 
template<typename ColDerived, typename RowDerived>
 Hankel (const MatrixBase< ColDerived > &col, const MatrixBase< RowDerived > &row)
 
RowGeneratorType lastRow () const
 
template<typename Rhs>
Product< Hankel, Rhs > operator* (const MatrixBase< Rhs > &x) const
 
template<typename Rhs>
Matrix< Scalar, SolveRowsAtCompileTime, Rhs::ColsAtCompileTime > solve (const MatrixBase< Rhs > &b) const
 
ComplexVector symbol () const
 
Toeplitz< Scalar, Rows_, Cols_ > toToeplitz () const
 
Hankel< Scalar, Cols_, Rows_ > transpose () const
 

Constructor & Destructor Documentation

◆ Hankel()

template<typename Scalar_, int Rows_, int Cols_>
template<typename ColDerived, typename RowDerived>
Eigen::Hankel< Scalar_, Rows_, Cols_ >::Hankel ( const MatrixBase< ColDerived > & col,
const MatrixBase< RowDerived > & row )
inline

Builds a Hankel matrix from its first column col and last row row. The anti-diagonal overlap entry is taken from col, hence row[0] is ignored.

Unless the matrix is small, or a single row or column (whose products are always evaluated directly, in linear time), the DFT symbol of the underlying circulant convolution is computed here, once, and reused by every subsequent product.

Member Function Documentation

◆ adjoint()

template<typename Scalar_, int Rows_, int Cols_>
Hankel< Scalar, Cols_, Rows_ > Eigen::Hankel< Scalar_, Rows_, Cols_ >::adjoint ( ) const
inline
Returns
the adjoint of *this, itself a Hankel operator (the conjugated transpose); the cached symbol is reused through the composition of the conjugate and transpose rules.

◆ coeff()

template<typename Scalar_, int Rows_, int Cols_>
Scalar Eigen::Hankel< Scalar_, Rows_, Cols_ >::coeff ( Index row,
Index col ) const
inline
Returns
the coefficient at row row and column col.

◆ column()

template<typename Scalar_, int Rows_, int Cols_>
ColGeneratorType Eigen::Hankel< Scalar_, Rows_, Cols_ >::column ( ) const
inline
Returns
the first column, h[0..m-1].

◆ conjugate()

template<typename Scalar_, int Rows_, int Cols_>
Hankel Eigen::Hankel< Scalar_, Rows_, Cols_ >::conjugate ( ) const
inline
Returns
the complex conjugate of *this, itself a Hankel operator. The cached symbol, when present, is reused: the symbol of the conjugate is the conjugated index reversal of the symbol.

◆ generator()

template<typename Scalar_, int Rows_, int Cols_>
const GeneratorType & Eigen::Hankel< Scalar_, Rows_, Cols_ >::generator ( ) const
inline
Returns
the generating sequence h of length m+n-1; entry (i,j) of the matrix is h[i+j].

◆ lastRow()

template<typename Scalar_, int Rows_, int Cols_>
RowGeneratorType Eigen::Hankel< Scalar_, Rows_, Cols_ >::lastRow ( ) const
inline
Returns
the last row, h[m-1..m+n-2].

◆ operator*()

template<typename Scalar_, int Rows_, int Cols_>
template<typename Rhs>
Product< Hankel, Rhs > Eigen::Hankel< Scalar_, Rows_, Cols_ >::operator* ( const MatrixBase< Rhs > & x) const
inline
Returns
the product expression (*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.

◆ solve()

template<typename Scalar_, int Rows_, int Cols_>
template<typename Rhs>
Matrix< Scalar, SolveRowsAtCompileTime, Rhs::ColsAtCompileTime > Eigen::Hankel< Scalar_, Rows_, Cols_ >::solve ( const MatrixBase< Rhs > & b) const
inline
Returns
the solution x of (*this) * x = b for a square Hankel matrix, computed in O(n^2) by solving the column-reversed Toeplitz system T*y = b with the LookAheadLevinson solver and reversing the solution. Supports multiple right-hand sides. Each call factorizes anew; to reuse a factorization across calls, or to check for numerical breakdown through info(), use LookAheadLevinson on toToeplitz directly and reverse the solution rows.

◆ symbol()

template<typename Scalar_, int Rows_, int Cols_>
ComplexVector Eigen::Hankel< Scalar_, Rows_, Cols_ >::symbol ( ) const
inline
Returns
the symbol of the underlying circulant convolution: the DFT of the generating sequence, zero-padded to a 5-smooth size p >= m+n-1 and rotated so the product appears in the leading m entries of the back-transform. Cached when the operator is large enough for products to take the FFT path, computed on the fly for small operators.

◆ toToeplitz()

template<typename Scalar_, int Rows_, int Cols_>
Toeplitz< Scalar, Rows_, Cols_ > Eigen::Hankel< Scalar_, Rows_, Cols_ >::toToeplitz ( ) const
inline
Returns
the column-reversed Toeplitz equivalent T = H*E (with E the exchange matrix), i.e. T(i,j) = h[i + n-1 - j]. Its symbol is computed afresh. Useful for solving Hankel systems with the Toeplitz machinery: H*x = b is T*(E*x) = b.

◆ transpose()

template<typename Scalar_, int Rows_, int Cols_>
Hankel< Scalar, Cols_, Rows_ > Eigen::Hankel< Scalar_, Rows_, Cols_ >::transpose ( ) const
inline
Returns
the transpose of *this, itself a Hankel operator: the same generating sequence with the dimensions swapped. The cached symbol, when present, is reused: transposing changes the rotation of the embedding from n-1 to m-1, which multiplies DFT entry f by exp(2 pi i f (m-n)/p) – a diagonal phase multiplication instead of a new FFT.

The documentation for this class was generated from the following file: