get_address Function

public pure function get_address(ras_class, string) result(address)

Arguments

Type IntentOptional Attributes Name
type(ras_class_data), intent(in) :: ras_class
integer, intent(in) :: string(:)

Return Value integer


Contents

Source Code


Source Code

    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