函数 sylvester #
求解实值 Sylvester 方程 AX+XB=C,其中 A、B 和 C 是维度合适的矩阵,A 和 B 是方阵。请注意,Sylvester 方程还存在其他等价的定义,本函数假定使用 Bartels-Stewart 算法的原始出版物中提出的定义,该算法由本函数实现。https://en.wikipedia.org/wiki/Sylvester_equation
Syntax #
math.sylvester(A, B, C)
Parameters #
| Parameter | Type | Description |
|---|---|---|
A |
矩阵 | 数组 | 矩阵 A |
B |
矩阵 | 数组 | 矩阵 B |
C |
矩阵 | 数组 | 矩阵 C |
Returns #
| Type | Description |
|---|---|
| 矩阵 | 数组 | 矩阵 X,求解 Sylvester 方程 |
Throws #
Type | Description —- | ———–
Examples #
const A = [[-1, -2], [1, 1]]
const B = [[2, -1], [1, -2]]
const C = [[-3, 2], [3, 0]]
math.sylvester(A, B, C) // returns DenseMatrix [[-0.25, 0.25], [1.5, -1.25]]