Gets a specific double precision real element out of the list, stack, queue or map with the corresponding key.
More...
|
real(kind=default_precision) function | list_get_real (specificlist, i) |
| Retrieves the element at index i from the list. Converts between precision and from int. More...
|
|
real(kind=default_precision) function | stack_get_real (specificstack, i) |
| Gets a specific element from the stack at index specified. Converts between precision and from int. More...
|
|
real(kind=default_precision) function | queue_get_real (specificqueue, i) |
| Returns a specific queue element at an index. Converts between precision and from int. More...
|
|
real(kind=default_precision) function | map_get_real (specificmap, key) |
| Gets a specific element out of the map with the corresponding key. This converts between precision and from ints. More...
|
|
real(kind=default_precision) function | hashmap_get_real (specificmap, key) |
| Gets a specific element out of the hashmap with the corresponding key. Converts between precision and from int. More...
|
|
real(kind=default_precision) function | mapentry_get_real (mapentry_item) |
| Retrieves the double precision real value from a map entry. More...
|
|
Gets a specific double precision real element out of the list, stack, queue or map with the corresponding key.
This has a time complexity of O(n)
- Parameters
-
collection | The specific list, stack, queue or map involved |
key | String look up key |
- Returns
- Double precision real value associated with the key or raises an error if none exists
Definition at line 399 of file collections.F90.
◆ hashmap_get_real()
real(kind=default_precision) function collections_mod::c_get_real::hashmap_get_real |
( |
type(hashmap_type), intent(inout) |
specificmap, |
|
|
character(len=*), intent(in) |
key |
|
) |
| |
|
private |
Gets a specific element out of the hashmap with the corresponding key. Converts between precision and from int.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific hashmap involved |
key | Look up key |
- Returns
- Double precision real value associated with the key or raises an error if none is found
Definition at line 1731 of file collections.F90.
1732 type(hashmap_type),
intent(inout) :: specificmap
1733 character(len=*),
intent(in) :: key
1736 class(*),
pointer :: generic
1738 generic=>hashmap_get_generic(specificmap, key)
1739 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find real entry with key '"//trim(key)//
"'")
1740 select type(vr=>generic)
1744 hashmap_get_real=conv_single_real_to_double(vr)
1746 hashmap_get_real=conv_single_real_to_double(conv_to_real(vr))
◆ list_get_real()
real(kind=default_precision) function collections_mod::c_get_real::list_get_real |
( |
type(list_type), intent(inout) |
specificlist, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Retrieves the element at index i from the list. Converts between precision and from int.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificlist | The specific list involved |
i | Index to look up |
- Returns
- Double precision real data in the list or raises an error if none is found
Definition at line 3074 of file collections.F90.
3075 type(list_type),
intent(inout) :: specificlist
3076 integer,
intent(in) :: i
3079 class(*),
pointer :: generic
3081 generic=>list_get_generic(specificlist, i)
3082 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get real from list at index "//trim(conv_to_string(i)))
3083 select type(vr=>generic)
3087 list_get_real=conv_single_real_to_double(vr)
3089 list_get_real=conv_single_real_to_double(conv_to_real(vr))
◆ map_get_real()
real(kind=default_precision) function collections_mod::c_get_real::map_get_real |
( |
type(map_type), intent(inout) |
specificmap, |
|
|
character(len=*), intent(in) |
key |
|
) |
| |
|
private |
Gets a specific element out of the map with the corresponding key. This converts between precision and from ints.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific map involved |
key | Look up key |
- Returns
- Real value associated with the key or raises an error if none is found
Definition at line 1093 of file collections.F90.
1094 type(map_type),
intent(inout) :: specificmap
1095 character(len=*),
intent(in) :: key
1098 class(*),
pointer :: generic
1100 generic=>map_get_generic(specificmap, key)
1101 if (.not.
associated(generic))
call log_log(
log_error,
"Can not find real entry with key '"//trim(key)//
"'")
1102 select type(vr=>generic)
1106 map_get_real=conv_single_real_to_double(vr)
1108 map_get_real=conv_single_real_to_double(conv_to_real(vr))
◆ mapentry_get_real()
real(kind=default_precision) function collections_mod::c_get_real::mapentry_get_real |
( |
type(mapentry_type), intent(in) |
mapentry_item | ) |
|
|
private |
Retrieves the double precision real value from a map entry.
- Parameters
-
mapentry_item | The map entry to retrieve the double precision real value from (auto converts from single/ints) |
Definition at line 3346 of file collections.F90.
3347 type(mapentry_type),
intent(in) :: mapentry_item
3350 class(*),
pointer :: generic
3352 generic=>mapentry_item%value
3353 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get real from map entry")
3354 select type(vr=>generic)
3356 mapentry_get_real=vr
3358 mapentry_get_real=conv_single_real_to_double(vr)
3360 mapentry_get_real=conv_single_real_to_double(conv_to_real(vr))
◆ queue_get_real()
real(kind=default_precision) function collections_mod::c_get_real::queue_get_real |
( |
type(queue_type), intent(inout) |
specificqueue, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Returns a specific queue element at an index. Converts between precision and from int.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificqueue | The specific queue involved |
i | The index to look up |
- Returns
- Double precision real element at i or raises an error if none is found
Definition at line 2680 of file collections.F90.
2681 type(queue_type),
intent(inout) :: specificqueue
2682 integer,
intent(in) :: i
2685 class(*),
pointer :: generic
2687 generic=>queue_get_generic(specificqueue, i)
2688 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get real from queue at index "//trim(conv_to_string(i)))
2689 select type(vr=>generic)
2693 queue_get_real=conv_single_real_to_double(vr)
2695 queue_get_real=conv_single_real_to_double(conv_to_real(vr))
◆ stack_get_real()
real(kind=default_precision) function collections_mod::c_get_real::stack_get_real |
( |
type(stack_type), intent(inout) |
specificstack, |
|
|
integer, intent(in) |
i |
|
) |
| |
|
private |
Gets a specific element from the stack at index specified. Converts between precision and from int.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificstack | The specific stack involved |
i | The index to retrieve the element at |
- Returns
- Double precision real data or raises an error if none is found
Definition at line 2384 of file collections.F90.
2385 type(stack_type),
intent(inout) :: specificstack
2386 integer,
intent(in) :: i
2389 class(*),
pointer :: generic
2391 generic=>stack_get_generic(specificstack, i)
2392 if (.not.
associated(generic))
call log_log(
log_error,
"Can not get real from stack at index "//trim(conv_to_string(i)))
2393 select type(vr=>generic)
2397 stack_get_real=conv_single_real_to_double(vr)
2399 stack_get_real=conv_single_real_to_double(conv_to_real(vr))
The documentation for this interface was generated from the following file:
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...