stdlib_hashmap_wrappers 模块

公共过程 公共类型 公共整数



接口

公共接口 get

  • 私有子例程 get_char_key(key, value)

    获取键的内容作为 CHARACTER 字符串 参数: key - 输入键 value - 键映射到 CHARACTER 字符串的内容

    参数

    类型 意图可选 属性 名称
    type(key_type), intent(in) :: key
    character(len=:), intent(out), allocatable :: value
  • 私有子例程 get_int8_key(key, value)

    获取键的内容作为 INTEGER(INT8) 向量 参数: key - 输入键 value - 键映射到 INTEGER(INT8) 向量的 内容

    参数

    类型 意图可选 属性 名称
    type(key_type), intent(in) :: key
    integer(kind=int8), intent(out), allocatable :: value(:)
  • 私有纯子例程 get_int32_key(key, value)

    获取键的内容作为 INTEGER(INT32) 向量 参数: key - 输入键 value - 键映射到 INTEGER(INT32) 向量的 内容

    参数

    类型 意图可选 属性 名称
    type(key_type), intent(in) :: key
    integer(kind=int32), intent(out), allocatable :: value(:)
  • 私有子例程 get_other(other, value)

    获取 other 的内容作为 CLASS() 字符串 参数: other - 输入 other 数据 value - other 映射到 CLASS() 变量的内容

    参数

    类型 意图可选 属性 名称
    type(other_type), intent(in) :: other
    class(*), intent(out), allocatable :: value

公共接口 operator(==)

  • 私有函数 equal_keys(key1, key2) result(test)

    比较两个键以判断是否相等 (规范)

    参数: key1 - 第一个键 key2 - 第二个键

    参数

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

    返回值 logical

公共接口 set

  • 私有子例程 set_char_key(key, value)

    从 CHARACTER 字符串设置键的内容 参数: key - 输出键 value - 输入 CHARACTER 字符串

    参数

    类型 意图可选 属性 名称
    type(key_type), intent(out) :: key
    character(len=*), intent(in) :: value
  • 私有子例程 set_int8_key(key, value)

    从 INTEGER(INT8) 向量设置键的内容 参数: key - 输出键 value - 输入 INTEGER(INT8) 向量

    参数

    类型 意图可选 属性 名称
    type(key_type), intent(out) :: key
    integer(kind=int8), intent(in) :: value(:)
  • 私有纯子例程 set_int32_key(key, value)

    从 INTEGER(INT32) 向量设置键的内容 参数: key - 输出键 value - 输入 INTEGER(INT32) 向量

    参数

    类型 意图可选 属性 名称
    type(key_type), intent(out) :: key
    integer(kind=int32), intent(in) :: value(:)
  • 私有子例程 set_other(other, value)

    从 CLASS() 变量设置 other 数据的内容 参数: other - 输出 other 数据 value - 输入 CLASS() 变量

    参数

    类型 意图可选 属性 名称
    type(other_type), intent(out) :: other
    class(*), intent(in) :: value

抽象接口

抽象接口

对在 KEY_TYPE 上运行的 64 位哈希函数的抽象接口

  • 公共纯函数 hasher_fun(key) result(hash_value)

    参数

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

    返回值 integer(kind=int_hash)


派生类型

type, public ::  key_type

键的真实类型的包装类型

组件

类型 可见性 属性 名称 初始
integer(kind=int8), public, allocatable :: value(:)

type, public ::  other_type

其他数据的真实类型的包装类型

组件

类型 可见性 属性 名称 初始
class(*), public, allocatable :: value

函数

公共纯函数 fnv_1_hasher(key)

许可证
Creative Commons License
版本
实验性

使用 FNV_1 算法对键进行哈希处理 参数: key - 要进行哈希处理的键

参数

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

返回值 integer(kind=int_hash)

公共纯函数 fnv_1a_hasher(key)

许可证
Creative Commons License
版本
实验性

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

阅读更多…

参数

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

返回值 integer(kind=int_hash)

公共纯函数 seeded_nmhash32_hasher(key)

许可证
Creative Commons License
版本
实验性

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

阅读更多…

参数

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

返回值 integer(kind=int_hash)

公共纯函数 seeded_nmhash32x_hasher(key)

许可证
Creative Commons License
版本
实验性

使用 NMHASH32X 哈希算法对键进行哈希处理 (规范) 参数: key - 要进行哈希处理的键 seed - 哈希算法的种子(未使用)

参数

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

返回值 integer(kind=int_hash)

公共纯函数 seeded_water_hasher(key)

许可证
Creative Commons License
版本
实验性

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

阅读更多…

参数

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

返回值 integer(kind=int_hash)


子例程

公共纯子例程 copy_key(old_key, new_key)

许可证
Creative Commons License
版本
实验性

将键 old_key 的内容复制到键 new_key (规范)

阅读更多…

参数

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

公共子例程 copy_other(other_in, other_out)

许可证
Creative Commons License
版本
实验性

将 other 数据 other_in 复制到变量 other_out (规范)

阅读更多…

参数

类型 意图可选 属性 名称
type(other_type), intent(in) :: other_in
type(other_type), intent(out) :: other_out

公共子例程 free_key(key)

许可证
Creative Commons License
版本
实验性

释放键中的内存 (规范)

阅读更多…

参数

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

公共子例程 free_other(other)

许可证
Creative Commons License
版本
实验性

释放 other 数据中的内存 (规范)

阅读更多…

参数

类型 意图可选 属性 名称
type(other_type), intent(inout) :: other