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

Retrieves the integer value held at the specific map index or null if index > map elements. More...

Private Member Functions

integer function map_integer_at (specificmap, i)
 Retrieves the integer value held at the specific map index. More...
 
integer function hashmap_integer_at (specificmap, i)
 Retrieves the value held at the specific hashmap index. Note that this is an expensive operation has it has to potentially process all internal hashed lists so avoid if can. More...
 

Detailed Description

Retrieves the integer value held at the specific map index or null if index > map elements.

This has a time complexity of O(n)

Parameters
collectionThe specific map involved
indexThe index to get value from
Returns
Integer value or raises an error if none is found

Definition at line 477 of file collections.F90.

Member Function/Subroutine Documentation

◆ hashmap_integer_at()

integer function collections_mod::c_integer_at::hashmap_integer_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

Retrieves the value held at the specific hashmap index. Note that this is an expensive operation has it has to potentially process all internal hashed lists so avoid if can.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific hashmap involved
iIndex to get value from
Returns
Integer value or raises an error if none is found

Definition at line 1445 of file collections.F90.

1446  type(hashmap_type), intent(inout) :: specificmap
1447  integer, intent(in) :: i
1448  integer :: hashmap_integer_at
1449 
1450  class(*), pointer :: generic
1451 
1452  generic=>hashmap_generic_at(specificmap, i)
1453  if (.not. associated(generic)) call log_log(log_error, "Can not find integer at "//trim(conv_to_string(i)))
1454  hashmap_integer_at=conv_to_integer(generic, .false.)

◆ map_integer_at()

integer function collections_mod::c_integer_at::map_integer_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

Retrieves the integer value held at the specific map index.

Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe specific map involved
iIndex to get value from
Returns
Integer value or raises an error if none is found

Definition at line 805 of file collections.F90.

806  type(map_type), intent(inout) :: specificmap
807  integer, intent(in) :: i
808  integer :: map_integer_at
809 
810  class(*), pointer :: generic
811 
812  generic=>map_generic_at(specificmap, i)
813  if (.not. associated(generic)) call log_log(log_error, "Can not find integer at "//trim(conv_to_string(i)))
814  map_integer_at=conv_to_integer(generic, .false.)

The documentation for this interface was generated from the following file:
logging_mod::log_error
integer, parameter, public log_error
Only log ERROR messages.
Definition: logging.F90:11
logging_mod::log_log
subroutine, public log_log(level, message, str)
Logs a message at the specified level. If the level is above the current level then the message is ig...
Definition: logging.F90:75