![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
A X + X B = C by Bartels-Stewart, at double. More...
#include <line/util/sylvester.h>
Public Member Functions | |
| SchurSylvesterFactor (const Matrix< double > &A, const Matrix< double > &B) | |
| Matrix< double > | solve (const Matrix< double > &C) const |
| Solve A X + X B = C. | |
A X + X B = C by Bartels-Stewart, at double.
WHY THIS EXISTS BESIDE THE KRONECKER SOLVER ABOVE. The Kronecker form is the only one available in an arbitrary field, and its O((n m)^3) cost is acceptable for the phase-space matrices the MMAP queue recursion passes. The FJ_codes fork-join engine passes matrices of order (C + 1) * m^2 * ma with C defaulting to 100, i.e. n and m in the hundreds to low thousands: the Kronecker operator of an 800 x 800 pair is 640000 square, which is 3 TB of LU. Bartels-Stewart is O(n^3 + m^3) and factorizes the same problem in fractions of a second, at the price of a real Schur factorization – LAPACK, hence double only, exactly as util/eig.h is.
A X + X B = C is solved as Ta Y + Y Tb = Za' C Zb with A = Za Ta Za' and B = Zb Tb Zb' real Schur, the quasi-triangular core done by dtrsyl, and X = Za Y Zb'. dtrsyl's scale guards against overflow when the two spectra nearly collide; it is divided out here, and a scale of zero means the equation has no solution, which is reported by name rather than returned as an infinity.
The Schur pair is computed ONCE in the constructor and every solve reuses it, so a chain of right-hand sides against a fixed (A,B) costs one dgees per coefficient plus a dtrsyl per right-hand side, as SylvesterFactor needs.
Definition at line 79 of file sylvester.h.
|
inline |
Definition at line 81 of file sylvester.h.
References line::Matrix< T >::cols(), line::ExternalError::ExternalError(), line::InputError::InputError(), line::schur_decomposition(), line::RealSchur::T, and line::RealSchur::Z.
Referenced by line::sylvester_schur().
Solve A X + X B = C.
Definition at line 105 of file sylvester.h.
References line::Matrix< T >::cols(), line::ExternalError::ExternalError(), line::InputError::InputError(), line::matmul(), line::NumericError::NumericError(), and line::Matrix< T >::rows().