HASTY key class.
Return an instance of key_base
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(in) | :: | key | The key value. |
||
integer(kind=I4P), | intent(in), | optional | :: | buckets_number | Buckets number. |
Instance of key_base.
Key class to identify a node.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=I8P), | private, | allocatable | :: | id_ | Unique key id. |
||
character(len=:), | private, | allocatable | :: | char_key_ | Store character key. |
private elemental function creator(key, buckets_number) | Return an instance of key_base |
procedure, public, pass(self) :: destroy | Destroy the key. |
procedure, public, pass(self) :: hash | Hash the key. |
procedure, public, pass(self) :: id | Return the id. |
procedure, public, nopass :: is_key_allowed | Typeguard for used key. |
procedure, public, pass(self) :: set | Set the key. |
procedure, public, pass(self) :: stringify | Return a string representation of the key. |
generic, public :: operator(==) => is_equal | Overloading |
procedure, private, pass(lhs) :: is_equal | Implement |
procedure, private, nopass :: hash_string | Hash a string. |
Hash the key.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(key_base), | intent(in) | :: | self | The key. |
||
integer(kind=I4P), | intent(in) | :: | buckets_number | Buckets number. |
Bucket index corresponding to the key.
Return the id.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(key_base), | intent(in) | :: | self | The key. |
Unique key id.
Typeguard for used key.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(in) | :: | key | The key ID. |
Check result.
Return a string representation of the key.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(key_base), | intent(in) | :: | self | The key. |
The key stringified.
Hash a string.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string | The string. |
||
integer(kind=I4P), | intent(in) | :: | buckets_number | Buckets number. |
Bucket index corresponding to the string.