gtkIOStream  1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
dtblok.f
Go to the documentation of this file.
1  subroutine dtblok ( bloks, integs, nbloks, ipivot, iflag,
2  & detsgn, detlog )
3 
4 c*********************************************************************72
5 c
6 cc DTBLOK gets the determinant of an almost block diagonal matrix.
7 c
8 c computes the determinant of an almost block diagonal matrix whose
9 c plu factorization has been obtained previously in fcblok.
10 c *** the logarithm of the determinant is computed instead of the
11 c determinant itself to avoid the danger of overflow or underflow
12 c inherent in this calculation.
13 c
14 c parameters
15 c bloks, integs, nbloks, ipivot, iflag are as on return from fcblok.
16 c in particular, iflag = (-1)**(number of interchanges dur-
17 c ing factorization) if successful, otherwise iflag = 0.
18 c detsgn on output, contains the sign of the determinant.
19 c detlog on output, contains the natural logarithm of the determi-
20 c nant if determinant is not zero. otherwise contains 0.
21 c
22  implicit none
23 
24  integer nbloks
25 
26  integer index,integs(3,nbloks),ipivot(1),iflag, i,indexp,ip,
27  & k,last,nrow
28  double precision bloks(1),detsgn,detlog
29 c
30  detsgn = iflag
31  detlog = 0.0d+00
32  if (iflag .eq. 0) return
33  index = 0
34  indexp = 0
35  do 2 i=1,nbloks
36  nrow = integs(1,i)
37  last = integs(3,i)
38  do 1 k=1,last
39  ip = index + nrow*(k-1) + ipivot(indexp+k)
40  detlog = detlog + dlog(dabs(bloks(ip)))
41  1 detsgn = detsgn*dsign(1.0d+00,bloks(ip))
42  index = nrow*integs(2,i) + index
43  2 indexp = indexp + nrow
44  return
45  end
subroutine dtblok(bloks, integs, nbloks, ipivot, iflag, detsgn, detlog)
Definition: dtblok.f:3
gtkIOStream: /tmp/gtkiostream/src/deBoor/dtblok.f Source File
GTK+ IOStream  Beta