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

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

Private Member Functions

logical function map_logical_at (specificmap, i)
 Retrieves the logical value held at the specific map index. More...
 
logical function hashmap_logical_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 logical 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
Logical value or raises an error if none is found

Definition at line 507 of file collections.F90.

Member Function/Subroutine Documentation

◆ hashmap_logical_at()

logical function collections_mod::c_logical_at::hashmap_logical_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
Logical value or raises an error if none is found

Definition at line 1510 of file collections.F90.

1510  type(hashmap_type), intent(inout) :: specificmap
1511  integer, intent(in) :: i
1512  logical :: hashmap_logical_at
1513 
1514  class(*), pointer :: generic
1515 
1516  generic=>hashmap_generic_at(specificmap, i)
1517  if (.not. associated(generic)) call log_log(log_error, "Can not find logical at "//trim(conv_to_string(i)))
1518  hashmap_logical_at=conv_to_logical(generic, .false.)

◆ map_logical_at()

logical function collections_mod::c_logical_at::map_logical_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

Retrieves the logical 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
Logical value or raises an error if none is found

Definition at line 867 of file collections.F90.

867  type(map_type), intent(inout) :: specificmap
868  integer, intent(in) :: i
869  logical :: map_logical_at
870 
871  class(*), pointer :: generic
872 
873  generic=>map_generic_at(specificmap, i)
874  if (.not. associated(generic)) call log_log(log_error, "Can not find logical at "//trim(conv_to_string(i)))
875  map_logical_at=conv_to_logical(generic, .false.)

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