MONC
Private Member Functions | List of all members
collections_mod::c_put_integer Interface Reference

Puts an integer key-value pair into the map. More...

Private Member Functions

subroutine map_put_int (specificmap, key, int_data)
 Puts a specific key-value pair into the map. More...
 
subroutine hashmap_put_int (specificmap, key, int_data)
 Puts a specific key-value pair into the hashmap. More...
 

Detailed Description

Puts an integer key-value pair into the map.

If the key is not already held in the map then the key-value pair will be added, otherwise the existing key-value pair will be modified to hold this updated value (keys must be unique) This has a time complexity of O(n) due to key look up

Parameters
collectionThe specific map involved
keyThe key to place in the map
valueInteger data value to place in the map

Definition at line 318 of file collections.F90.

Member Function/Subroutine Documentation

◆ hashmap_put_int()

subroutine collections_mod::c_put_integer::hashmap_put_int ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
integer, intent(in)  int_data 
)
private

Puts a specific key-value pair into the hashmap.

If the key is not already held in the hashmap then the key-value pair will be added, otherwise the existing key-value pair will be modified to hold this updated value (keys must be unique). This uses a hashing function for performance Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific map involved
keyThe key to place in the map
dataInteger data value to place in the map

Definition at line 1283 of file collections.F90.

1284  type(hashmap_type), intent(inout) :: specificmap
1285  integer, intent(in) :: int_data
1286  character(len=*), intent(in) :: key
1287 
1288  class(*), pointer :: generic
1289 
1290  generic=>conv_to_generic(int_data, .true.)
1291  call hashmap_put_generic(specificmap, key, generic, .true.)

◆ map_put_int()

subroutine collections_mod::c_put_integer::map_put_int ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
integer, intent(in)  int_data 
)
private

Puts a specific key-value pair into the map.

If the key is not already held in the map then the key-value pair will be added, otherwise the existing key-value pair will be modified to hold this updated value (keys must be unique) Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific map involved
keyThe key to place in the map
dataInteger value to place in the map

Definition at line 644 of file collections.F90.

645  type(map_type), intent(inout) :: specificmap
646  integer, intent(in) :: int_data
647  character(len=*), intent(in) :: key
648 
649  class(*), pointer :: generic
650 
651  generic=>conv_to_generic(int_data, .true.)
652  call map_put_generic(specificmap, key, generic, .true.)

The documentation for this interface was generated from the following file: