Sylvester

template<typename LMatType, typename RMatType, typename RHS>
internal::SylvesterEquation<LMatType, RMatType, RHS> solve_sylvester(const LMatType &A, const RMatType &B, const RHS &C)

Solves the Sylvester’s equation: \( op(\mathbf{A}) \mathbf{X} \pm \mathbf{X} op(\mathbf{B}) = \alpha \mathbf{C} \), where A and B are either upper triangular (or upper quasi-triangular in the canonical Schur form) matrices and op(A) = A or op(A) = A.T(). The scale \( \alpha \geq 1\) is determined by the routine to avoid overflow in X.

Parameters:
  • A[in] The matrix A or its transpose A.T()

  • B[in] The matrix B or its transpose B.T() or -B or -B.T()

  • C[in] The right side of the equation. Must be a Matrix.

Returns:

An abstract object representing the solution of the Sylvester equation.