File: fpseno.f

package info (click to toggle)
python-scipy 0.3.2-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,572 kB
  • ctags: 20,326
  • sloc: ansic: 87,138; fortran: 51,876; python: 47,747; cpp: 2,134; objc: 384; makefile: 175; sh: 83
file content (33 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
      subroutine fpseno(maxtr,up,left,right,info,merk,ibind,nbind)
c  subroutine fpseno fetches a branch of a triply linked tree the
c  information of which is kept in the arrays up,left,right and info.
c  the branch has a specified length nbind and is determined by the
c  parameter merk which points to its terminal node. the information
c  field of the nodes of this branch is stored in the array ibind. on
c  exit merk points to a new branch of length nbind or takes the value
c  1 if no such branch was found.
c  ..
c  ..scalar arguments..
      integer maxtr,merk,nbind
c  ..array arguments..
      integer up(maxtr),left(maxtr),right(maxtr),info(maxtr),
     * ibind(nbind)
c  ..scalar arguments..
      integer i,j,k
c  ..
      k = merk
      j = nbind
      do 10 i=1,nbind
        ibind(j) = info(k)
        k = up(k)
        j = j-1
  10  continue
  20  k = right(merk)
      if(k.ne.0) go to 30
      merk = up(merk)
      if(merk-1) 40,40,20
  30  merk = k
      k = left(merk)
      if(k.ne.0) go to 30
  40  return
      end