      FUNCTION MINDEG (NC,IC,IDEG)
C
C     THIS ROUTINE IS USED ONLY IN BANDIT MODULE
C
C     THIS FUNCTION HAS AS ITS VALUE THE MINIMUM DEGREE OF ANY NODE OF
C     COMPONENT NC IF NC.GT.0
C     IF NC.LE.0, ALL COMPONENTS ARE CONSIDERED.
C
      DIMENSION       IC(1),    IDEG(1)
      COMMON /BANDS / NN
C
      M=600000
      DO 100 I=1,NN
      IF (NC) 40,50,40
   40 IF (IC(I) -NC) 100,50,100
   50 IF (M-IDEG(I)) 100,100,60
   60 M=IDEG(I)
  100 CONTINUE
      MINDEG=M
      RETURN
      END
