![]() |
Eigen-Contrib
5.0.1
|
#include <contrib/Eigen/src/StructuredMatrices/Cauchy.h>
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.
| 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). |
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 |
|
inline |
Builds a Cauchy matrix from the row nodes x and the column nodes y: entry (i,j) is 1/(x[i] - y[j]).
|
inline |
*this, itself a Cauchy operator: \( C(x,y)^H = C(-\bar y, -\bar x) \).
|
inline |
|
inline |
y.
|
inline |
*this, itself a Cauchy operator (the one with conjugated nodes).
|
inline |
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.
|
inline |
(*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.
|
inline |
x.
|
inline |
*this, itself a Cauchy operator: \( C(x,y)^T = C(-y,-x) \).