Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ras_class_data), | intent(in) | :: | ras_class | |||
integer, | intent(in) | :: | string(:) |
pure function get_address(ras_class, string) result(address)
type(ras_class_data), intent(in) :: ras_class
integer, intent(in) :: string(:)
integer :: elec
integer :: address
! (Eq. 11.8.3)
address = 1
do elec = 1, size(string)
address = address + ras_class%vertex_weights(string(elec), elec) - &
ras_class%vertex_weights(string(elec) - 1, elec - 1)
end do
end function get_address