The R Project SVN R

Rev

Rev 42390 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 42390 Rev 86632
Line 43... Line 43...
43
c           if  a  is a symmetric positive definite band matrix,
43
c           if  a  is a symmetric positive definite band matrix,
44
c           the following program segment will set up the input.
44
c           the following program segment will set up the input.
45
c
45
c
46
c                   m = (band width above diagonal)
46
c                   m = (band width above diagonal)
47
c                   do 20 j = 1, n
47
c                   do 20 j = 1, n
48
c                      i1 = max0(1, j-m)
48
c                      i1 = max(1, j-m)
49
c                      do 10 i = i1, j
49
c                      do 10 i = i1, j
50
c                         k = i-j+m+1
50
c                         k = i-j+m+1
51
c                         abd(k,j) = a(i,j)
51
c                         abd(k,j) = a(i,j)
52
c                10    continue
52
c                10    continue
53
c                20 continue
53
c                20 continue
Line 56... Line 56...
56
c     cleve moler, university of new mexico, argonne national lab.
56
c     cleve moler, university of new mexico, argonne national lab.
57
c
57
c
58
c     subroutines and functions
58
c     subroutines and functions
59
c
59
c
60
c     blas ddot
60
c     blas ddot
61
c     fortran max0,sqrt
61
c     fortran max,sqrt
62
c
62
c
63
c     internal variables
63
c     internal variables
64
c
64
c
65
      double precision ddot,t
65
      double precision ddot,t
66
      double precision s
66
      double precision s
Line 70... Line 70...
70
c
70
c
71
         do 30 j = 1, n
71
         do 30 j = 1, n
72
            info = j
72
            info = j
73
            s = 0.0d0
73
            s = 0.0d0
74
            ik = m + 1
74
            ik = m + 1
75
            jk = max0(j-m,1)
75
            jk = max(j-m,1)
76
            mu = max0(m+2-j,1)
76
            mu = max(m+2-j,1)
77
            if (m .lt. mu) go to 20
77
            if (m .lt. mu) go to 20
78
            do 10 k = mu, m
78
            do 10 k = mu, m
79
 
79
 
80
               t = abd(k,j) - ddot(k-mu,abd(ik,jk),1,abd(mu,j),1)
80
               t = abd(k,j) - ddot(k-mu,abd(ik,jk),1,abd(mu,j),1)
81
               t = t/abd(m+1,jk)
81
               t = t/abd(m+1,jk)