关于chol分解的置换向量的问题及正定对称稀疏矩阵的构造
L为上三角
L为下三角
Matlab验证
A = gallery('wathen',10,10);
B = rand(size(A,1),size(A,2));
X_true = A\B;
[L,flag,p] = chol(A,'vector');
X_test(p,:) = L\(L'\B(p,:));
max(max(abs((X_true-X_test)./X_true )))
A = gallery('wathen',10,10);
B = rand(size(A,1),size(A,2));
X_true = A\B;
[L,flag,pp] = chol(A,'lower','vector');
X_test(pp,:) = L'\(L\B(pp,:));
max(max(abs((X_true-X_test)./X_true )))
附录:正定对称稀疏矩阵
A = gallery('wathen',10,10);
本文来自博客园,作者:xdd1997
转载请注明:https://www.cnblogs.com/xdd1997/p/14634331.html