~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to Lib/interpolate/fitpack/fpcyt2.f

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
      subroutine fpcyt2(a,n,b,c,nn)
2
 
c subroutine fpcyt2 solves a linear n x n system
3
 
c         a * c = b
4
 
c where matrix a is a cyclic tridiagonal matrix, decomposed
5
 
c using subroutine fpsyt1.
6
 
c  ..
7
 
c  ..scalar arguments..
8
 
      integer n,nn
9
 
c  ..array arguments..
10
 
      real*8 a(nn,6),b(n),c(n)
11
 
c  ..local scalars..
12
 
      real*8 cc,sum
13
 
      integer i,j,j1,n1
14
 
c  ..
15
 
      c(1) = b(1)*a(1,4)
16
 
      sum = c(1)*a(1,5)
17
 
      n1 = n-1
18
 
      do 10 i=2,n1
19
 
         c(i) = (b(i)-a(i,1)*c(i-1))*a(i,4)
20
 
         sum = sum+c(i)*a(i,5)
21
 
  10  continue
22
 
      cc = (b(n)-sum)*a(n,4)
23
 
      c(n) = cc
24
 
      c(n1) = c(n1)-cc*a(n1,6)
25
 
      j = n1
26
 
      do 20 i=3,n
27
 
         j1 = j-1
28
 
         c(j1) = c(j1)-c(j)*a(j1,3)*a(j1,4)-cc*a(j1,6)
29
 
         j = j1
30
 
  20  continue
31
 
      return
32
 
      end