I try to use https://software.intel.com/sites/products/documentation/doclib/iss/2013/mkl/mklman/GUID-03E2AA41-0886-485D-B0D7-1C2186119220.htm routine for band matrix factorization. I've wrote simple application that factorizes 4*4 matrix. However, I can't undertand relation between elements of matrix L and multipliers used during factorization mi,j. Those mutipliers represent correct columns of matrix L, but order of elements mi,j in the column is not correct. I assume, some permutation of rows should be performed based on ipiv vector.
Initial matrix:
-0.230 -6.980 0.000 0.000
2.540 2.460 2.560 0.000
-3.660 -2.730 2.460 -4.780
0.000 -2.130 4.070 -3.820
Result of dgbtrf:
0.000 0.000 0.000 -4.780
0.000 0.000 2.460 0.300
0.000 -2.730 -0.155 -3.292
-3.660 -6.808 4.254 -0.727
-0.694 -0.083 0.968 0.000
0.063 0.313 0.000 0.000
Permutation vector: 3 3 3 4
In this case
m21 = -0.694 m32 = -0.083 m43= 0.968
m31 = 0.063 m42 = 0.313
Those values form matrix L_result:
1.000 0.000 0.000 0.000
-0.694 1.000 0.000 0.000
0.063 -0.083 1.000 0.000
0.000 0.313 0.968 1.000
However, the correct answer is L_correct:
1.000 0.000 0.000 0.000
0.063 1.000 0.000 0.000
-0.694 -0.083 1.000 0.000
0.000 0.313 0.968 1.000
Could you explain how L_result should be transformed into L_correct in general case?