Underlying Implementation of LDL in Matlab
조회 수: 1 (최근 30일)
이전 댓글 표시
The general question is: how is the ldl implemented in Matlab?
Motivation: I want to confirm the ldl implementation is not using the same algorithm as the lu() function (which I'm aware uses umfpack). The reason I am asking is that when I compare the speed of the ldl and lu on the same sparse laplacian matrix, the ldl comes out a lot slower than doing [L,U,P,Q] = lu(A), even though we expect the ldl to be, at best, up to 50% faster. My hunch here is that the ldl is not using the same multifrontal solver as umfpack is:
Code snippet for reference:
A = (delsq(numgrid('L', 400)));
%A2 = full(delsq(numgrid('L', 40)));
bA = sum(A,2);
tic
[LA, DA, PA, SA] = ldl(A);
toc
x = SA*(PA'\(LA'\(DA\(LA\(PA\(SA*bA))))));
tic
[L,U,P,Q] = lu(A);
toc
xl = P\(U\(L\(Q\bA)));
figure(); plot(x);
hold on;
plot(xl)
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!