      FUNCTION potts_actl(nlink,ha) ! Bernd Berg, Dec 13, 2000.
C Calculation of the mean action variable per link from its histogram. 
C Use hist_aver for arbitrary histograms (no link normalization).
      include '../ForLib/implicit.sta'
      dimension ha(0:nlink)
      potts_actl=0
      hsum=0
      do ilink=0,nlink
        potts_actl=potts_actl+ilink*ha(ilink)
        hsum=hsum+ha(ilink)
      end do
      potts_actl=potts_actl/(hsum*nlink) ! iact per link.
      return
      end
