seeded_water_hasher 函数

public pure function seeded_water_hasher(key)

使用 Waterhash 算法对键进行哈希处理 (规范)

参数:key - 要进行哈希处理的键

参数

类型 意图可选 属性 名称
type(key_type), intent(in) :: key

返回值 integer(kind=int_hash)


源代码

    pure function seeded_water_hasher( key )
!! Version: Experimental
!!
!! Hashes a key with the waterhash algorithm
!! ([Specifications](../page/specs/stdlib_hashmaps.html#seeded_water_hasher-calculates-a-hash-code-from-a-key))
!!
!! Arguments:
!!     key  - the key to be hashed
        type(key_type), intent(in)  :: key
        integer(int_hash)           :: seeded_water_hasher

        seeded_water_hasher = water_hash( key % value, &
            int( z'DEADBEEF1EADBEEF', int64 ) )

    end function seeded_water_hasher