THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THE ECLIPSE PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT
module utilities
contains
solves Rx=b where R is nxn upper triangular. Solution overwrites b.
R is a single suffix array: the first nmax elements contain the first row
of R in positions 1:n, the next nmax-1 elements contain the second row of R,
and so on. nn indexes the element R(n,n) (where nn=n(3-n)/2+(n-1)nmax)
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
subroutine rsol(n,nn,nmax,R,b)implicit double precision(a-h,o-z)dimension R(*),b(*)n1=nmax+1ii=nnb(n)=b(n)/R(nn)do i=n-1,1,-1ii=ii-n1+ib(i)=-scpr(-b(i),R(ii+1),b(i+1),n-i)/R(ii)end do end subroutine rsol