7,…,0,1,…,6 Array size -

advertisement
Array size -7,…,0,1,…,6
0 1 2








































































1
2
0
1
1 2 
0 1 2
3

2
3
1
2
0
1
1 2 
0 1 2




3

2
3
1
2
0
1
1 2 
0 1 2








3

2
3
1
2
0
1
1 2 
0 1 2












3

2
3
1
2
0
1
1 2 
0 1 2
















3

2
3
1
2
0
1
1 2 
0 1 2
          3 2 1 0 1
           3 2 1 0
The notion is that the array is dominated by bands near the diagonal. The 6 bands shown
are meant to be just a small part of the total.
 LM 
0
-1
-2
1
0
-1
-2
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
3
2
1
0
-1
-2
3
2
1
0
-1
-2
3
2
1
0
-1
3
2
1
0
 LP

A typical band method for solving the above matrix requires LPxLMxN
operations. The FFT method requires 3Nlog2N operations + 53 operations for taking care
of the corners.
W  0 W  1
W 1 W  0
W  L
W   L
W  0
W  0
W  L
W  0 W  1
W  L
W 1 W  0
Gauss elimination starts at the upper left and uses W[0] = A0,0 to remove the first term
from the next L
for\bgauelim.for based on for\tgaussj\cgauelim.for
for\bgauelim.wpj
Code with A and Ap is in for\bgaulimt.zip. The final code is in for\bgauelim.zip.
This code uses a packed matrix where A(I,J)  Ap(I,J-I). It has no pivoting. It was
tested on 4000 x 82 (41+40+1) arrays. For the element next to the diagonal equal to 30%
of the diagonal there was a naïve failure rate of 1 inversion out of 10. For larger
diagonals the rate went down.
Download