L为上三角
L为下三角
Matlab验证
A = gallery('wathen',10,10);
B = rand(size(A,1),size(A,2));
X_true = AB;
[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 = AB;
[L,flag,pp] = chol(A,'lower','vector');
X_test(pp,:) = L'(LB(pp,:));
max(max(abs((X_true-X_test)./X_true )))
附录:正定对称稀疏矩阵
A = gallery('wathen',10,10);