~ubuntu-branches/ubuntu/karmic/python-scipy/karmic

« back to all changes in this revision

Viewing changes to Lib/sandbox/spline/fitpack/fpfrno.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 fpfrno(maxtr,up,left,right,info,point,merk,n1,
2
 
     * count,ier)
3
 
c  subroutine fpfrno collects the free nodes (up field zero) of the
4
 
c  triply linked tree the information of which is kept in the arrays
5
 
c  up,left,right and info. the maximal length of the branches of the
6
 
c  tree is given by n1. if no free nodes are found, the error flag
7
 
c  ier is set to 1.
8
 
c  ..
9
 
c  ..scalar arguments..
10
 
      integer maxtr,point,merk,n1,count,ier
11
 
c  ..array arguments..
12
 
      integer up(maxtr),left(maxtr),right(maxtr),info(maxtr)
13
 
c  ..local scalars
14
 
      integer i,j,k,l,n,niveau
15
 
c  ..
16
 
      ier = 1
17
 
      if(n1.eq.2) go to 140
18
 
      niveau = 1
19
 
      count = 2
20
 
  10  j = 0
21
 
      i = 1
22
 
  20  if(j.eq.niveau) go to 30
23
 
      k = 0
24
 
      l = left(i)
25
 
      if(l.eq.0) go to 110
26
 
      i = l
27
 
      j = j+1
28
 
      go to 20
29
 
  30  if (i.lt.count) go to 110
30
 
      if (i.eq.count) go to 100
31
 
      go to 40
32
 
  40  if(up(count).eq.0) go to 50
33
 
      count = count+1
34
 
      go to 30
35
 
  50  up(count) = up(i)
36
 
      left(count) = left(i)
37
 
      right(count) = right(i)
38
 
      info(count) = info(i)
39
 
      if(merk.eq.i) merk = count
40
 
      if(point.eq.i) point = count
41
 
      if(k.eq.0) go to 60
42
 
      right(k) = count
43
 
      go to 70
44
 
  60  n = up(i)
45
 
      left(n) = count
46
 
  70  l = left(i)
47
 
  80  if(l.eq.0) go to 90
48
 
      up(l) = count
49
 
      l = right(l)
50
 
      go to 80
51
 
  90  up(i) = 0
52
 
      i = count
53
 
 100  count = count+1
54
 
 110  l = right(i)
55
 
      k = i
56
 
      if(l.eq.0) go to 120
57
 
      i = l
58
 
      go to 20
59
 
 120  l = up(i)
60
 
      j = j-1
61
 
      if(j.eq.0) go to 130
62
 
      i = l
63
 
      go to 110
64
 
 130  niveau = niveau+1
65
 
      if(niveau.le.n1) go to 10
66
 
      if(count.gt.maxtr) go to 140
67
 
      ier = 0
68
 
 140  return
69
 
      end