Determines whether or not a map contains a specific key.
More...
|
logical function | map_contains_key (specificmap, key) |
| Determines whether or not a map contains a specific key. More...
|
|
logical function | hashmap_contains_key (specificmap, key) |
| Determines whether or not a hashmap contains a specific key. More...
|
|
logical function | hashset_contains (specificset, key) |
| Determines wheter the hashset contains a specific key or not. More...
|
|
Determines whether or not a map contains a specific key.
This has a time complexity of O(n)
- Parameters
-
collection | The specific map involved |
key | The key we are looking up |
- Returns
- Whether the map contains the key
Definition at line 447 of file collections.F90.
◆ hashmap_contains_key()
logical function collections_mod::c_contains::hashmap_contains_key |
( |
type(hashmap_type), intent(inout) |
specificmap, |
|
|
character(len=*), intent(in) |
key |
|
) |
| |
|
private |
Determines whether or not a hashmap contains a specific key.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific map involved |
key | The key we are looking up |
- Returns
- Whether the map contains the key
Definition at line 1404 of file collections.F90.
1404 type(hashmap_type),
intent(inout) :: specificmap
1405 character(len=*),
intent(in) :: key
1407 class(*),
pointer :: raw_map_node
1409 raw_map_node=>hashmap_getnode(specificmap, key)
1410 hashmap_contains_key=
associated(raw_map_node)
◆ hashset_contains()
logical function collections_mod::c_contains::hashset_contains |
( |
type(hashset_type), intent(inout) |
specificset, |
|
|
character(len=*), intent(in) |
key |
|
) |
| |
|
private |
Determines wheter the hashset contains a specific key or not.
- Parameters
-
specificset | The specific set involved |
key | The string key to test for |
- Returns
- Whether the hashset contains this key or not
Definition at line 2006 of file collections.F90.
2006 type(hashset_type),
intent(inout) :: specificset
2007 character(len=*),
intent(in) :: key
2009 integer :: hash, key_location
2011 call hashset_getlocation(specificset, key, hash, key_location)
2012 hashset_contains= (hash .gt. 0 .and. key_location .gt. 0)
◆ map_contains_key()
logical function collections_mod::c_contains::map_contains_key |
( |
type(map_type), intent(inout) |
specificmap, |
|
|
character(len=*), intent(in) |
key |
|
) |
| |
|
private |
Determines whether or not a map contains a specific key.
Do not call directly from external module, this is called via the appropriate interface
- Parameters
-
specificmap | The specific map involved |
key | The key we are looking up |
- Returns
- Whether the map contains the key
Definition at line 762 of file collections.F90.
762 type(map_type),
intent(inout) :: specificmap
763 character(len=*),
intent(in) :: key
765 integer :: key_location
766 class(*),
pointer :: raw_map_node
768 raw_map_node => map_getnode(specificmap, key, key_location)
769 map_contains_key = key_location .gt. 0
The documentation for this interface was generated from the following file:
- /nfs/a277/earlcd/dev/monc/svn-git/monc/model_core/src/utils/collections.F90