Example program for zggglm
This example solves the weighted least squares problem
minimize
x
B
-
1
d
-
A
x
2
,
where
B
=
0.5
-
1.0
i
.0
i
+
0.0
.0
i
+
0.0
.0
i
+
0.0
.0
i
+
0.0
1.0
-
2.0
i
.0
i
+
0.0
.0
i
+
0.0
.0
i
+
0.0
.0
i
+
0.0
2.0
-
3.0
i
.0
i
+
0.0
.0
i
+
0.0
.0
i
+
0.0
.0
i
+
0.0
5.0
-
4.0
i
,
d
=
6.00
-
0.40
i
-
5.27
+
0.90
i
2.72
-
2.13
i
-
1.30
-
2.80
i
and
A
=
0.96
-
0.81
i
-
0.03
+
0.96
i
-
0.91
+
2.06
i
-
0.98
+
1.98
i
-
1.20
+
0.19
i
-
0.66
+
0.42
i
0.62
-
0.46
i
1.01
+
0.02
i
0.63
-
0.17
i
1.08
-
0.28
i
0.20
-
0.12
i
-
0.07
+
1.23
i
.
Note that the block size (NB) of
64
assumed in this example is not realistic for such a small problem, but should be suitable for large problems.
f90 source code
Input data file
Expected results