multimap_mod Module

module~~multimap_mod~~UsesGraph module~multimap_mod multimap_mod module~array_list_mod array_list_mod module~array_list_mod->module~multimap_mod module~dictionary_mod dictionary_mod module~array_list_mod->module~dictionary_mod module~data_set_mod data_set_mod module~array_list_mod->module~data_set_mod module~dictionary_mod->module~multimap_mod module~map_mod map_mod module~dictionary_mod->module~map_mod module~map_mod->module~multimap_mod module~list_mod list_mod module~list_mod->module~array_list_mod module~ordered_mod ordered_mod module~ordered_mod->module~array_list_mod module~queue_mod queue_mod module~ordered_mod->module~queue_mod module~abstract_container_mod abstract_container_mod module~abstract_container_mod->module~array_list_mod module~abstract_container_mod->module~dictionary_mod module~abstract_container_mod->module~map_mod module~abstract_container_mod->module~list_mod module~abstract_container_mod->module~ordered_mod module~iterator_mod iterator_mod module~abstract_container_mod->module~iterator_mod module~deque_mod deque_mod module~abstract_container_mod->module~deque_mod module~iterable_mod iterable_mod module~abstract_container_mod->module~iterable_mod module~abstract_container_mod->module~data_set_mod module~iterator_mod->module~array_list_mod module~iterator_mod->module~ordered_mod module~iterator_mod->module~iterable_mod module~deque_mod->module~list_mod module~queue_mod->module~deque_mod module~countable_mod countable_mod module~countable_mod->module~ordered_mod module~countable_mod->module~data_set_mod module~iterable_mod->module~ordered_mod module~iterable_mod->module~countable_mod iso_fortran_env iso_fortran_env iso_fortran_env->module~abstract_container_mod module~data_set_mod->module~dictionary_mod
Help

Provides an abstract type for a multiple map data structure. These are data structures which consist of key-value pairs, potentially holding multiple values per key.


Abstract Interfaces

abstract interface

  • private pure subroutine update_multimap_sub(this, other)

    Arguments

    Type IntentOptional AttributesName
    class(multimap), intent(inout) :: this
    class(multimap), intent(in) :: other

    A multimap whose key-value pairs will be added to this one, adding values to any keys which already exist in this one.

abstract interface

  • private pure subroutine update_map_sub(this, other)

    Arguments

    Type IntentOptional AttributesName
    class(multimap), intent(inout) :: this
    class(map), intent(in) :: other

    A map whose key-value pairs will be added to this one, appending the value to any keys which already exist in this one.

abstract interface

  • private pure subroutine remove_val_sub(this, key, val)

    Arguments

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

    A key from which to remove a value

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

    A value which will be removed from key, if key has such a value.

abstract interface

  • private pure function get_func(this, key)

    Arguments

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

    The key whose associated values are to be returned

    Return Value type(array_list)

    The values associated with the specified key

abstract interface

  • private pure function get_count_func(this, key)

    Arguments

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

    The key whose associated values are to be counted

    Return Value real


Derived Types

type, public, abstract, extends(dictionary) :: multimap

Type-Bound Procedures

procedure(get_func), public, deferred :: get

Returns a list of values associated with the specified key.

procedure(get_count_func), public, deferred :: get_count

Returns the number of values associated with the specified key.

procedure(update_map_sub), private, deferred :: update_map

Adds any key-value pairs in the standard map to this one. If a key does not already exist in this dictionary then it is created and assigned the corresponding value. Otherwise, the value in the other dictionary is just added to the values associated with the key in this one.

procedure(update_multimap_sub), private, deferred :: update_multimap

Adds any key-value pairs in the second multipmap to this one. If a key does not already exist in this dictionary then it is created and assigned the corresponding values. Otherwise, the values in the other dictionary add just added to the values associated with the key in this one.

generic, public :: update => update_map, update_multimap

Update this multimap's contents with those of another (multi)map

procedure(remove_val_sub), public, deferred :: remove_value

Remove the specified value from the specified key

Description

An abstract type for the standard map data structures. These are data structures which consist of key-value pairs, potentially holding multiple values per key.