Eigen-Contrib  5.0.1
 
Loading...
Searching...
No Matches
Eigen::BjorckPereyra< Scalar_ > Class Template Reference

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

Detailed Description

template<typename Scalar_>
class Eigen::BjorckPereyra< Scalar_ >

Björck-Pereyra O(n^2) solver for square Vandermonde systems.

Solves V*a = f – polynomial interpolation: find the coefficients of the polynomial taking values f at the nodes – in O(n^2) operations and O(n) storage, via divided differences in the Newton basis followed by the basis change to monomials (Björck & Pereyra, 1970; Golub & Van Loan, Alg. 4.6.2). The transposed (dual, or moment) system \( V^T w = b \) is solved by the companion dual recurrences through the standard SolverBase idiom:

BjorckPereyra<double> bp(V); // or bp.compute(V);
VectorXd a = bp.solve(f); // solve V * a = f
VectorXd w = bp.transpose().solve(b); // solve V^T * w = b
VectorXd u = bp.adjoint().solve(b); // solve V^H * u = b
BjorckPereyra()
Definition Vandermonde.h:406
Matrix< double, Dynamic, 1 > VectorXd

There is no factorization: compute() stores the nodes (and flags exactly repeated or non-finite nodes through info()), and each solve runs the O(n^2) recurrences directly. Genuinely complex node sets are put in a deterministic Leja order to control growth in the Newton representation; real nodes, including complex scalars with zero imaginary parts, retain their input order and its useful monotonicity properties.

Despite the exponential conditioning of real-node Vandermonde matrices, the computed solution is often far more accurate than the conditioning suggests: for monotonically ordered nodes and a right-hand side with alternating signs the forward error is governed by a small relative-perturbation bound independent of the condition number (Higham, ASNA ch. 22).

Template Parameters
Scalar_a floating-point-like real or complex scalar supporting Eigen's scalar math hooks, including isfinite (and abs and log for complex node ordering). Integer types are rejected.
See also
class Vandermonde
+ Inheritance diagram for Eigen::BjorckPereyra< Scalar_ >:

Public Member Functions

 BjorckPereyra ()
 
template<int Rows_, int Cols_>
 BjorckPereyra (const Vandermonde< Scalar, Rows_, Cols_ > &V)
 
template<int Rows_, int Cols_>
BjorckPereyra & compute (const Vandermonde< Scalar, Rows_, Cols_ > &V)
 
ComputationInfo info () const
 
template<typename Rhs>
const Solve< BjorckPereyra, Rhs > solve (const MatrixBase< Rhs > &f) const
 

Constructor & Destructor Documentation

◆ BjorckPereyra() [1/2]

template<typename Scalar_>
Eigen::BjorckPereyra< Scalar_ >::BjorckPereyra ( )
inline

Default constructor; call compute before solve.

◆ BjorckPereyra() [2/2]

template<typename Scalar_>
template<int Rows_, int Cols_>
Eigen::BjorckPereyra< Scalar_ >::BjorckPereyra ( const Vandermonde< Scalar, Rows_, Cols_ > & V)
inlineexplicit

Constructs the solver for the square Vandermonde matrix V.

Member Function Documentation

◆ compute()

template<typename Scalar_>
template<int Rows_, int Cols_>
BjorckPereyra & Eigen::BjorckPereyra< Scalar_ >::compute ( const Vandermonde< Scalar, Rows_, Cols_ > & V)
inline

Stores the nodes of the square Vandermonde matrix V, checks that they are finite and distinct, and computes a Leja order for genuinely complex nodes.

◆ info()

template<typename Scalar_>
ComputationInfo Eigen::BjorckPereyra< Scalar_ >::info ( ) const
inline
Returns
Success, NumericalIssue when the nodes contain an exact duplicate (the matrix is singular), or InvalidInput for a non-finite node.

◆ solve()

template<typename Scalar_>
template<typename Rhs>
const Solve< BjorckPereyra, Rhs > Eigen::BjorckPereyra< Scalar_ >::solve ( const MatrixBase< Rhs > & f) const
inline
Returns
the solution a of V*a = f, as a lazily evaluated expression. Supports multiple right-hand sides. The transposed and adjoint systems are solved through transpose().solve(b) and adjoint().solve(b).
Precondition
compute has been called.

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