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

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

Detailed Description

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

An m x n Cauchy matrix represented by its two node vectors.

A Cauchy matrix has entry (i,j) equal to \( 1/(x_i - y_j) \); the class stores only the m + n nodes. Products are evaluated directly at O(mn) operations – the same cost as a dense product, but with O(m+n) storage and without ever forming the matrix. (Fast approximate products via multipole expansions are out of scope.)

The class is closed under transposition: \( C(x,y)^T = C(-y,-x) \), and the determinant of a square Cauchy matrix has the classical closed form \( \prod_{i<j}(x_j-x_i)(y_i-y_j) \big/ \prod_{i,j}(x_i-y_j) \).

Because operator* returns an Eigen product expression, a Cauchy 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. GMRES<Cauchy<double>,IdentityPreconditioner>): the default preconditioners read individual coefficients through col() or InnerIterator, which the structured operators do not expose.

Square systems are solved in O(n^2) by CauchyLU, a partially pivoted LU factorization computed through the displacement structure (Gohberg-Kailath-Olshevsky): unlike the Toeplitz/Levinson world, Cauchy structure survives row permutations, which is what makes fast pivoted factorization possible. The Hilbert matrix is the Cauchy matrix with x_i = i+1, y_j = -j.

All nodes x_i must differ from all nodes y_j (entries would be infinite otherwise); this is not checked.

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 CauchyLU, makeCauchy()
+ Inheritance diagram for Eigen::Cauchy< Scalar_, Rows_, Cols_ >:

Public Member Functions

Cauchy< Scalar, Cols_, Rows_ > adjoint () const
 
template<typename XDerived, typename YDerived>
 Cauchy (const MatrixBase< XDerived > &x, const MatrixBase< YDerived > &y)
 
Scalar coeff (Index row, Index col) const
 
const ColNodeVector & colNodes () const
 
Cauchy conjugate () const
 
Scalar determinant () const
 
template<typename Rhs>
Product< Cauchy, Rhs > operator* (const MatrixBase< Rhs > &v) const
 
const RowNodeVector & rowNodes () const
 
Cauchy< Scalar, Cols_, Rows_ > transpose () const
 

Constructor & Destructor Documentation

◆ Cauchy()

template<typename Scalar_, int Rows_, int Cols_>
template<typename XDerived, typename YDerived>
Eigen::Cauchy< Scalar_, Rows_, Cols_ >::Cauchy ( const MatrixBase< XDerived > & x,
const MatrixBase< YDerived > & y )
inline

Builds a Cauchy matrix from the row nodes x and the column nodes y: entry (i,j) is 1/(x[i] - y[j]).

Member Function Documentation

◆ adjoint()

template<typename Scalar_, int Rows_, int Cols_>
Cauchy< Scalar, Cols_, Rows_ > Eigen::Cauchy< Scalar_, Rows_, Cols_ >::adjoint ( ) const
inline
Returns
the adjoint of *this, itself a Cauchy operator: \( C(x,y)^H = C(-\bar y, -\bar x) \).

◆ coeff()

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

◆ colNodes()

template<typename Scalar_, int Rows_, int Cols_>
const ColNodeVector & Eigen::Cauchy< Scalar_, Rows_, Cols_ >::colNodes ( ) const
inline
Returns
the column node vector y.

◆ conjugate()

template<typename Scalar_, int Rows_, int Cols_>
Cauchy Eigen::Cauchy< Scalar_, Rows_, Cols_ >::conjugate ( ) const
inline
Returns
the complex conjugate of *this, itself a Cauchy operator (the one with conjugated nodes).

◆ determinant()

template<typename Scalar_, int Rows_, int Cols_>
Scalar Eigen::Cauchy< Scalar_, Rows_, Cols_ >::determinant ( ) const
inline
Returns
the determinant of a square Cauchy matrix through the classical closed form \( \prod_{i<j}(x_j-x_i)(y_i-y_j) \big/ \prod_{i,j}(x_i-y_j) \), in O(n^2) operations. All factors enter a single accumulation kept in the balanced form m * 2^e (the split fraction/exponent determinant convention of LINPACK's xGEDI [1]) – every factor and the running value are renormalized to unit magnitude with the power of two tracked separately (exact frexp/ldexp rescaling [2]), numerator factors multiplied in and denominator factors divided out – so no partial product can overflow or underflow when the determinant itself is representable. Zero factors (coincident x or y nodes) and non-finite factors propagate exactly; a node difference that overflows makes its factor infinite, which turns the determinant into NaN when it meets a zero or another infinite factor.

◆ operator*()

template<typename Scalar_, int Rows_, int Cols_>
template<typename Rhs>
Product< Cauchy, Rhs > Eigen::Cauchy< Scalar_, Rows_, Cols_ >::operator* ( const MatrixBase< Rhs > & v) const
inline
Returns
the product expression (*this) * v, evaluated directly at O(mn) operations per right-hand side and at most O(m) extra storage. The expression carries the default product tag, so assigning it behaves like any dense product: a temporary resolves aliasing between the destination and v, and .noalias() skips it.

◆ rowNodes()

template<typename Scalar_, int Rows_, int Cols_>
const RowNodeVector & Eigen::Cauchy< Scalar_, Rows_, Cols_ >::rowNodes ( ) const
inline
Returns
the row node vector x.

◆ transpose()

template<typename Scalar_, int Rows_, int Cols_>
Cauchy< Scalar, Cols_, Rows_ > Eigen::Cauchy< Scalar_, Rows_, Cols_ >::transpose ( ) const
inline
Returns
the transpose of *this, itself a Cauchy operator: \( C(x,y)^T = C(-y,-x) \).

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