dgree Subroutine

private subroutine dgree(ndstk, nr, ndeg, iold, ibw1, ipf1)

Arguments

Type IntentOptional AttributesName
integer :: ndstk
integer :: nr
integer :: ndeg
integer :: iold
integer :: ibw1
integer :: ipf1

Called by

proc~~dgree~~CalledByGraph proc~dgree dgree proc~reduce reduce proc~reduce->proc~dgree

Contents

Source Code


Source Code

    SUBROUTINE DGREE(NDSTK, NR, NDEG, IOLD, IBW1, IPF1)
        !  DGREE COMPUTES THE DEGREE OF EACH NODE IN NDSTK AND STORES
        !  IT IN THE ARRAY NDEG.  THE BANDWIDTH AND PROFILE FOR THE ORIGINAL
        !  OR INPUT RENUMBERING OF THE GRAPH IS COMPUTED ALSO.
        ! USE INTEGER*2 NDSTK  WITH AN IBM 360 OR 370.
        INTEGER NDSTK
        ! COMMON /GRA/ N, IDPTH, IDEG
        DIMENSION NDSTK(NR,IDEG), NDEG(N), IOLD(N)

        IBW1 = 0
        IPF1 = 0
        DO 40 I=1,N
            NDEG(I) = 0
            IRW = 0
            DO 20 J=1,IDEG
                ITST = NDSTK(I,J)
                IF(ITST <= 0) EXIT
                NDEG(I) = NDEG(I) + 1
                IDIF = IOLD(I) - IOLD(ITST)
                IF (IRW < IDIF) IRW = IDIF
20          END DO
            IPF1 = IPF1 + IRW
            IF (IRW>IBW1) IBW1 = IRW
40      END DO
        RETURN
    END SUBROUTINE DGREE