Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | q | |||
integer(kind=int32), | intent(in) | :: | p |
pure function fuseIndex_int32(q, p) result(ind)
! fuse p,q into one symmetric index
! the resulting index is not contigious in p or q
! Input: p,q - 2d-array indices
! Output: ind - 1d-array index assuming the array is symmetric w.r. p<->q
integer(int32), intent(in) :: p, q
integer(int32) :: ind
! qp and pq are considered to be the same index
! -> permutational symmetry
! implemented in terms of fuseIndex_int64
ind = int(fuseIndex_int64(int(q, int64), int(p, int64)))
end function fuseIndex_int32