hasty_key_base Module

module~~hasty_key_base~~UsesGraph module~hasty_key_base hasty_key_base module~penf penf module~penf->module~hasty_key_base module~penf_global_parameters_variables penf_global_parameters_variables module~penf_global_parameters_variables->module~penf module~penf_b_size penf_b_size module~penf_global_parameters_variables->module~penf_b_size module~penf_stringify penf_stringify module~penf_global_parameters_variables->module~penf_stringify module~penf_b_size->module~penf module~penf_b_size->module~penf_stringify module~penf_stringify->module~penf iso_fortran_env iso_fortran_env iso_fortran_env->module~penf_stringify
Help

HASTY key class.

Used By

module~~hasty_key_base~~UsedByGraph module~hasty_key_base hasty_key_base module~hasty hasty module~hasty_key_base->module~hasty module~hasty_dictionary_node hasty_dictionary_node module~hasty_key_base->module~hasty_dictionary_node module~hasty_dictionary hasty_dictionary module~hasty_key_base->module~hasty_dictionary module~hasty_key_morton hasty_key_morton module~hasty_key_base->module~hasty_key_morton module~hasty_hash_table hasty_hash_table module~hasty_key_base->module~hasty_hash_table program~hasty_test_caf_basic hasty_test_caf_basic module~hasty->program~hasty_test_caf_basic program~hasty_test_hash_table_homo hasty_test_hash_table_homo module~hasty->program~hasty_test_hash_table_homo program~hasty_test_hash_table_homocontent_failure hasty_test_hash_table_homocontent_failure module~hasty->program~hasty_test_hash_table_homocontent_failure program~hasty_test_caf_get_clone hasty_test_caf_get_clone module~hasty->program~hasty_test_caf_get_clone program~hasty_test_hash_table_homokey_failure hasty_test_hash_table_homokey_failure module~hasty->program~hasty_test_hash_table_homokey_failure program~hasty_test_dictionary hasty_test_dictionary module~hasty->program~hasty_test_dictionary program~hasty_test_hash_table hasty_test_hash_table module~hasty->program~hasty_test_hash_table module~hasty_dictionary_node->module~hasty module~hasty_dictionary_node->module~hasty_dictionary module~hasty_dictionary->module~hasty module~hasty_dictionary->module~hasty_hash_table module~hasty_key_morton->module~hasty module~hasty_hash_table->module~hasty
Help


Interfaces

public interface key_base

  • private elemental function creator(key, buckets_number) result(key_)

    Return an instance of key_base

    Arguments

    Type IntentOptional AttributesName
    class(*), intent(in) :: key

    The key value.

    integer(kind=I4P), intent(in), optional :: buckets_number

    Buckets number.

    Return Value type(key_base)

    Instance of key_base.


Derived Types

type, public :: key_base

Key class to identify a node.

Components

TypeVisibility AttributesNameInitial
integer(kind=I8P), private, allocatable:: id_

Unique key id.

character(len=:), private, allocatable:: char_key_

Store character key.

Constructor

private elemental function creator(key, buckets_number)

Return an instance of key_base

Type-Bound Procedures

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 == operator.

procedure, private, pass(lhs) :: is_equal

Implement == operator.

procedure, private, nopass :: hash_string

Hash a string.


Functions

private elemental function creator(key, buckets_number) result(key_)

Return an instance of key_base

Arguments

Type IntentOptional AttributesName
class(*), intent(in) :: key

The key value.

integer(kind=I4P), intent(in), optional :: buckets_number

Buckets number.

Return Value type(key_base)

Instance of key_base.

private elemental function hash(self, buckets_number) result(bucket)

Hash the key.

Arguments

Type IntentOptional AttributesName
class(key_base), intent(in) :: self

The key.

integer(kind=I4P), intent(in) :: buckets_number

Buckets number.

Return Value integer(kind=I4P)

Bucket index corresponding to the key.

private elemental function id(self)

Return the id.

Arguments

Type IntentOptional AttributesName
class(key_base), intent(in) :: self

The key.

Return Value integer(kind=I8P)

Unique key id.

public elemental function is_key_allowed(key)

Typeguard for used key.

Arguments

Type IntentOptional AttributesName
class(*), intent(in) :: key

The key ID.

Return Value logical

Check result.

private pure function stringify(self) result(str_key)

Return a string representation of the key.

Arguments

Type IntentOptional AttributesName
class(key_base), intent(in) :: self

The key.

Return Value character(len=:), allocatable

The key stringified.

private elemental function hash_string(string, buckets_number) result(bucket)

Hash a string.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: string

The string.

integer(kind=I4P), intent(in) :: buckets_number

Buckets number.

Return Value integer(kind=I8P)

Bucket index corresponding to the string.

private elemental function is_equal(lhs, rhs)

Implement == operator.

Arguments

Type IntentOptional AttributesName
class(key_base), intent(in) :: lhs

Left hand side.

class(*), intent(in) :: rhs

Rigth hand side.

Return Value logical


Subroutines

private elemental subroutine destroy(self)

Destroy the key.

Arguments

Type IntentOptional AttributesName
class(key_base), intent(inout) :: self

The key.

private elemental subroutine set(self, key, buckets_number)

Set the key.

Arguments

Type IntentOptional AttributesName
class(key_base), intent(inout) :: self

The key.

class(*), intent(in) :: key

The key value.

integer(kind=I4P), intent(in), optional :: buckets_number

Buckets number.