hmatrix examples: L1 solvers

linear system using the $l_1$ norm

exper sm1 sb1
coefficient matrix and right-hand side 10x6
1  1  1  1  0  1
0  1  1  1  1  2
1  0  1  1  1  3
1  1  0  1  1  4
1  1  1  0  1  5
1  1  0  0  0  1
0  1  1  0  0  2
0  0  1  1  0  3
0  0  0  1  1  4
1  0  0  0  1  5

L2 solution 1x5
0.90000  -0.10000  0.90000  -0.10000  2.90000

residuals of L2 solution 1x10
0.60  1.60  1.60  0.40  0.40  0.20  1.20  2.20  1.20  1.20

LInf solution 1x5
1.00000  0.00000  1.33333  0.00000  2.33333

residuals of LInf solution 1x10
1.33  1.67  1.67  0.67  0.33  0.00  0.67  1.67  1.67  1.67

L1 solution 1x5
1.00000  0.00000  0.50000  -0.50000  3.50000

residuals of L1 solution 1x10
0.00  1.50  1.50  0.00  0.00  0.00  1.50  3.00  1.00  0.50

cost of L2 solution 
L2 = 3.87, LInf = 2.20, L1 = 10.60

cost of LInf solution 
L2 = 4.08, LInf = 1.67, L1 = 11.33

cost of L1 solution 
L2 = 4.12, LInf = 3.00, L1 = 9.00
exper sm2 sb2
coefficient matrix and right-hand side 10x6
1  1  1  0  0    1
0  1  1  1  0    2
0  0  1  1  1    3
1  0  0  1  1    4
1  1  0  0  1    5
2  2  2  0  0    2
0  2  2  2  0    4
0  0  2  2  2    6
2  0  0  2  2    8
2  2  0  0  2  100

L2 solution 1x5
-12.00000  26.00000  -13.00000  -11.00000  27.00000

residuals of L2 solution 1x10
0.00  0.00  0.00  0.00  36.00  0.00  0.00  0.00  0.00  18.00

LInf solution 1x5
0.00000  17.00000  -1.00000  1.00000  18.00000

residuals of LInf solution 1x10
15.00  15.00  15.00  15.00  30.00  30.00  30.00  30.00  30.00  30.00

L1 solution 1x5
-15  32  -16  -14  33

residuals of L1 solution 1x10
0  0  0  0  45  0  0  0  0  0

cost of L2 solution 
L2 = 40.25, LInf = 36.00, L1 = 54.00

cost of LInf solution 
L2 = 79.37, LInf = 30.00, L1 = 240.00

cost of L1 solution 
L2 = 45.00, LInf = 45.00, L1 = 45.00
exper sm sb
coefficient matrix and right-hand side 15x6
1  1  1  0  0    1
0  1  1  1  0    2
0  0  1  1  1    3
1  0  0  1  1    4
1  1  0  0  1    5
2  2  2  0  0    2
0  2  2  2  0    4
0  0  2  2  2    6
2  0  0  2  2    8
2  2  0  0  2  100
3  3  3  0  0    3
0  3  3  3  0    6
0  0  3  3  3    9
3  0  0  3  3   12
3  3  0  0  3   15

L2 solution 1x5
-4.28571  10.57143  -5.28571  -3.28571  11.57143

residuals of L2 solution 1x15
0.00  0.00  0.00  0.00  12.86  0.00  0.00  0.00  0.00  64.29  0.00  0.00  0.00  0.00  38.57

LInf solution 1x5
6.00000  8.00000  5.00000  7.00000  9.00000

residuals of LInf solution 1x15
18.00  18.00  18.00  18.00  18.00  36.00  36.00  36.00  36.00  54.00  54.00  54.00  54.00  54.00  54.00

L1 solution 1x5
0  2  -1  1  3

residuals of L1 solution 1x15
0  0  0  0  0  0  0  0  0  90  0  0  0  0  0

cost of L2 solution 
L2 = 76.06, LInf = 64.29, L1 = 115.71

cost of LInf solution 
L2 = 155.88, LInf = 54.00, L1 = 558.00

cost of L1 solution 
L2 = 90.00, LInf = 90.00, L1 = 90.00

A Ruiz / 2014-07-01
powered by hmatrix