template<typename Scalar_, int Rows_, int Cols_>
class Eigen::Vandermonde< Scalar_, Rows_, Cols_ >
An m x n Vandermonde matrix represented by its node vector.
A Vandermonde matrix has entry (i,j) equal to \( x_i^j \), where x is the node vector. Thus
\[ (Va)_i = \sum_{j=0}^{n-1} a_j x_i^j, \qquad
p_{n-1}=a_{n-1},\quad p_j=a_j+x_i p_{j+1}. \]
The class stores only the m nodes; products evaluate this Horner recurrence at all nodes at once in O(mn) operations – the same cost as a dense product, but with O(m) storage and without ever forming the matrix.
Square systems are solved in O(n^2) by the Björck-Pereyra algorithm (class BjorckPereyra), whose transpose().solve() form covers the dual (moment) system. There is no fast transposed product, so the class is not closed under transposition and rectangular least-squares problems are best handled by a dense QR of the materialized matrix.
Because operator* returns an Eigen product expression, a Vandermonde 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. BiCGSTAB<Vandermonde<double>,IdentityPreconditioner>): the default preconditioners read individual coefficients through col() or InnerIterator, which the structured operators do not expose.
- Warning
- Vandermonde matrices with real nodes are exponentially ill-conditioned: the condition number grows at least like \( 2^n \) for any real node configuration (Beckermann, 2000). Solves remain surprisingly accurate for monotone node sets and sign-alternating right-hand sides (Björck-Pereyra's celebrated property, see Higham, ASNA ch. 22), but forward errors necessarily scale with the conditioning in general. Complex nodes on the unit circle are the well-conditioned case: for the n-th roots of unity, \( V/\sqrt{n} \) is unitary.
- Template Parameters
-
| Scalar_ | a floating-point-like real or complex scalar supporting Eigen's scalar math hooks, including isfinite, frexp and ldexp (and log for complex solver ordering). Integer types are rejected. |
| Rows_ | the number of rows (nodes) at compile time, or Dynamic. |
| Cols_ | the number of columns (powers) at compile time, or Dynamic. |
- See also
- class BjorckPereyra, makeVandermonde()