Tomographer  v5.3
Tomographer C++ Framework Documentation
Tomographer::MathTools::SolveCLyap Namespace Reference

Definitions for solving the Complex Lyapunov Equation. More...

Classes

class  SolveError
 Error while attempting to solve complex Lyapunov/Sylvester equation. More...
 

Functions

template<bool debug_perform_check = false, typename LoggerType >
void solve (Eigen::Ref< Eigen::MatrixXcd > X, const Eigen::Ref< const Eigen::MatrixXcd > &A, const Eigen::Ref< const Eigen::MatrixXcd > &C, LoggerType &logger, const double tol=1e-8)
 Solve complex Lyapunov equation of the form A'*X + X*A == C More...
 

Detailed Description

Definitions for solving the Complex Lyapunov Equation.

See SolveCLyap::solve().

Function Documentation

§ solve()

template<bool debug_perform_check = false, typename LoggerType >
void Tomographer::MathTools::SolveCLyap::solve ( Eigen::Ref< Eigen::MatrixXcd X,
const Eigen::Ref< const Eigen::MatrixXcd > &  A,
const Eigen::Ref< const Eigen::MatrixXcd > &  C,
LoggerType &  logger,
const double  tol = 1e-8 
)

Solve complex Lyapunov equation of the form A'*X + X*A == C

Solves the Lyapunov equation "A.adjoint() * X + X * A == C" on the range of A. The matrices A, X and C must be square. A must be Hermitian.

The initial value of X is unimportant, and on output contains the solution of the given equation.

If an error occurs, a SolveError is thrown.

This function requires you to link to the LAPACK library (external symbol used is ztrsyl_).

Note that only complex double type is supported. In the future we might support other complex types, by calling the other LAPACK routines.

If the template parameter debug_perform_check is set to true, then some debugging consistency checks are performed.

Definition at line 130 of file solveclyap.h.