hash_function Function

private function hash_function(this, index) result(hval)

Get the hash value for an arbitrary input value @param index input value to get the hash value for

Type Bound

index_rhash_t

Arguments

Type IntentOptional Attributes Name
class(index_rhash_t), intent(in) :: this
integer(kind=int64), intent(in) :: index

Return Value integer(kind=int64)


Contents

Source Code


Source Code

    function hash_function(this, index) result(hval)
        class(index_rhash_t), intent(in) :: this
        integer(int64), intent(in) :: index
        integer(int64) :: hval

! TODO: Implement an actual hash function
        hval = mod(index - 1, this%shared_ht%val_range()) + 1_int64
    end function hash_function