make_vdistribution Subroutine

private pure subroutine make_vdistribution(nelements, vbins, bins, decimation, images)

Makes new virtual distribution of rows/columns.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nelements

number of elements

integer, intent(out), DIMENSION(nelements) :: vbins

virtual bins

integer, intent(in), DIMENSION(nelements) :: bins

bins to which elements belong

integer, intent(in) :: decimation

matching between bins

integer, intent(in), DIMENSION(nelements) :: images

images to which element belong


Source Code

   PURE SUBROUTINE make_vdistribution(nelements, vbins, bins, decimation, images)
      !! Makes new virtual distribution of rows/columns.

      INTEGER, INTENT(IN)                                :: nelements
         !! number of elements
      INTEGER, DIMENSION(nelements), INTENT(OUT)         :: vbins
         !! virtual bins
      INTEGER, DIMENSION(nelements), INTENT(IN)          :: bins
         !! bins to which elements belong
      INTEGER, INTENT(IN)                                :: decimation
         !! matching between bins
      INTEGER, DIMENSION(nelements), INTENT(IN)          :: images
         !! images to which element belong

      INTEGER                                            :: el

!   ---------------------------------------------------------------------------

      DO el = 1, nelements
         vbins(el) = bins(el)*decimation + images(el) - 1
      END DO
   END SUBROUTINE make_vdistribution