MONC
Data Types | Functions/Subroutines | Variables
collections_mod Module Reference

Collection data structures. More...

Data Types

interface  c_add_generic
 Adds a generic element to the end of the list. More...
 
interface  c_add_integer
 Adds an integer element to the end of the list. More...
 
interface  c_add_logical
 Adds a logical element to the end of the list. More...
 
interface  c_add_real
 Adds a double precision real element to the end of the list. More...
 
interface  c_add_string
 Adds a string to the end of the list. More...
 
interface  c_contains
 Determines whether or not a map contains a specific key. More...
 
interface  c_free
 Frees up all the allocatable, heap, memory associated with a list, stack, queue or map. More...
 
interface  c_generic_at
 Retrieves the generic value held at the specific map index or null if index > map elements. More...
 
interface  c_generic_entry_at
 Retrieves a map entry at a specific index or null if index > map elements. This is more efficient than calling key at and then value at (or get with the key) as only requires one search for both the key and value. More...
 
interface  c_get_generic
 Gets a specific generic element out of the list, stack, queue or map with the corresponding key. More...
 
interface  c_get_integer
 Gets a specific integer element out of the list, stack, queue or map with the corresponding key. More...
 
interface  c_get_iterator
 
interface  c_get_logical
 Gets a specific logical element out of the list, stack, queue or map with the corresponding key. More...
 
interface  c_get_real
 Gets a specific double precision real element out of the list, stack, queue or map with the corresponding key. More...
 
interface  c_get_string
 Gets a specific string element out of the list, stack, queue or map with the corresponding key. More...
 
interface  c_has_next
 
interface  c_insert_generic
 Inserts a generic element into the list or places at the end if the index > list size. More...
 
interface  c_insert_integer
 Inserts an integer element into the list or places at the end if the index > list size. More...
 
interface  c_insert_logical
 Inserts a logical element into the list or places at the end if the index > list size. More...
 
interface  c_insert_real
 Inserts a double precision real element into the list or places at the end if the index > list size. More...
 
interface  c_insert_string
 Inserts a string into the list or places at the end if the index > list size. More...
 
interface  c_integer_at
 Retrieves the integer value held at the specific map index or null if index > map elements. More...
 
interface  c_integer_entry_at
 Retrieves a map entry at a specific index. This is more efficient than calling key at and then value at (or get with the key) as only requires one search for both the key and value. More...
 
interface  c_is_empty
 Returns whether a collection is empty. More...
 
interface  c_key_at
 Retrieves the key currently being held at a specific index in the map or "" if the index > map elements. More...
 
interface  c_logical_at
 Retrieves the logical value held at the specific map index or null if index > map elements. More...
 
interface  c_logical_entry_at
 Retrieves a map entry at a specific index. This is more efficient than calling key at and then value at (or get with the key) as only requires one search for both the key and value. More...
 
interface  c_next_generic
 
interface  c_next_integer
 
interface  c_next_logical
 
interface  c_next_mapentry
 
interface  c_next_real
 
interface  c_next_string
 
interface  c_pop_generic
 Pops a generic element off the stack or queue. More...
 
interface  c_pop_integer
 Pops an integer element off the stack or queue. More...
 
interface  c_pop_logical
 Pops a logical element off the stack or queue. More...
 
interface  c_pop_real
 Pops a double precision real element off the stack or queue. More...
 
interface  c_pop_string
 Pops a string off the stack or queue. More...
 
interface  c_push_generic
 Pushes a generic element onto the stack or queue. More...
 
interface  c_push_integer
 Pushes an integer element onto the stack or queue. More...
 
interface  c_push_logical
 Pushes a logical element onto the stack or queue. More...
 
interface  c_push_real
 Pushes a double precision real element onto the stack or queue. More...
 
interface  c_push_string
 Pushes a string element onto the stack or queue. More...
 
interface  c_put_generic
 Puts a generic key-value pair into the map. More...
 
interface  c_put_integer
 Puts an integer key-value pair into the map. More...
 
interface  c_put_logical
 Puts a logical key-value pair into the map. More...
 
interface  c_put_real
 Puts a double precision real key-value pair into the map. More...
 
interface  c_put_string
 Puts a string key-value pair into the map. More...
 
interface  c_real_at
 Retrieves the double precision real value held at the specific map index or null if index > map elements. More...
 
interface  c_real_entry_at
 Retrieves a map entry at a specific index. This is more efficient than calling key at and then value at (or get with the key) as only requires one search for both the key and value. More...
 
interface  c_remove
 Removes a specific element from the list or map. More...
 
interface  c_size
 Returns the number of elements in the collection. More...
 
interface  c_string_at
 Retrieves the string value held at the specific map index or null if index > map elements. More...
 
interface  c_string_entry_at
 Retrieves a map entry at a specific index. This is more efficient than calling key at and then value at (or get with the key) as only requires one search for both the key and value. More...
 
type  hashmap_type
 A hashmap structure, the same as a map but uses hashing for greatly improved performance when storing large numbers of entries, with the lookup complexisty being almost constant (assuming good hash distribution.) Note that this does require more storage than a map and unlike a map does not preserve ordering. More...
 
type  hashset_type
 Hashset structure which will store unique strings. The hashing aspect means that lookup is very fast but it does add extra memory overhead and the order is non-deterministic. More...
 
type  iterator_type
 
type  list_type
 List data structure which implements a doubly linked list. This list will preserve its order. More...
 
type  listnode_type
 Private list node which holds the raw generic node data and pointers to next and previous list nodes. More...
 
type  map_type
 Map data structure that holds string (length 20 maximum) key value pairs. More...
 
type  mapentry_type
 
type  mapnode_type
 Private map key-value pair data structure. More...
 
type  queue_type
 Queue (FIFO) data structure. More...
 
type  setnode_type
 Private set key structure. More...
 
type  stack_type
 Stack (FILO) data structure. More...
 

Functions/Subroutines

type(iterator_type) function map_get_iterator (specificmap)
 Retrieves an iterator representation of the map, ready to access the first element. More...
 
subroutine map_put_int (specificmap, key, int_data)
 Puts a specific key-value pair into the map. More...
 
subroutine map_put_string (specificmap, key, str_data)
 Puts a specific key-value pair into the map. More...
 
subroutine map_put_real (specificmap, key, real_data)
 Puts a specific key-value pair into the map. More...
 
subroutine map_put_logical (specificmap, key, logical_data)
 Puts a specific key-value pair into the map. More...
 
subroutine map_put_generic (specificmap, key, data, memory_allocation_automatic)
 Puts a specific key-value pair into the map. More...
 
logical function map_contains_key (specificmap, key)
 Determines whether or not a map contains a specific key. More...
 
character(len=string_length) function map_key_at (specificmap, i)
 Retrieves the key currently being held at a specific index in the map or "" if the index > map elements. More...
 
integer function map_integer_at (specificmap, i)
 Retrieves the integer value held at the specific map index. More...
 
character(len=string_length) function map_string_at (specificmap, i)
 Retrieves the string value held at the specific map index. More...
 
real(kind=default_precision) function map_real_at (specificmap, i)
 Retrieves the real value held at the specific map index. Converts between precision and int. More...
 
logical function map_logical_at (specificmap, i)
 Retrieves the logical value held at the specific map index. More...
 
class(*) function, pointer map_generic_at (specificmap, i)
 Retrieves the generic value held at the specific map index or null if index > map elements. More...
 
logical function map_integer_entry_at (specificmap, i, key, int_val)
 Retrieves the entry at a specific map index or null if index > map elements. More...
 
logical function map_string_entry_at (specificmap, i, key, str_val)
 Retrieves the entry at a specific map index or null if index > map elements. More...
 
logical function map_real_entry_at (specificmap, i, key, real_val)
 Retrieves the entry at a specific map index or null if index > map elements. This converts precision and from ints. More...
 
logical function map_logical_entry_at (specificmap, i, key, logical_val)
 Retrieves the entry at a specific map index or null if index > map elements. More...
 
logical function map_generic_entry_at (specificmap, i, key, val)
 Retrieves the entry at a specific map index or null if index > map elements. More...
 
subroutine map_remove (specificmap, key)
 Removes a specific key-value pair from the map. More...
 
integer function map_get_int (specificmap, key)
 Gets a specific element out of the map with the corresponding key. More...
 
character(len=string_length) function map_get_string (specificmap, key)
 Gets a specific element out of the map with the corresponding key. 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...
 
logical function map_get_logical (specificmap, key)
 Gets a specific element out of the map with the corresponding key. More...
 
class(*) function, pointer map_get_generic (specificmap, key)
 Gets a specific element out of the map with the corresponding key. More...
 
class(*) function, pointer map_getnode (specificmap, key, foundindex)
 This gets the map node that the key represents (rather than the specific value) More...
 
integer function map_size (specificmap)
 Returns the number of elements in the map. More...
 
logical function map_is_empty (specificmap)
 Returns whether a map is empty. More...
 
subroutine map_free (specificmap)
 Frees up all the allocatable, heap, memory associated with a specific map. More...
 
type(iterator_type) function hashmap_get_iterator (specificmap)
 Retrieves an iterator representation of the hashmap, ready to access the first element. More...
 
subroutine hashmap_put_int (specificmap, key, int_data)
 Puts a specific key-value pair into the hashmap. More...
 
subroutine hashmap_put_string (specificmap, key, str_data)
 Puts a specific key-value pair into the hashmap. More...
 
subroutine hashmap_put_real (specificmap, key, real_data)
 Puts a specific key-value pair into the hashmap. More...
 
subroutine hashmap_put_logical (specificmap, key, logical_data)
 Puts a specific key-value pair into the hashmap. More...
 
subroutine hashmap_put_generic (specificmap, key, data, memory_allocation_automatic)
 Puts a specific key-value pair into the hashmap. More...
 
logical function hashmap_contains_key (specificmap, key)
 Determines whether or not a hashmap contains a specific key. More...
 
character(len=string_length) function hashmap_key_at (specificmap, i)
 Retrieves the key currently being held at a specific index in the hashmap or "" if the index > map elements. Note that this is an expensive operation has it has to potentially process all internal hashed lists so avoid if can. 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...
 
character(len=string_length) function hashmap_string_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...
 
integer function hashmap_real_at (specificmap, i)
 Retrieves the value held at the specific hashmap index. Converts between precision and from int. Note that this is an expensive operation has it has to potentially process all internal hashed lists so avoid if can. 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...
 
class(*) function, pointer hashmap_generic_at (specificmap, i)
 Retrieves the value held at the specific hashmap index or null if index > map elements. Note that this is an expensive operation has it has to potentially process all internal hashed lists so avoid if can. More...
 
logical function hashmap_integer_entry_at (specificmap, i, key, int_val)
 Retrieves the entry at a specific map index. More...
 
logical function hashmap_string_entry_at (specificmap, i, key, str_val)
 Retrieves the entry at a specific map index. More...
 
logical function hashmap_real_entry_at (specificmap, i, key, real_val)
 Retrieves the entry at a specific map index. This converts between precision and from int. More...
 
logical function hashmap_logical_entry_at (specificmap, i, key, logical_val)
 Retrieves the entry at a specific map index. More...
 
logical function hashmap_generic_entry_at (specificmap, i, key, val)
 Retrieves the entry at a specific map index or null if index > map elements. More...
 
subroutine hashmap_remove (specificmap, key)
 Removes a specific key-value pair from the hashmap. More...
 
integer function hashmap_get_int (specificmap, key)
 Gets a specific element out of the hashmap with the corresponding key. More...
 
character(len=string_length) function hashmap_get_string (specificmap, key)
 Gets a specific element out of the hashmap with the corresponding key. 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...
 
logical function hashmap_get_logical (specificmap, key)
 Gets a specific element out of the hashmap with the corresponding key. More...
 
class(*) function, pointer hashmap_get_generic (specificmap, key)
 Gets a specific element out of the hashmap with the corresponding key. More...
 
class(*) function, pointer hashmap_getnode (specificmap, key, key_location)
 This gets the hashmap node that the key represents (rather than the specific value) More...
 
class(*) function, pointer hashmap_getnode_atindex (specificmap, index)
 This gets the hashmap node at a specific index, from the first hash linked list to the end. More...
 
integer function hashmap_size (specificmap)
 Returns the number of elements in the hashmap. More...
 
logical function hashmap_is_empty (specificmap)
 Returns whether a hashmap is empty. More...
 
subroutine hashmap_free (specificmap)
 Frees up all the allocatable, heap, memory associated with a specific hashmap. More...
 
type(iterator_type) function hashset_get_iterator (specificset)
 Retrieves an iterator representation of the hashset, ready to access the first element. More...
 
subroutine hashset_add (specificset, key)
 Adds a string to the hashset which stores unique strings, therefore if the string already exists then this is ignored. More...
 
subroutine hashset_remove (specificset, key)
 Removes a string from the hashset. More...
 
logical function hashset_contains (specificset, key)
 Determines wheter the hashset contains a specific key or not. More...
 
subroutine hashset_getlocation (specificset, key, hash, key_location)
 Determines the location and hash of a key within a specific hashset. The hash is set regardless of whether the key is found (assuming the set data structure is allocated) and corresponds to the entry in the hash table. The location is set if the key is found and is the entry in the linked list of a specific hash table entry. This is zero if no key is in the hash set. More...
 
logical function hashset_is_empty (specificset)
 Determines whether or not the hashset is empty. More...
 
character(len=string_length) function hashset_get_string (specificset, index)
 Retrieves the key at index i from the set or empty string if index < list size. More...
 
subroutine hashset_free (specificset)
 Frees up all the allocatable, heap, memory associated with a specific set. More...
 
integer function hashset_size (specificset)
 Returns the number of elements in a list. More...
 
integer function get_hashkey (key)
 Translates the string key into a hash from 1 to hash_size (inclusive.) This encoding is deterministic, so will result in the same hash for a key on multiple calls and is therefore used as the basis of our hashing collections. More...
 
type(iterator_type) function stack_get_iterator (specificstack)
 Retrieves an iterator representation of the stack, ready to access the first element. More...
 
subroutine stack_push_int (specificstack, int_data)
 Pushes an element onto the stack (LIFO) More...
 
subroutine stack_push_string (specificstack, str_data)
 Pushes an element onto the stack (LIFO) More...
 
subroutine stack_push_real (specificstack, real_data)
 Pushes an element onto the stack (LIFO) More...
 
subroutine stack_push_logical (specificstack, logical_data)
 Pushes an element onto the stack (LIFO) More...
 
subroutine stack_push_generic (specificstack, data, memory_allocation_automatic)
 Pushes an element onto the stack (LIFO) More...
 
integer function stack_pop_int (specificstack)
 Pops an element off the stack (LIFO) More...
 
character(len=string_length) function stack_pop_string (specificstack)
 Pops an element off the stack (LIFO) More...
 
real(kind=default_precision) function stack_pop_real (specificstack)
 Pops an element off the stack (LIFO). Converts between precision and from int. More...
 
logical function stack_pop_logical (specificstack)
 Pops an element off the stack (LIFO) More...
 
class(*) function, pointer stack_pop_generic (specificstack)
 Pops an element off the stack (LIFO) More...
 
integer function stack_get_int (specificstack, i)
 Gets a specific element from the stack at index specified. More...
 
character(len=string_length) function stack_get_string (specificstack, i)
 Gets a specific element from the stack at index specified. 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...
 
logical function stack_get_logical (specificstack, i)
 Gets a specific element from the stack at index specified. More...
 
class(*) function, pointer stack_get_generic (specificstack, i)
 Gets a specific element from the stack at index specified or null if the index > stack size. More...
 
integer function stack_size (specificstack)
 Returns the number of elements held on the stack. More...
 
logical function stack_is_empty (specificstack)
 Returns whether a stack is empty. More...
 
subroutine stack_free (specificstack)
 Frees up all the allocatable, heap, memory associated with a specific stack. More...
 
type(iterator_type) function queue_get_iterator (specificqueue)
 Retrieves an iterator representation of the queue, ready to access the first element. More...
 
subroutine queue_push_int (specificqueue, int_data)
 Adds an element to the end of the queue (FIFO) More...
 
subroutine queue_push_string (specificqueue, str_data)
 Adds an element to the end of the queue (FIFO) More...
 
subroutine queue_push_real (specificqueue, real_data)
 Adds an element to the end of the queue (FIFO) More...
 
subroutine queue_push_logical (specificqueue, logical_data)
 Adds an element to the end of the queue (FIFO) More...
 
subroutine queue_push_generic (specificqueue, data, memory_allocation_automatic)
 Adds an element to the end of the queue (FIFO) More...
 
integer function queue_pop_int (specificqueue)
 Pops the queue element off the head of the queue (FIFO) More...
 
character(len=string_length) function queue_pop_string (specificqueue)
 Pops the queue element off the head of the queue (FIFO) More...
 
real(kind=default_precision) function queue_pop_real (specificqueue)
 Pops the queue element off the head of the queue (FIFO). Converts between precision and from int. More...
 
logical function queue_pop_logical (specificqueue)
 Pops the queue element off the head of the queue (FIFO) More...
 
class(*) function, pointer queue_pop_generic (specificqueue)
 Pops the queue element off the head of the queue (FIFO) More...
 
integer function queue_get_int (specificqueue, i)
 Returns a specific queue element at an index. More...
 
character(len=string_length) function queue_get_string (specificqueue, i)
 Returns a specific queue element at an index. 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...
 
logical function queue_get_logical (specificqueue, i)
 Returns a specific queue element at an index. More...
 
class(*) function, pointer queue_get_generic (specificqueue, i)
 Returns a specific queue element at an index or null if index > queue size. More...
 
integer function queue_size (specificqueue)
 Returns the number of elements held in a queue. More...
 
logical function queue_is_empty (specificqueue)
 Returns whether a queue is empty. More...
 
subroutine queue_free (specificqueue)
 Frees up all the allocatable, heap, memory associated with a specific queue. More...
 
type(iterator_type) function list_get_iterator (specificlist)
 Retrieves an iterator representation of the list, ready to access the first element. More...
 
subroutine list_insert_int (specificlist, int_data, i)
 Inserts an element into the list or places at the end if the index > list size. More...
 
subroutine list_insert_string (specificlist, str_data, i)
 Inserts an element into the list or places at the end if the index > list size. More...
 
subroutine list_insert_real (specificlist, real_data, i)
 Inserts an element into the list or places at the end if the index > list size. More...
 
subroutine list_insert_logical (specificlist, logical_data, i)
 Inserts an element into the list or places at the end if the index > list size. More...
 
subroutine list_insert_generic (specificlist, data, i, memory_allocation_automatic)
 Inserts an element into the list or places at the end if the index > list size. More...
 
subroutine list_add_int (specificlist, int_data)
 Adds an element to the end of the list. More...
 
subroutine list_add_string (specificlist, str_data)
 Adds an element to the end of the list. More...
 
subroutine list_add_real (specificlist, real_data)
 Adds an element to the end of the list. More...
 
subroutine list_add_logical (specificlist, logical_data)
 Adds an element to the end of the list. More...
 
subroutine list_add_generic (specificlist, data, memory_allocation_automatic)
 Adds an element to the end of the list. More...
 
subroutine list_remove (specificlist, i)
 Removes an element from the list at a specific index. More...
 
logical function list_is_empty (specificlist)
 Determines whether or not the list is empty. More...
 
integer function list_get_int (specificlist, i)
 Retrieves the element at index i from the list. More...
 
character(len=string_length) function list_get_string (specificlist, i)
 Retrieves the element at index i from the list. 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...
 
logical function list_get_logical (specificlist, i)
 Retrieves the element at index i from the list. More...
 
class(*) function, pointer list_get_generic (specificlist, i)
 Retrieves the element at index i from the list or null if index < list size. More...
 
subroutine list_free (specificlist)
 Frees up all the allocatable, heap, memory associated with a specific list. More...
 
integer function list_size (specificlist)
 Returns the number of elements in a list. More...
 
logical function iteratior_has_next (iterator)
 Deduces whether an iterator has a next entry or not. More...
 
integer function iterator_get_next_integer (iterator)
 Returns the next integer referenced by the iterator and advanced it, or an error if it has reached the end of iteration. More...
 
character(len=string_length) function iterator_get_next_string (iterator)
 Returns the next string referenced by the iterator and advanced it, or an error if it has reached the end of iteration. More...
 
real(kind=default_precision) function iterator_get_next_real (iterator)
 Returns the next real (double precision) referenced by the iterator and advanced it,
or an error if it has reached the end of iteration. More...
 
logical function iterator_get_next_logical (iterator)
 Returns the next logical referenced by the iterator and advanced it, or an error if it has reached the end of iteration. More...
 
type(mapentry_type) function iterator_get_next_mapentry (iterator)
 Returns the next mapentry referenced by the iterator and advanced it, or an error if it has reached the end of iteration or the next item was not a mapentry. More...
 
class(*) function, pointer iterator_get_next_generic (iterator)
 Returns the next generic referenced by the iterator and advanced it, or null if it has reached the end of iteration. More...
 
integer function mapentry_get_int (mapentry_item)
 Retrieves the integer value from a map entry. More...
 
character(len=string_length) function mapentry_get_string (mapentry_item)
 Retrieves the string value from a map entry. More...
 
real(kind=default_precision) function mapentry_get_real (mapentry_item)
 Retrieves the double precision real value from a map entry. More...
 
logical function mapentry_get_logical (mapentry_item)
 Retrieves the logical value from a map entry. More...
 
class(*) function, pointer mapentry_get_generic (mapentry_item)
 Retrieves the generic value from a map entry. More...
 

Variables

integer, parameter, private hash_size = 4993
 Number of entries in the hash table, this is a tradeoff - larger means more memory but smaller runtime assuming a hashing function with good distribution. More...
 

Detailed Description

Collection data structures.

The collections utilities which provide common collection structures for different components of MONC. Currently a list, map, stack and queue all with appropriate functionality are provided. The core of all collections is currently a doubly linked list, this is abstracted to allow for the internal structure of collections to change without requiring any user code modifications.

Function/Subroutine Documentation

◆ get_hashkey()

integer function collections_mod::get_hashkey ( character(len=*), intent(in)  key)
private

Translates the string key into a hash from 1 to hash_size (inclusive.) This encoding is deterministic, so will result in the same hash for a key on multiple calls and is therefore used as the basis of our hashing collections.

Parameters
keyThe key to find the hash code for
Returns
The corresponding hash code

Definition at line 2161 of file collections.F90.

2162  character(len=*), intent(in) :: key
2163 
2164  integer :: i
2165 
2166  get_hashkey=5381
2167  do i=1, len(trim(key))
2168  get_hashkey=(ishft(get_hashkey,5) + get_hashkey) + ichar(key(i:i))
2169  end do
2170  get_hashkey=abs(mod(get_hashkey, hash_size))+1
Here is the caller graph for this function:

◆ hashmap_contains_key()

logical function collections_mod::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
specificmapThe specific map involved
keyThe key we are looking up
Returns
Whether the map contains the key

Definition at line 1403 of file collections.F90.

1404  type(hashmap_type), intent(inout) :: specificmap
1405  character(len=*), intent(in) :: key
1406 
1407  class(*), pointer :: raw_map_node
1408 
1409  raw_map_node=>hashmap_getnode(specificmap, key)
1410  hashmap_contains_key=associated(raw_map_node)
Here is the call graph for this function:

◆ hashmap_free()

subroutine collections_mod::hashmap_free ( type(hashmap_type), intent(inout)  specificmap)
private

Frees up all the allocatable, heap, memory associated with a specific hashmap.

This basically acts like a clear operation and once freed the data structure can be reused Note that it does not free the value at all as this might be referenced else where in the code Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe hashmap to delete all members and free all allocated memory of

Definition at line 1892 of file collections.F90.

1893  type(hashmap_type), intent(inout) :: specificmap
1894 
1895  type(listnode_type), pointer :: node, previousnode
1896  integer :: i
1897 
1898  if (associated(specificmap%map_ds)) then
1899  do i=1, hash_size
1900  node=>specificmap%map_ds(i)%head
1901  previousnode=>null()
1902 
1903  if (associated(node)) then
1904  do while(1==1)
1905  previousnode=>node
1906  node=>node%next
1907  if (associated(previousnode%data)) then
1908  select type (n=>previousnode%data)
1909  type is (mapnode_type)
1910  if (n%memory_allocation_automatic) then
1911  if (associated(n%value)) deallocate(n%value)
1912  end if
1913  end select
1914  deallocate(previousnode%data) ! Free the mapnode data structure
1915  end if
1916  deallocate(previousnode)
1917  if (.not. associated(node)) exit
1918  end do
1919  end if
1920 
1921  specificmap%map_ds(i)%tail=>null()
1922  specificmap%map_ds(i)%head=>null()
1923  specificmap%map_ds(i)%size=0
1924  end do
1925  specificmap%size=0
1926  deallocate(specificmap%map_ds)
1927  end if

◆ hashmap_generic_at()

class(*) function, pointer collections_mod::hashmap_generic_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

Retrieves the value held at the specific hashmap index or null if index > map elements. 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
Pointer to the generic value

Definition at line 1528 of file collections.F90.

1529  type(hashmap_type), intent(inout) :: specificmap
1530  integer, intent(in) :: i
1531 
1532  class(*), pointer :: raw_map_node, hashmap_generic_at
1533 
1534  raw_map_node=>hashmap_getnode_atindex(specificmap, i)
1535  if (associated(raw_map_node)) then
1536  select type(raw_map_node)
1537  type is (mapnode_type)
1538  hashmap_generic_at=>raw_map_node%value
1539  end select
1540  return
1541  else
1542  hashmap_generic_at=>null()
1543  end if
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashmap_generic_entry_at()

logical function collections_mod::hashmap_generic_entry_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
class(*), intent(out), pointer  val 
)
private

Retrieves the entry at a specific map index or null if index > map elements.

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

Parameters
specificmapThe specific map involved
iIndex to get value from
keyThe associated key
valueGeneric pointer to corresponding value

Definition at line 1640 of file collections.F90.

1641  type(hashmap_type), intent(inout) :: specificmap
1642  integer, intent(in) :: i
1643  character(len=*), intent(out) :: key
1644  class(*), pointer, intent(out) :: val
1645 
1646  class(*), pointer :: raw_map_node
1647 
1648  raw_map_node => hashmap_getnode_atindex(specificmap, i)
1649  if (associated(raw_map_node)) then
1650  select type(raw_map_node)
1651  type is (mapnode_type)
1652  val=>raw_map_node%value
1653  key=raw_map_node%key
1654  end select
1655  hashmap_generic_entry_at=.true.
1656  return
1657  end if
1658  val=>null()
1659  hashmap_generic_entry_at=.false.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashmap_get_generic()

class(*) function, pointer collections_mod::hashmap_get_generic ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the hashmap with the corresponding key.

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

Parameters
specificmapThe specific hashmap involved
keyLook up key
Returns
Pointer to the generic value associated with the key or null if none exists

Definition at line 1774 of file collections.F90.

1775  type(hashmap_type), intent(inout) :: specificmap
1776  character(len=*), intent(in) :: key
1777  class(*), pointer :: hashmap_get_generic, raw_map_node
1778 
1779  raw_map_node=>hashmap_getnode(specificmap, key)
1780  if (associated(raw_map_node)) then
1781  select type (raw_map_node)
1782  type is (mapnode_type)
1783  hashmap_get_generic=>raw_map_node%value
1784  end select
1785  return
1786  end if
1787  hashmap_get_generic=>null()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashmap_get_int()

integer function collections_mod::hashmap_get_int ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the hashmap with the corresponding key.

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

Parameters
specificmapThe specific hashmap involved
keyLook up key
Returns
Integer value associated with the key or raises an error if none is found

Definition at line 1695 of file collections.F90.

1696  type(hashmap_type), intent(inout) :: specificmap
1697  character(len=*), intent(in) :: key
1698  integer :: hashmap_get_int
1699 
1700  class(*), pointer :: generic
1701 
1702  generic=>hashmap_get_generic(specificmap, key)
1703  if (.not. associated(generic)) call log_log(log_error, "Can not find integer entry with key '"//trim(key)//"'")
1704  hashmap_get_int=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ hashmap_get_iterator()

type(iterator_type) function collections_mod::hashmap_get_iterator ( type(hashmap_type), intent(inout)  specificmap)
private

Retrieves an iterator representation of the hashmap, ready to access the first element.

Parameters
specificmapSpecific collection to base this iterator on
Returns
The iterator ready to access the first element

Definition at line 1255 of file collections.F90.

1256  type(hashmap_type), intent(inout) :: specificmap
1257 
1258  integer :: i
1259 
1260  hashmap_get_iterator%next_item=>null()
1261  if (associated(specificmap%map_ds)) then
1262  hashmap_get_iterator%hash_structure=>specificmap%map_ds
1263 
1264  do i=1, size(specificmap%map_ds)
1265  if (specificmap%map_ds(i)%size .gt. 0) then
1266  hashmap_get_iterator%next_item=>specificmap%map_ds(i)%head
1267  exit
1268  end if
1269  end do
1270  hashmap_get_iterator%hash_ptr=i+1
1271  end if

◆ hashmap_get_logical()

logical function collections_mod::hashmap_get_logical ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the hashmap with the corresponding key.

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

Parameters
specificmapThe specific hashmap involved
keyLook up key
Returns
Logical value associated with the key or raises an error if none is found

Definition at line 1756 of file collections.F90.

1757  type(hashmap_type), intent(inout) :: specificmap
1758  character(len=*), intent(in) :: key
1759  logical :: hashmap_get_logical
1760 
1761  class(*), pointer :: generic
1762 
1763  generic=>hashmap_get_generic(specificmap, key)
1764  if (.not. associated(generic)) call log_log(log_error, "Can not find logical entry with key '"//trim(key)//"'")
1765  hashmap_get_logical=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ hashmap_get_real()

real(kind=default_precision) function collections_mod::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
specificmapThe specific hashmap involved
keyLook 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
1734  real(kind=default_precision) :: hashmap_get_real
1735 
1736  class(*), pointer :: generic
1737 
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)
1741  type is (real(kind=default_precision))
1742  hashmap_get_real=vr
1743  type is (real)
1744  hashmap_get_real=conv_single_real_to_double(vr)
1745  type is (integer)
1746  hashmap_get_real=conv_single_real_to_double(conv_to_real(vr))
1747  end select
Here is the call graph for this function:

◆ hashmap_get_string()

character(len=string_length) function collections_mod::hashmap_get_string ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the hashmap with the corresponding key.

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

Parameters
specificmapThe specific hashmap involved
keyLook up key
Returns
String value associated with the key or raises an error if none is found

Definition at line 1713 of file collections.F90.

1714  type(hashmap_type), intent(inout) :: specificmap
1715  character(len=*), intent(in) :: key
1716  character(len=STRING_LENGTH) :: hashmap_get_string
1717 
1718  class(*), pointer :: generic
1719 
1720  generic=>hashmap_get_generic(specificmap, key)
1721  if (.not. associated(generic)) call log_log(log_error, "Can not find string entry with key '"//trim(key)//"'")
1722  hashmap_get_string=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ hashmap_getnode()

class(*) function, pointer collections_mod::hashmap_getnode ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
integer, intent(out), optional  key_location 
)
private

This gets the hashmap node that the key represents (rather than the specific value)

It allows us to twiddle with map properties but also grab the value out too Optionally provides us with the list index that the specific node was found at

Parameters
specificmapThe specific hashmap involved
keyLookup key
foundindex(Optional) index where the node is currently held (in that hash list)
Returns
The pointer to the generic map node data structure

Definition at line 1798 of file collections.F90.

1799  type(hashmap_type), intent(inout) :: specificmap
1800  character(len=*), intent(in) :: key
1801  integer, intent(out), optional :: key_location
1802  class(*), pointer :: raw_data, hashmap_getnode
1803 
1804  integer :: i, hash
1805  type(listnode_type), pointer :: node
1806 
1807  hashmap_getnode=>null()
1808  if (present(key_location)) key_location=0
1809 
1810  if (.not. associated(specificmap%map_ds)) return
1811 
1812  hash=get_hashkey(key)
1813 
1814  i=1
1815  node=>specificmap%map_ds(hash)%head
1816  if (associated(node)) then
1817  do while(1==1)
1818  raw_data=>node%data
1819  if (associated(raw_data)) then
1820  select type (raw_data)
1821  type is (mapnode_type)
1822  if (raw_data%key .eq. key) then
1823  hashmap_getnode=>raw_data
1824  if (present(key_location)) key_location=i
1825  return
1826  end if
1827  end select
1828  end if
1829  node=>node%next
1830  i=i+1
1831  if (.not. associated(node)) exit
1832  end do
1833  end if
1834  if (present(key_location)) key_location=0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashmap_getnode_atindex()

class(*) function, pointer collections_mod::hashmap_getnode_atindex ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  index 
)
private

This gets the hashmap node at a specific index, from the first hash linked list to the end.

Parameters
specificmapThe specific hashmap involved
indexIndex to locate at
Returns
The pointer to the generic map node data structure

Definition at line 1842 of file collections.F90.

1843  type(hashmap_type), intent(inout) :: specificmap
1844  integer, intent(in) :: index
1845  class(*), pointer :: hashmap_getnode_atindex
1846 
1847  integer :: i, current_size, prev
1848 
1849  hashmap_getnode_atindex=>null()
1850  if (.not. associated(specificmap%map_ds) .or. index .gt. specificmap%size) return
1851 
1852  current_size=0
1853  prev=0
1854  do i=1, hash_size
1855  current_size=current_size+list_size(specificmap%map_ds(i))
1856  if (current_size .ge. index) then
1857  hashmap_getnode_atindex=>list_get_generic(specificmap%map_ds(i), index-prev)
1858  return
1859  end if
1860  prev=current_size
1861  end do
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashmap_integer_at()

integer function collections_mod::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.)
Here is the call graph for this function:

◆ hashmap_integer_entry_at()

logical function collections_mod::hashmap_integer_entry_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
integer, intent(out)  int_val 
)
private

Retrieves the entry at a 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
keyThe associated key
valueInteger value or raises an error if none is found

Definition at line 1553 of file collections.F90.

1554  type(hashmap_type), intent(inout) :: specificmap
1555  integer, intent(in) :: i
1556  character(len=*), intent(out) :: key
1557  integer, intent(out) :: int_val
1558 
1559  class(*), pointer :: generic
1560 
1561  hashmap_integer_entry_at=hashmap_generic_entry_at(specificmap, i, key, generic)
1562  if (.not. associated(generic)) call log_log(log_error, "Can not find integer entry with key '"//trim(key)//"'")
1563  int_val=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ hashmap_is_empty()

logical function collections_mod::hashmap_is_empty ( type(hashmap_type), intent(inout)  specificmap)
private

Returns whether a hashmap is empty.

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

Parameters
specificmapThe specific hashmap involved
Returns
Whether the map is empty

Definition at line 1880 of file collections.F90.

1881  type(hashmap_type), intent(inout) :: specificmap
1882 
1883  hashmap_is_empty=(specificmap%size == 0)

◆ hashmap_key_at()

character(len=string_length) function collections_mod::hashmap_key_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

Retrieves the key currently being held at a specific index in the hashmap or "" if the index > map elements. 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
iThe index to retrieve the key from
Returns
The key string

Definition at line 1420 of file collections.F90.

1421  type(hashmap_type), intent(inout) :: specificmap
1422  integer, intent(in) :: i
1423 
1424  class(*), pointer :: raw_map_node
1425 
1426  raw_map_node=>hashmap_getnode_atindex(specificmap, i)
1427  if (associated(raw_map_node)) then
1428  select type(raw_map_node)
1429  type is(mapnode_type)
1430  hashmap_key_at = raw_map_node%key
1431  end select
1432  return
1433  else
1434  hashmap_key_at=""
1435  end if
Here is the call graph for this function:

◆ hashmap_logical_at()

logical function collections_mod::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 1509 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.)
Here is the call graph for this function:

◆ hashmap_logical_entry_at()

logical function collections_mod::hashmap_logical_entry_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
logical, intent(out)  logical_val 
)
private

Retrieves the entry at a 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
keyThe associated key
valueLogical value or raises an error if none is found

Definition at line 1620 of file collections.F90.

1621  type(hashmap_type), intent(inout) :: specificmap
1622  integer, intent(in) :: i
1623  character(len=*), intent(out) :: key
1624  logical, intent(out) :: logical_val
1625 
1626  class(*), pointer :: generic
1627 
1628  hashmap_logical_entry_at=hashmap_generic_entry_at(specificmap, i, key, generic)
1629  if (.not. associated(generic)) call log_log(log_error, "Can not find logical entry with key '"//trim(key)//"'")
1630  logical_val=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ hashmap_put_generic()

subroutine collections_mod::hashmap_put_generic ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
class(*), intent(in), pointer  data,
logical, intent(in)  memory_allocation_automatic 
)
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
dataPointer to the generic data value to place in the map
memory_allocation_automaticWhether the collections API should manage the freeing of memory

Definition at line 1364 of file collections.F90.

1365  type(hashmap_type), intent(inout) :: specificmap
1366  class(*), pointer, intent(in) :: data
1367  character(len=*), intent(in) :: key
1368  logical, intent(in) :: memory_allocation_automatic
1369 
1370  class(*), pointer :: raw_map_node, generic_map_node
1371  type(mapnode_type), pointer :: newmapnode
1372 
1373  if (.not. associated(specificmap%map_ds)) allocate(specificmap%map_ds(hash_size))
1374 
1375  ! Test to see if key already exists in the map
1376  raw_map_node=>hashmap_getnode(specificmap, key)
1377 
1378  if (associated(raw_map_node)) then
1379  select type(raw_map_node)
1380  type is (mapnode_type)
1381  raw_map_node%value=>data
1382  end select
1383  else
1384  allocate(newmapnode)
1385  newmapnode%value=>data
1386  newmapnode%key=key
1387  newmapnode%memory_allocation_automatic=memory_allocation_automatic
1388  ! Clone and deallocate the newmapnode - this keeps GNU happy with passing the correct pointer and Cray
1389  ! doesn't link the generic pointer just pointing to the data structure hence we clone it
1390  allocate(generic_map_node, source=newmapnode)
1391  deallocate(newmapnode)
1392  call list_add_generic(specificmap%map_ds(get_hashkey(key)), generic_map_node, .false.)
1393  specificmap%size=specificmap%size+1
1394  end if
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashmap_put_int()

subroutine collections_mod::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.)
Here is the call graph for this function:

◆ hashmap_put_logical()

subroutine collections_mod::hashmap_put_logical ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
logical, intent(in)  logical_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
dataLogical data value to place in the map

Definition at line 1343 of file collections.F90.

1344  type(hashmap_type), intent(inout) :: specificmap
1345  logical, intent(in) :: logical_data
1346  character(len=*), intent(in) :: key
1347 
1348  class(*), pointer :: generic
1349 
1350  generic=>conv_to_generic(logical_data, .true.)
1351  call hashmap_put_generic(specificmap, key, generic, .true.)
Here is the call graph for this function:

◆ hashmap_put_real()

subroutine collections_mod::hashmap_put_real ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
real(kind=default_precision), intent(in)  real_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
dataDouble precision real data value to place in the map

Definition at line 1323 of file collections.F90.

1324  type(hashmap_type), intent(inout) :: specificmap
1325  real(kind=default_precision), intent(in) :: real_data
1326  character(len=*), intent(in) :: key
1327 
1328  class(*), pointer :: generic
1329 
1330  generic=>conv_to_generic(real_data, .true.)
1331  call hashmap_put_generic(specificmap, key, generic, .true.)
Here is the call graph for this function:

◆ hashmap_put_string()

subroutine collections_mod::hashmap_put_string ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
character(len=string_length), intent(in)  str_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
dataString data value to place in the map

Definition at line 1303 of file collections.F90.

1304  type(hashmap_type), intent(inout) :: specificmap
1305  character(len=STRING_LENGTH), intent(in) :: str_data
1306  character(len=*), intent(in) :: key
1307 
1308  class(*), pointer :: generic
1309 
1310  generic=>conv_to_generic(str_data, .true.)
1311  call hashmap_put_generic(specificmap, key, generic, .true.)
Here is the call graph for this function:

◆ hashmap_real_at()

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

Retrieves the value held at the specific hashmap index. Converts between precision and from int. 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
Double precision real value or raises an error if none is found

Definition at line 1483 of file collections.F90.

1484  type(hashmap_type), intent(inout) :: specificmap
1485  integer, intent(in) :: i
1486  integer :: hashmap_real_at
1487 
1488  class(*), pointer :: generic
1489 
1490  generic=>hashmap_generic_at(specificmap, i)
1491  if (.not. associated(generic)) call log_log(log_error, "Can not find real at "//trim(conv_to_string(i)))
1492  select type(vr=>generic)
1493  type is (real(kind=default_precision))
1494  hashmap_real_at=vr
1495  type is (real)
1496  hashmap_real_at=conv_single_real_to_double(vr)
1497  type is (integer)
1498  hashmap_real_at=conv_single_real_to_double(conv_to_real(vr))
1499  end select
Here is the call graph for this function:

◆ hashmap_real_entry_at()

logical function collections_mod::hashmap_real_entry_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
real(kind=default_precision), intent(out)  real_val 
)
private

Retrieves the entry at a specific map index. This converts between precision and from int.

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

Parameters
specificmapThe specific map involved
iIndex to get value from
keyThe associated key
valueDouble precision realvalue or raises an error if none is found

Definition at line 1593 of file collections.F90.

1594  type(hashmap_type), intent(inout) :: specificmap
1595  integer, intent(in) :: i
1596  character(len=*), intent(out) :: key
1597  real(kind=default_precision), intent(out) :: real_val
1598 
1599  class(*), pointer :: generic
1600 
1601  hashmap_real_entry_at=hashmap_generic_entry_at(specificmap, i, key, generic)
1602  if (.not. associated(generic)) call log_log(log_error, "Can not find real entry with key '"//trim(key)//"'")
1603  select type(vr=>generic)
1604  type is (real(kind=default_precision))
1605  real_val=vr
1606  type is (real)
1607  real_val=conv_single_real_to_double(vr)
1608  type is (integer)
1609  real_val=conv_single_real_to_double(conv_to_real(vr))
1610  end select
Here is the call graph for this function:

◆ hashmap_remove()

subroutine collections_mod::hashmap_remove ( type(hashmap_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Removes a specific key-value pair from the hashmap.

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

Parameters
specificmapThe specific hashmap involved
keyKey of the key-value pair to remove from the map

Definition at line 1667 of file collections.F90.

1668  type(hashmap_type), intent(inout) :: specificmap
1669  character(len=*), intent(in) :: key
1670 
1671  integer :: key_location
1672  class(*), pointer :: raw_map_node
1673 
1674  raw_map_node=>hashmap_getnode(specificmap, key, key_location)
1675 
1676  if (key_location .gt. 0) then
1677  select type (raw_map_node)
1678  type is (mapnode_type)
1679  if (raw_map_node%memory_allocation_automatic) then
1680  if (associated(raw_map_node%value)) deallocate(raw_map_node%value)
1681  end if
1682  deallocate(raw_map_node)
1683  end select
1684  call list_remove(specificmap%map_ds(get_hashkey(key)), key_location)
1685  specificmap%size=specificmap%size-1
1686  end if
Here is the call graph for this function:

◆ hashmap_size()

integer function collections_mod::hashmap_size ( type(hashmap_type), intent(inout)  specificmap)
private

Returns the number of elements in the hashmap.

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

Parameters
specificmapThe specific hashmap involved
Returns
Number of key-value pairs held in the map

Definition at line 1869 of file collections.F90.

1870  type(hashmap_type), intent(inout) :: specificmap
1871 
1872  hashmap_size=specificmap%size

◆ hashmap_string_at()

character(len=string_length) function collections_mod::hashmap_string_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
String value or raises an error if none is found

Definition at line 1464 of file collections.F90.

1465  type(hashmap_type), intent(inout) :: specificmap
1466  integer, intent(in) :: i
1467  character(len=STRING_LENGTH) :: hashmap_string_at
1468 
1469  class(*), pointer :: generic
1470 
1471  generic=>hashmap_generic_at(specificmap, i)
1472  if (.not. associated(generic)) call log_log(log_error, "Can not find string at "//trim(conv_to_string(i)))
1473  hashmap_string_at=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ hashmap_string_entry_at()

logical function collections_mod::hashmap_string_entry_at ( type(hashmap_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
character(len=string_length), intent(out)  str_val 
)
private

Retrieves the entry at a 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
keyThe associated key
valueString value or raises an error if none is found

Definition at line 1573 of file collections.F90.

1574  type(hashmap_type), intent(inout) :: specificmap
1575  integer, intent(in) :: i
1576  character(len=*), intent(out) :: key
1577  character(len=STRING_LENGTH), intent(out) :: str_val
1578 
1579  class(*), pointer :: generic
1580 
1581  hashmap_string_entry_at=hashmap_generic_entry_at(specificmap, i, key, generic)
1582  if (.not. associated(generic)) call log_log(log_error, "Can not find string entry with key '"//trim(key)//"'")
1583  str_val=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ hashset_add()

subroutine collections_mod::hashset_add ( type(hashset_type), intent(inout)  specificset,
character(len=*), intent(in)  key 
)
private

Adds a string to the hashset which stores unique strings, therefore if the string already exists then this is ignored.

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

Parameters
specificsetThe specific set involved
keyThe string key to add to the set

Definition at line 1958 of file collections.F90.

1959  type(hashset_type), intent(inout) :: specificset
1960  character(len=*), intent(in) :: key
1961 
1962  class(*), pointer :: generic
1963  type(setnode_type), pointer :: newsetnode
1964  integer :: hash, location
1965 
1966  if (.not. associated(specificset%set_ds)) allocate(specificset%set_ds(hash_size))
1967 
1968  call hashset_getlocation(specificset, key, hash, location)
1969 
1970  if (hash .gt. 0 .and. location .eq. 0) then
1971  allocate(newsetnode)
1972  newsetnode%key=key
1973  ! Clone and deallocate the newmapnode - this keeps GNU happy with passing the correct pointer and Cray
1974  ! doesn't link the generic pointer just pointing to the data structure hence we clone it
1975  allocate(generic, source=newsetnode)
1976  deallocate(newsetnode)
1977  call list_add_generic(specificset%set_ds(hash), generic, .true.)
1978  specificset%size=specificset%size+1
1979  end if
Here is the call graph for this function:

◆ hashset_contains()

logical function collections_mod::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
specificsetThe specific set involved
keyThe string key to test for
Returns
Whether the hashset contains this key or not

Definition at line 2005 of file collections.F90.

2006  type(hashset_type), intent(inout) :: specificset
2007  character(len=*), intent(in) :: key
2008 
2009  integer :: hash, key_location
2010 
2011  call hashset_getlocation(specificset, key, hash, key_location)
2012  hashset_contains= (hash .gt. 0 .and. key_location .gt. 0)
Here is the call graph for this function:

◆ hashset_free()

subroutine collections_mod::hashset_free ( type(hashset_type), intent(inout)  specificset)
private

Frees up all the allocatable, heap, memory associated with a specific set.

This basically acts like a clear operation and once freed the data structure can be reused Note that it does not free the data memory at all as this might be referenced else where in the code Do not call directly from external module, this is called via the appropriate interface

Parameters
specificsetThe set to delete all members and free all allocated memory of

Definition at line 2114 of file collections.F90.

2115  type(hashset_type), intent(inout) :: specificset
2116 
2117  type(listnode_type), pointer :: node, previousnode
2118  integer :: i
2119 
2120  if (associated(specificset%set_ds)) then
2121  do i=1, hash_size
2122  node=>specificset%set_ds(i)%head
2123  previousnode=>null()
2124 
2125  if (associated(node)) then
2126  do while(1==1)
2127  previousnode=>node
2128  node=>node%next
2129  if (associated(previousnode%data)) then
2130  deallocate(previousnode%data) ! Free the mapnode data structure
2131  end if
2132  deallocate(previousnode)
2133  if (.not. associated(node)) exit
2134  end do
2135  end if
2136 
2137  specificset%set_ds(i)%tail=>null()
2138  specificset%set_ds(i)%head=>null()
2139  specificset%set_ds(i)%size=0
2140  end do
2141  specificset%size=0
2142  deallocate(specificset%set_ds)
2143  end if

◆ hashset_get_iterator()

type(iterator_type) function collections_mod::hashset_get_iterator ( type(hashset_type), intent(inout)  specificset)
private

Retrieves an iterator representation of the hashset, ready to access the first element.

Parameters
specificsetSpecific collection to base this iterator on
Returns
The iterator ready to access the first element

Definition at line 1933 of file collections.F90.

1934  type(hashset_type), intent(inout) :: specificset
1935 
1936  integer :: i
1937 
1938  hashset_get_iterator%next_item=>null()
1939  if (associated(specificset%set_ds)) then
1940  hashset_get_iterator%hash_structure=>specificset%set_ds
1941 
1942  do i=1, size(specificset%set_ds)
1943  if (specificset%set_ds(i)%size .gt. 0) then
1944  hashset_get_iterator%next_item=>specificset%set_ds(i)%head
1945  exit
1946  end if
1947  end do
1948  hashset_get_iterator%hash_ptr=i+1
1949  end if

◆ hashset_get_string()

character(len=string_length) function collections_mod::hashset_get_string ( type(hashset_type), intent(inout)  specificset,
integer, intent(in)  index 
)
private

Retrieves the key at index i from the set or empty string if index < list size.

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

Parameters
specificsetThe specific set involved
iIndex to look up
Returns
The corresponding key at this location or empty string if none is found

Definition at line 2078 of file collections.F90.

2079  type(hashset_type), intent(inout) :: specificset
2080  integer, intent(in) :: index
2081  class(*), pointer :: generic
2082 
2083  integer :: i, current_size, prev
2084 
2085  hashset_get_string=""
2086  if (.not. associated(specificset%set_ds) .or. index .gt. specificset%size) return
2087 
2088  current_size=0
2089  prev=0
2090  do i=1, hash_size
2091  current_size=current_size+list_size(specificset%set_ds(i))
2092  if (current_size .ge. index) then
2093  generic=>list_get_generic(specificset%set_ds(i), index-prev)
2094  if (associated(generic)) then
2095  select type (generic)
2096  type is (setnode_type)
2097  hashset_get_string=generic%key
2098  end select
2099  return
2100  else
2101  call log_log(log_error, "Can not find hashset entry at index "//trim(conv_to_string(index)))
2102  end if
2103  end if
2104  prev=current_size
2105  end do
Here is the call graph for this function:

◆ hashset_getlocation()

subroutine collections_mod::hashset_getlocation ( type(hashset_type), intent(inout)  specificset,
character(len=*), intent(in)  key,
integer, intent(out)  hash,
integer, intent(out)  key_location 
)
private

Determines the location and hash of a key within a specific hashset. The hash is set regardless of whether the key is found (assuming the set data structure is allocated) and corresponds to the entry in the hash table. The location is set if the key is found and is the entry in the linked list of a specific hash table entry. This is zero if no key is in the hash set.

Parameters
specificsetThe specific set involved
keyThe string key to locate
hashThe hash code of the key
key_locationKey location (relative to the hash table entry) or zero if no key is found

Definition at line 2023 of file collections.F90.

2024  type(hashset_type), intent(inout) :: specificset
2025  character(len=*), intent(in) :: key
2026  integer, intent(out) :: hash, key_location
2027  class(*), pointer :: raw_data
2028 
2029  integer :: i
2030  type(listnode_type), pointer :: node
2031 
2032  hash=0
2033  key_location=0
2034 
2035  if (.not. associated(specificset%set_ds)) return
2036 
2037  hash=get_hashkey(key)
2038 
2039  i=1
2040  node=>specificset%set_ds(hash)%head
2041  if (associated(node)) then
2042  do while(1==1)
2043  raw_data=>node%data
2044  if (associated(raw_data)) then
2045  select type (raw_data)
2046  type is (setnode_type)
2047  if (raw_data%key .eq. key) then
2048  key_location=i
2049  return
2050  end if
2051  end select
2052  end if
2053  node=>node%next
2054  i=i+1
2055  if (.not. associated(node)) exit
2056  end do
2057  end if
2058  key_location=0
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashset_is_empty()

logical function collections_mod::hashset_is_empty ( type(hashset_type), intent(in)  specificset)
private

Determines whether or not the hashset is empty.

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

Parameters
specificsetThe specific set involved
Returns
Whether the set is empty or not

Definition at line 2066 of file collections.F90.

2067  type(hashset_type), intent(in) :: specificset
2068 
2069  hashset_is_empty = specificset%size == 0

◆ hashset_remove()

subroutine collections_mod::hashset_remove ( type(hashset_type), intent(inout)  specificset,
character(len=*), intent(in)  key 
)
private

Removes a string from the hashset.

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

Parameters
specificsetThe specific ste involved
keyThe string key to remove

Definition at line 1987 of file collections.F90.

1988  type(hashset_type), intent(inout) :: specificset
1989  character(len=*), intent(in) :: key
1990 
1991  integer :: location, hash
1992 
1993  call hashset_getlocation(specificset, key, hash, location)
1994  if (hash .gt. 0 .and. location .gt. 0) then
1995  call list_remove(specificset%set_ds(hash), location)
1996  specificset%size=specificset%size-1
1997  end if
Here is the call graph for this function:

◆ hashset_size()

integer function collections_mod::hashset_size ( type(hashset_type), intent(in)  specificset)
private

Returns the number of elements in a list.

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

Parameters
specificlistThe specific list involved
Returns
Number of list elements

Definition at line 2151 of file collections.F90.

2152  type(hashset_type), intent(in) :: specificset
2153 
2154  hashset_size = specificset%size

◆ iteratior_has_next()

logical function collections_mod::iteratior_has_next ( type(iterator_type), intent(inout)  iterator)
private

Deduces whether an iterator has a next entry or not.

Parameters
iteratorThe iterator to test upon
Returns
Whether there is a next entry to access

Definition at line 3184 of file collections.F90.

3185  type(iterator_type), intent(inout) :: iterator
3186 
3187  iteratior_has_next=associated(iterator%next_item)

◆ iterator_get_next_generic()

class(*) function, pointer collections_mod::iterator_get_next_generic ( type(iterator_type), intent(inout)  iterator)
private

Returns the next generic referenced by the iterator and advanced it, or null if it has reached the end of iteration.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next generic or null if none is found

Definition at line 3294 of file collections.F90.

3295  type(iterator_type), intent(inout) :: iterator
3296  class(*), pointer :: iterator_get_next_generic
3297 
3298  integer :: i
3299 
3300  if (associated(iterator%next_item)) then
3301  iterator_get_next_generic=>iterator%next_item%data
3302  iterator%next_item=>iterator%next_item%next
3303  if (.not. associated(iterator%next_item) .and. associated(iterator%hash_structure) .and. &
3304  iterator%hash_ptr .le. size(iterator%hash_structure)) then
3305  do i=iterator%hash_ptr, size(iterator%hash_structure)
3306  if (iterator%hash_structure(i)%size .gt. 0) then
3307  iterator%next_item=>iterator%hash_structure(i)%head
3308  exit
3309  end if
3310  end do
3311  iterator%hash_ptr=i+1
3312  end if
3313  else
3314  iterator_get_next_generic=>null()
3315  end if
Here is the caller graph for this function:

◆ iterator_get_next_integer()

integer function collections_mod::iterator_get_next_integer ( type(iterator_type), intent(inout)  iterator)
private

Returns the next integer referenced by the iterator and advanced it, or an error if it has reached the end of iteration.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next integer

Definition at line 3193 of file collections.F90.

3194  type(iterator_type), intent(inout) :: iterator
3195 
3196  class(*), pointer :: generic
3197 
3198  generic=>iterator_get_next_generic(iterator)
3199  if (associated(generic)) then
3200  iterator_get_next_integer=conv_to_integer(generic, .false.)
3201  else
3202  call log_log(log_error, "Can not get next integer in iterator as iterator has reached end of collection")
3203  end if
Here is the call graph for this function:

◆ iterator_get_next_logical()

logical function collections_mod::iterator_get_next_logical ( type(iterator_type), intent(inout)  iterator)
private

Returns the next logical referenced by the iterator and advanced it, or an error if it has reached the end of iteration.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next logical

Definition at line 3254 of file collections.F90.

3255  type(iterator_type), intent(inout) :: iterator
3256 
3257  class(*), pointer :: generic
3258 
3259  generic=>iterator_get_next_generic(iterator)
3260  if (associated(generic)) then
3261  iterator_get_next_logical=conv_to_logical(generic, .false.)
3262  else
3263  call log_log(log_error, "Can not get next logical in iterator as iterator has reached end of collection")
3264  end if
Here is the call graph for this function:

◆ iterator_get_next_mapentry()

type(mapentry_type) function collections_mod::iterator_get_next_mapentry ( type(iterator_type), intent(inout)  iterator)
private

Returns the next mapentry referenced by the iterator and advanced it, or an error if it has reached the end of iteration or the next item was not a mapentry.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next map entry

Definition at line 3271 of file collections.F90.

3272  type(iterator_type), intent(inout) :: iterator
3273  type(mapentry_type) :: iterator_get_next_mapentry
3274 
3275  class(*), pointer :: generic
3276 
3277  generic=>iterator_get_next_generic(iterator)
3278  if (associated(generic)) then
3279  select type(generic)
3280  type is (mapnode_type)
3281  iterator_get_next_mapentry%key=generic%key
3282  iterator_get_next_mapentry%value=>generic%value
3283  class default
3284  call log_log(log_error, "Next item in iterator is not a map entry")
3285  end select
3286  else
3287  call log_log(log_error, "Can not get next map entry in iterator as iterator has reached end of collection")
3288  end if
Here is the call graph for this function:

◆ iterator_get_next_real()

real(kind=default_precision) function collections_mod::iterator_get_next_real ( type(iterator_type), intent(inout)  iterator)
private

Returns the next real (double precision) referenced by the iterator and advanced it,
or an error if it has reached the end of iteration.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next double precision real, conversion between single and integers is done automatically

Definition at line 3231 of file collections.F90.

3232  type(iterator_type), intent(inout) :: iterator
3233 
3234  class(*), pointer :: generic
3235 
3236  generic=>iterator_get_next_generic(iterator)
3237  if (associated(generic)) then
3238  select type(vr=>generic)
3239  type is (real(kind=default_precision))
3240  iterator_get_next_real=vr
3241  type is (real)
3242  iterator_get_next_real=conv_single_real_to_double(vr)
3243  type is (integer)
3244  iterator_get_next_real=conv_single_real_to_double(conv_to_real(vr))
3245  end select
3246  else
3247  call log_log(log_error, "Can not get next real in iterator as iterator has reached end of collection")
3248  end if
Here is the call graph for this function:

◆ iterator_get_next_string()

character(len=string_length) function collections_mod::iterator_get_next_string ( type(iterator_type), intent(inout)  iterator)
private

Returns the next string referenced by the iterator and advanced it, or an error if it has reached the end of iteration.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next string

Definition at line 3209 of file collections.F90.

3210  type(iterator_type), intent(inout) :: iterator
3211 
3212  class(*), pointer :: generic
3213 
3214  generic=>iterator_get_next_generic(iterator)
3215  if (associated(generic)) then
3216  select type(generic)
3217  type is (setnode_type)
3218  iterator_get_next_string=generic%key
3219  class default
3220  iterator_get_next_string=conv_to_string(generic, .false., string_length)
3221  end select
3222  else
3223  call log_log(log_error, "Can not get next string in iterator as iterator has reached end of collection")
3224  end if
Here is the call graph for this function:

◆ list_add_generic()

subroutine collections_mod::list_add_generic ( type(list_type), intent(inout)  specificlist,
class(*), intent(in), pointer  data,
logical, intent(in)  memory_allocation_automatic 
)
private

Adds an element to the end of the list.

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

Parameters
specificlistThe specific list involved
dataPointer to the generic data to add
memory_allocation_automaticWhether the collections API should manage the freeing of memory

Definition at line 2963 of file collections.F90.

2964  type(list_type), intent(inout) :: specificlist
2965  class(*), pointer, intent(in) :: data
2966  logical, intent(in) :: memory_allocation_automatic
2967 
2968  type(listnode_type), pointer :: newnode
2969 
2970  allocate(newnode)
2971  newnode%data => data
2972 
2973  newnode%prev=>specificlist%tail
2974  newnode%memory_allocation_automatic=memory_allocation_automatic
2975  if (associated(specificlist%tail)) then
2976  specificlist%tail%next => newnode
2977  end if
2978  specificlist%tail => newnode
2979 
2980  if (associated(specificlist%head) .eqv. .false.) then
2981  specificlist%head=>newnode
2982  end if
2983 
2984  specificlist%size=specificlist%size+1
Here is the caller graph for this function:

◆ list_add_int()

subroutine collections_mod::list_add_int ( type(list_type), intent(inout)  specificlist,
integer, intent(in)  int_data 
)
private

Adds an element to the end of the list.

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

Parameters
specificlistThe specific list involved
dataInteger data to add

Definition at line 2902 of file collections.F90.

2903  type(list_type), intent(inout) :: specificlist
2904  integer, intent(in) :: int_data
2905 
2906  class(*), pointer :: generic
2907 
2908  generic=>conv_to_generic(int_data, .true.)
2909  call list_add_generic(specificlist, generic, .true.)
Here is the call graph for this function:

◆ list_add_logical()

subroutine collections_mod::list_add_logical ( type(list_type), intent(inout)  specificlist,
logical, intent(in)  logical_data 
)
private

Adds an element to the end of the list.

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

Parameters
specificlistThe specific list involved
dataLogical data to add

Definition at line 2947 of file collections.F90.

2948  type(list_type), intent(inout) :: specificlist
2949  logical, intent(in) :: logical_data
2950 
2951  class(*), pointer :: generic
2952 
2953  generic=>conv_to_generic(logical_data, .true.)
2954  call list_add_generic(specificlist, generic, .true.)
Here is the call graph for this function:

◆ list_add_real()

subroutine collections_mod::list_add_real ( type(list_type), intent(inout)  specificlist,
real(kind=default_precision), intent(in)  real_data 
)
private

Adds an element to the end of the list.

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

Parameters
specificlistThe specific list involved
dataDouble precision real data to add

Definition at line 2932 of file collections.F90.

2933  type(list_type), intent(inout) :: specificlist
2934  real(kind=default_precision), intent(in) :: real_data
2935 
2936  class(*), pointer :: generic
2937 
2938  generic=>conv_to_generic(real_data, .true.)
2939  call list_add_generic(specificlist, generic, .true.)
Here is the call graph for this function:

◆ list_add_string()

subroutine collections_mod::list_add_string ( type(list_type), intent(inout)  specificlist,
character(len=string_length), intent(in)  str_data 
)
private

Adds an element to the end of the list.

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

Parameters
specificlistThe specific list involved
dataString data to add

Definition at line 2917 of file collections.F90.

2918  type(list_type), intent(inout) :: specificlist
2919  character(len=STRING_LENGTH), intent(in) :: str_data
2920 
2921  class(*), pointer :: generic
2922 
2923  generic=>conv_to_generic(str_data, .true.)
2924  call list_add_generic(specificlist, generic, .true.)
Here is the call graph for this function:

◆ list_free()

subroutine collections_mod::list_free ( type(list_type), intent(inout)  specificlist)
private

Frees up all the allocatable, heap, memory associated with a specific list.

This basically acts like a clear operation and once freed the data structure can be reused Note that it does not free the data memory at all as this might be referenced else where in the code Do not call directly from external module, this is called via the appropriate interface

Parameters
specificlistThe list to delete all members and free all allocated memory of

Definition at line 3145 of file collections.F90.

3146  type(list_type), intent(inout) :: specificlist
3147 
3148  type(listnode_type), pointer :: node, previousnode
3149 
3150  node=>specificlist%head
3151  previousnode=>null()
3152 
3153  if (associated(node)) then
3154  do while(1==1)
3155  previousnode=>node
3156  node=>node%next
3157  if (previousnode%memory_allocation_automatic) then
3158  if (associated(previousnode%data)) deallocate(previousnode%data)
3159  end if
3160  deallocate(previousnode)
3161  if (.not. associated(node)) exit
3162  end do
3163  end if
3164 
3165  specificlist%tail=>null()
3166  specificlist%head=>null()
3167  specificlist%size=0
Here is the caller graph for this function:

◆ list_get_generic()

class(*) function, pointer collections_mod::list_get_generic ( type(list_type), intent(inout)  specificlist,
integer, intent(in)  i 
)
private

Retrieves the element at index i from the list or null if index < list size.

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

Parameters
specificlistThe specific list involved
iIndex to look up
Returns
Pointer to the generic data in the list

Definition at line 3117 of file collections.F90.

3118  type(list_type), intent(inout) :: specificlist
3119  integer, intent(in) :: i
3120  class(*), pointer :: list_get_generic
3121 
3122  integer :: j
3123  type(listnode_type), pointer :: node
3124 
3125  j=1
3126  if (specificlist%size .lt. i) then
3127  list_get_generic => null()
3128  return
3129  end if
3130  node => specificlist%head
3131  do while(j .lt. i)
3132  if (.not. associated(node)) exit
3133  node => node%next
3134  j=j+1
3135  end do
3136  list_get_generic => node%data
Here is the caller graph for this function:

◆ list_get_int()

integer function collections_mod::list_get_int ( type(list_type), intent(inout)  specificlist,
integer, intent(in)  i 
)
private

Retrieves the element at index i from the list.

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

Parameters
specificlistThe specific list involved
iIndex to look up
Returns
Integer data in the list or raises an error if none is found

Definition at line 3038 of file collections.F90.

3039  type(list_type), intent(inout) :: specificlist
3040  integer, intent(in) :: i
3041  integer :: list_get_int
3042 
3043  class(*), pointer :: generic
3044 
3045  generic=>list_get_generic(specificlist, i)
3046  if (.not. associated(generic)) call log_log(log_error, "Can not get integer from list at index "//trim(conv_to_string(i)))
3047  list_get_int=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ list_get_iterator()

type(iterator_type) function collections_mod::list_get_iterator ( type(list_type), intent(inout)  specificlist)
private

Retrieves an iterator representation of the list, ready to access the first element.

Parameters
specificlistSpecific collection to base this iterator on
Returns
The iterator ready to access the first element

Definition at line 2768 of file collections.F90.

2769  type(list_type), intent(inout) :: specificlist
2770 
2771  list_get_iterator%next_item=>specificlist%head
2772  list_get_iterator%hash_structure=>null()
2773  list_get_iterator%hash_ptr=0

◆ list_get_logical()

logical function collections_mod::list_get_logical ( type(list_type), intent(inout)  specificlist,
integer, intent(in)  i 
)
private

Retrieves the element at index i from the list.

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

Parameters
specificlistThe specific list involved
iIndex to look up
Returns
Logical data in the list or raises an error if none is found

Definition at line 3099 of file collections.F90.

3100  type(list_type), intent(inout) :: specificlist
3101  integer, intent(in) :: i
3102  logical :: list_get_logical
3103 
3104  class(*), pointer :: generic
3105 
3106  generic=>list_get_generic(specificlist, i)
3107  if (.not. associated(generic)) call log_log(log_error, "Can not get logical from list at index "//trim(conv_to_string(i)))
3108  list_get_logical=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ list_get_real()

real(kind=default_precision) function collections_mod::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
specificlistThe specific list involved
iIndex 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
3077  real(kind=default_precision) :: list_get_real
3078 
3079  class(*), pointer :: generic
3080 
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)
3084  type is (real(kind=default_precision))
3085  list_get_real=vr
3086  type is (real)
3087  list_get_real=conv_single_real_to_double(vr)
3088  type is (integer)
3089  list_get_real=conv_single_real_to_double(conv_to_real(vr))
3090  end select
Here is the call graph for this function:

◆ list_get_string()

character(len=string_length) function collections_mod::list_get_string ( type(list_type), intent(inout)  specificlist,
integer, intent(in)  i 
)
private

Retrieves the element at index i from the list.

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

Parameters
specificlistThe specific list involved
iIndex to look up
Returns
String data in the list or raises an error if none is found

Definition at line 3056 of file collections.F90.

3057  type(list_type), intent(inout) :: specificlist
3058  integer, intent(in) :: i
3059  character(len=STRING_LENGTH) :: list_get_string
3060 
3061  class(*), pointer :: generic
3062 
3063  generic=>list_get_generic(specificlist, i)
3064  if (.not. associated(generic)) call log_log(log_error, "Can not get string from list at index "//trim(conv_to_string(i)))
3065  list_get_string=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ list_insert_generic()

subroutine collections_mod::list_insert_generic ( type(list_type), intent(inout)  specificlist,
class(*), intent(in), pointer  data,
integer, intent(in)  i,
logical, intent(in)  memory_allocation_automatic 
)
private

Inserts an element into the list or places at the end if the index > list size.

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

Parameters
specificlistThe specific list involved
dataPointer to the generic data to insert
iThe list index to insert to

Definition at line 2849 of file collections.F90.

2850  type(list_type), intent(inout) :: specificlist
2851  integer, intent(in) :: i
2852  class(*), pointer, intent(in) :: data
2853  logical, intent(in) :: memory_allocation_automatic
2854 
2855  integer ::j
2856  type(listnode_type), pointer :: newnode, node
2857 
2858  allocate(newnode)
2859  newnode%data => data
2860 
2861  j=1
2862  node => specificlist%head
2863  if (associated(node)) then
2864  do while(j .lt. i)
2865  if (.not. associated(node%next)) exit
2866  node => node%next
2867  j=j+1
2868  end do
2869  if (j .eq. i) then
2870  ! Insert node
2871  newnode%next => node
2872  newnode%prev => node%prev
2873  newnode%memory_allocation_automatic=memory_allocation_automatic
2874  if (associated(node%prev)) node%prev%next=>newnode
2875  node%prev => newnode
2876  if (associated(node, target=specificlist%head)) specificlist%head=>newnode
2877  else
2878  ! Ran out of list nodes so add this one onto the end
2879  newnode%prev=>specificlist%tail
2880  if (associated(specificlist%tail)) then
2881  specificlist%tail%next => newnode
2882  end if
2883  specificlist%tail => newnode
2884 
2885  if (associated(specificlist%head) .eqv. .false.) then
2886  specificlist%head=>newnode
2887  end if
2888  end if
2889  else
2890  ! No current list data so set up the list with this node
2891  specificlist%head => newnode
2892  specificlist%tail => newnode
2893  end if
2894  specificlist%size=specificlist%size+1
Here is the caller graph for this function:

◆ list_insert_int()

subroutine collections_mod::list_insert_int ( type(list_type), intent(inout)  specificlist,
integer, intent(in)  int_data,
integer, intent(in)  i 
)
private

Inserts an element into the list or places at the end if the index > list size.

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

Parameters
specificlistThe specific list involved
dataInteger data to insert
iThe list index to insert to

Definition at line 2782 of file collections.F90.

2783  type(list_type), intent(inout) :: specificlist
2784  integer, intent(in) :: i, int_data
2785 
2786  class(*), pointer :: generic
2787 
2788  generic=>conv_to_generic(int_data, .true.)
2789  call list_insert_generic(specificlist, generic, i, .true.)
Here is the call graph for this function:

◆ list_insert_logical()

subroutine collections_mod::list_insert_logical ( type(list_type), intent(inout)  specificlist,
logical, intent(in)  logical_data,
integer, intent(in)  i 
)
private

Inserts an element into the list or places at the end if the index > list size.

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

Parameters
specificlistThe specific list involved
dataLogical data to insert
iThe list index to insert to

Definition at line 2832 of file collections.F90.

2833  type(list_type), intent(inout) :: specificlist
2834  integer, intent(in) :: i
2835  logical, intent(in) :: logical_data
2836 
2837  class(*), pointer :: generic
2838 
2839  generic=>conv_to_generic(logical_data, .true.)
2840  call list_insert_generic(specificlist, generic, i, .true.)
Here is the call graph for this function:

◆ list_insert_real()

subroutine collections_mod::list_insert_real ( type(list_type), intent(inout)  specificlist,
real(kind=default_precision), intent(in)  real_data,
integer, intent(in)  i 
)
private

Inserts an element into the list or places at the end if the index > list size.

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

Parameters
specificlistThe specific list involved
dataDouble precision real data to insert
iThe list index to insert to

Definition at line 2815 of file collections.F90.

2816  type(list_type), intent(inout) :: specificlist
2817  integer, intent(in) :: i
2818  real(kind=default_precision), intent(in) :: real_data
2819 
2820  class(*), pointer :: generic
2821 
2822  generic=>conv_to_generic(real_data, .true.)
2823  call list_insert_generic(specificlist, generic, i, .true.)
Here is the call graph for this function:

◆ list_insert_string()

subroutine collections_mod::list_insert_string ( type(list_type), intent(inout)  specificlist,
character(len=string_length), intent(in)  str_data,
integer, intent(in)  i 
)
private

Inserts an element into the list or places at the end if the index > list size.

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

Parameters
specificlistThe specific list involved
dataString data to insert
iThe list index to insert to

Definition at line 2798 of file collections.F90.

2799  type(list_type), intent(inout) :: specificlist
2800  integer, intent(in) :: i
2801  character(len=STRING_LENGTH), intent(in) :: str_data
2802 
2803  class(*), pointer :: generic
2804 
2805  generic=>conv_to_generic(str_data, .true.)
2806  call list_insert_generic(specificlist, generic, i, .true.)
Here is the call graph for this function:

◆ list_is_empty()

logical function collections_mod::list_is_empty ( type(list_type), intent(in)  specificlist)
private

Determines whether or not the list is empty.

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

Parameters
specificlistThe specific list involved
Returns
Whether the list is empty or not

Definition at line 3026 of file collections.F90.

3027  type(list_type), intent(in) :: specificlist
3028 
3029  list_is_empty = specificlist%size == 0
Here is the caller graph for this function:

◆ list_remove()

subroutine collections_mod::list_remove ( type(list_type), intent(inout)  specificlist,
integer, intent(in)  i 
)
private

Removes an element from the list at a specific index.

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

Parameters
specificlistThe specific list involved
iIndex to remove from

Definition at line 2992 of file collections.F90.

2993  type(list_type), intent(inout) :: specificlist
2994  integer, intent(in) :: i
2995 
2996  integer ::j
2997  type(listnode_type), pointer :: node
2998 
2999  j=1
3000  if (i .le. specificlist%size) then
3001  node => specificlist%head
3002  do while(j .lt. i)
3003  if (.not. associated(node)) exit
3004  node => node%next
3005  j=j+1
3006  end do
3007  if (associated(node)) then
3008  if (associated(node%prev)) node%prev%next => node%next
3009  if (associated(node%next)) node%next%prev => node%prev
3010  if (associated(node, target=specificlist%head)) specificlist%head => node%next
3011  if (associated(node, target=specificlist%tail)) specificlist%tail => node%prev
3012  if (node%memory_allocation_automatic) then
3013  if (associated(node%data)) deallocate(node%data)
3014  end if
3015  deallocate(node)
3016  specificlist%size = specificlist%size - 1
3017  end if
3018  end if
Here is the caller graph for this function:

◆ list_size()

integer function collections_mod::list_size ( type(list_type), intent(in)  specificlist)
private

Returns the number of elements in a list.

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

Parameters
specificlistThe specific list involved
Returns
Number of list elements

Definition at line 3175 of file collections.F90.

3176  type(list_type), intent(in) :: specificlist
3177 
3178  list_size = specificlist%size
Here is the caller graph for this function:

◆ map_contains_key()

logical function collections_mod::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
specificmapThe specific map involved
keyThe key we are looking up
Returns
Whether the map contains the key

Definition at line 761 of file collections.F90.

762  type(map_type), intent(inout) :: specificmap
763  character(len=*), intent(in) :: key
764 
765  integer :: key_location
766  class(*), pointer :: raw_map_node
767 
768  raw_map_node => map_getnode(specificmap, key, key_location)
769  map_contains_key = key_location .gt. 0
Here is the call graph for this function:

◆ map_free()

subroutine collections_mod::map_free ( type(map_type), intent(inout)  specificmap)
private

Frees up all the allocatable, heap, memory associated with a specific map.

This basically acts like a clear operation and once freed the data structure can be reused Note that it does not free the value at all as this might be referenced else where in the code Do not call directly from external module, this is called via the appropriate interface

Parameters
specificmapThe map to delete all members and free all allocated memory of

Definition at line 1221 of file collections.F90.

1222  type(map_type), intent(inout) :: specificmap
1223 
1224  type(listnode_type), pointer :: node, previousnode
1225 
1226  node=>specificmap%map_ds%head
1227  previousnode=>null()
1228 
1229  if (associated(node)) then
1230  do while(1==1)
1231  previousnode=>node
1232  node=>node%next
1233  if (associated(previousnode%data)) then
1234  select type (n=>previousnode%data)
1235  type is (mapnode_type)
1236  if (n%memory_allocation_automatic) then
1237  if (associated(n%value)) deallocate(n%value)
1238  end if
1239  end select
1240  deallocate(previousnode%data) ! Free the mapnode data structure
1241  end if
1242  deallocate(previousnode)
1243  if (.not. associated(node)) exit
1244  end do
1245  end if
1246 
1247  specificmap%map_ds%tail=>null()
1248  specificmap%map_ds%head=>null()
1249  specificmap%map_ds%size=0

◆ map_generic_at()

class(*) function, pointer collections_mod::map_generic_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

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

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
Pointer to the generic value

Definition at line 884 of file collections.F90.

885  type(map_type), intent(inout) :: specificmap
886  integer, intent(in) :: i
887 
888  class(*), pointer :: raw_map_node, map_generic_at
889  integer :: the_map_size
890 
891  the_map_size = map_size(specificmap)
892  if (i .le. the_map_size) then
893  raw_map_node=>list_get_generic(specificmap%map_ds, i)
894  if (associated(raw_map_node)) then
895  select type(raw_map_node)
896  type is (mapnode_type)
897  map_generic_at => raw_map_node%value
898  end select
899  return
900  end if
901  end if
902  map_generic_at=>null()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_generic_entry_at()

logical function collections_mod::map_generic_entry_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
class(*), intent(out), pointer  val 
)
private

Retrieves the entry at a specific map index or null if index > map elements.

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

Parameters
specificmapThe specific map involved
iIndex to get value from
keyThe associated key
valueGeneric pointer to corresponding value

Definition at line 999 of file collections.F90.

1000  type(map_type), intent(inout) :: specificmap
1001  integer, intent(in) :: i
1002  character(len=*), intent(out) :: key
1003  class(*), pointer, intent(out) :: val
1004 
1005  class(*), pointer :: raw_map_node
1006  integer :: the_map_size
1007 
1008  the_map_size = map_size(specificmap)
1009  if (i .le. the_map_size) then
1010  raw_map_node=>list_get_generic(specificmap%map_ds, i)
1011  if (associated(raw_map_node)) then
1012  select type(raw_map_node)
1013  type is (mapnode_type)
1014  val=>raw_map_node%value
1015  key=raw_map_node%key
1016  end select
1017  map_generic_entry_at=.true.
1018  return
1019  end if
1020  end if
1021  val=>null()
1022  map_generic_entry_at=.false.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_get_generic()

class(*) function, pointer collections_mod::map_get_generic ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the map with the corresponding key.

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

Parameters
specificmapThe specific map involved
keyLook up key
Returns
Pointer to the generic value associated with the key or null if none exists

Definition at line 1136 of file collections.F90.

1137  type(map_type), intent(inout) :: specificmap
1138  character(len=*), intent(in) :: key
1139  class(*), pointer :: map_get_generic, raw_map_node
1140 
1141  raw_map_node=>map_getnode(specificmap, key)
1142  if (associated(raw_map_node)) then
1143  select type (raw_map_node)
1144  type is (mapnode_type)
1145  map_get_generic => raw_map_node%value
1146  end select
1147  return
1148  end if
1149  map_get_generic => null()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_get_int()

integer function collections_mod::map_get_int ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the map with the corresponding key.

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

Parameters
specificmapThe specific map involved
keyLook up key
Returns
Integer value associated with the key or raises an error if none is found

Definition at line 1057 of file collections.F90.

1058  type(map_type), intent(inout) :: specificmap
1059  character(len=*), intent(in) :: key
1060  integer :: map_get_int
1061 
1062  class(*), pointer :: generic
1063 
1064  generic=>map_get_generic(specificmap, key)
1065  if (.not. associated(generic)) call log_log(log_error, "Can not find integer entry with key '"//trim(key)//"'")
1066  map_get_int=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ map_get_iterator()

type(iterator_type) function collections_mod::map_get_iterator ( type(map_type), intent(inout)  specificmap)
private

Retrieves an iterator representation of the map, ready to access the first element.

Parameters
specificmapSpecific collection to base this iterator on
Returns
The iterator ready to access the first element

Definition at line 627 of file collections.F90.

628  type(map_type), intent(inout) :: specificmap
629 
630  map_get_iterator%next_item=>specificmap%map_ds%head
631  map_get_iterator%hash_structure=>null()
632  map_get_iterator%hash_ptr=0

◆ map_get_logical()

logical function collections_mod::map_get_logical ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the map with the corresponding key.

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

Parameters
specificmapThe specific map involved
keyLook up key
Returns
Logical value associated with the key or raises an error if none is found

Definition at line 1118 of file collections.F90.

1119  type(map_type), intent(inout) :: specificmap
1120  character(len=*), intent(in) :: key
1121  logical :: map_get_logical
1122 
1123  class(*), pointer :: generic
1124 
1125  generic=>map_get_generic(specificmap, key)
1126  if (.not. associated(generic)) call log_log(log_error, "Can not find logical entry with key '"//trim(key)//"'")
1127  map_get_logical=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ map_get_real()

real(kind=default_precision) function collections_mod::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
specificmapThe specific map involved
keyLook 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
1096  real(kind=default_precision) :: map_get_real
1097 
1098  class(*), pointer :: generic
1099 
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)
1103  type is (real(kind=default_precision))
1104  map_get_real=vr
1105  type is (real)
1106  map_get_real=conv_single_real_to_double(vr)
1107  type is (integer)
1108  map_get_real=conv_single_real_to_double(conv_to_real(vr))
1109  end select
Here is the call graph for this function:

◆ map_get_string()

character(len=string_length) function collections_mod::map_get_string ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Gets a specific element out of the map with the corresponding key.

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

Parameters
specificmapThe specific map involved
keyLook up key
Returns
String value associated with the key or raises an error if none is found

Definition at line 1075 of file collections.F90.

1076  type(map_type), intent(inout) :: specificmap
1077  character(len=*), intent(in) :: key
1078  character(len=STRING_LENGTH) :: map_get_string
1079 
1080  class(*), pointer :: generic
1081 
1082  generic=>map_get_generic(specificmap, key)
1083  if (.not. associated(generic)) call log_log(log_error, "Can not find string entry with key '"//trim(key)//"'")
1084  map_get_string=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ map_getnode()

class(*) function, pointer collections_mod::map_getnode ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
integer, intent(out), optional  foundindex 
)
private

This gets the map node that the key represents (rather than the specific value)

It allows us to twiddle with map properties but also grab the value out too Optionally provides us with the list index that the specific node was found at

Parameters
specificmapThe specific map involved
keyLookup key
foundindex(Optional) index where the node is currently held
Returns
The pointer to the generic map node data structure

Definition at line 1160 of file collections.F90.

1161  type(map_type), intent(inout) :: specificmap
1162  integer, intent(out), optional :: foundindex
1163  character(len=*), intent(in) :: key
1164  class(*), pointer :: raw_data, map_getnode
1165 
1166  integer :: i
1167  type(listnode_type), pointer :: node
1168 
1169  i=1
1170  node=>specificmap%map_ds%head
1171  if (associated(node)) then
1172  do while(1==1)
1173  raw_data=>node%data
1174  if (associated(raw_data)) then
1175  select type (raw_data)
1176  type is (mapnode_type)
1177  if (raw_data%key .eq. key) then
1178  map_getnode=>raw_data
1179  if (present(foundindex)) foundindex=i
1180  return
1181  end if
1182  end select
1183  end if
1184  node=>node%next
1185  i=i+1
1186  if (.not. associated(node)) exit
1187  end do
1188  end if
1189  map_getnode => null()
1190  if(present(foundindex)) foundindex = 0
Here is the caller graph for this function:

◆ map_integer_at()

integer function collections_mod::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.)
Here is the call graph for this function:

◆ map_integer_entry_at()

logical function collections_mod::map_integer_entry_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
integer, intent(out)  int_val 
)
private

Retrieves the entry at a specific map index or null if index > map elements.

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

Parameters
specificmapThe specific map involved
iIndex to get value from
keyThe associated key
valueInteger value or raises an error if none is found

Definition at line 912 of file collections.F90.

913  type(map_type), intent(inout) :: specificmap
914  integer, intent(in) :: i
915  character(len=*), intent(out) :: key
916  integer, intent(out) :: int_val
917 
918  class(*), pointer :: generic
919 
920  map_integer_entry_at=map_generic_entry_at(specificmap, i, key, generic)
921  if (.not. associated(generic)) call log_log(log_error, "Can not find integer entry with key '"//trim(key)//"'")
922  int_val=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ map_is_empty()

logical function collections_mod::map_is_empty ( type(map_type), intent(inout)  specificmap)
private

Returns whether a map is empty.

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

Parameters
specificmapThe specific map involved
Returns
Whether the map is empty

Definition at line 1209 of file collections.F90.

1210  type(map_type), intent(inout) :: specificmap
1211 
1212  map_is_empty = list_is_empty(specificmap%map_ds)
Here is the call graph for this function:

◆ map_key_at()

character(len=string_length) function collections_mod::map_key_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

Retrieves the key currently being held at a specific index in the map or "" if the index > map elements.

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

Parameters
specificmapThe specific map involved
iThe index to retrieve the key from
Returns
The key string

Definition at line 778 of file collections.F90.

779  type(map_type), intent(inout) :: specificmap
780  integer, intent(in) :: i
781 
782  class(*), pointer :: raw_map_node
783  integer :: the_map_size
784 
785  the_map_size = map_size(specificmap)
786  if (i .le. the_map_size) then
787  raw_map_node=>list_get_generic(specificmap%map_ds, i)
788  if (associated(raw_map_node)) then
789  select type(raw_map_node)
790  type is(mapnode_type)
791  map_key_at = raw_map_node%key
792  end select
793  return
794  end if
795  end if
796  map_key_at=""
Here is the call graph for this function:

◆ map_logical_at()

logical function collections_mod::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 866 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.)
Here is the call graph for this function:

◆ map_logical_entry_at()

logical function collections_mod::map_logical_entry_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
logical, intent(out)  logical_val 
)
private

Retrieves the entry at a specific map index or null if index > map elements.

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

Parameters
specificmapThe specific map involved
iIndex to get value from
keyThe associated key
valueLogical value or raises an error if none is found

Definition at line 979 of file collections.F90.

980  type(map_type), intent(inout) :: specificmap
981  integer, intent(in) :: i
982  character(len=*), intent(out) :: key
983  logical, intent(out) :: logical_val
984 
985  class(*), pointer :: generic
986 
987  map_logical_entry_at=map_generic_entry_at(specificmap, i, key, generic)
988  if (.not. associated(generic)) call log_log(log_error, "Can not find logical entry with key '"//trim(key)//"'")
989  logical_val=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ map_put_generic()

subroutine collections_mod::map_put_generic ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
class(*), intent(in), pointer  data,
logical, intent(in)  memory_allocation_automatic 
)
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
dataPointer to the generic data value to place in the map
memory_allocation_automaticWhether the collections API should manage the freeing of memory

Definition at line 725 of file collections.F90.

726  type(map_type), intent(inout) :: specificmap
727  class(*), pointer, intent(in) :: data
728  character(len=*), intent(in) :: key
729  logical, intent(in) :: memory_allocation_automatic
730 
731  class(*), pointer :: raw_map_node, generic_map_node
732  type(mapnode_type), pointer :: newmapnode
733 
734  ! Test to see if key already exists in the map
735  raw_map_node=>map_getnode(specificmap, key)
736 
737  if (associated(raw_map_node)) then
738  select type(raw_map_node)
739  type is (mapnode_type)
740  raw_map_node%value => data
741  end select
742  else
743  allocate(newmapnode)
744  newmapnode%value => data
745  newmapnode%key = key
746  newmapnode%memory_allocation_automatic=memory_allocation_automatic
747  ! Clone and deallocate the newmapnode - this keeps GNU happy with passing the correct pointer and Cray
748  ! doesn't link the generic pointer just pointing to the data structure hence we clone it
749  allocate(generic_map_node, source=newmapnode)
750  deallocate(newmapnode)
751  call list_add_generic(specificmap%map_ds, generic_map_node, .false.)
752  end if
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_put_int()

subroutine collections_mod::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.)
Here is the call graph for this function:

◆ map_put_logical()

subroutine collections_mod::map_put_logical ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
logical, intent(in)  logical_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
dataLogical value to place in the map

Definition at line 704 of file collections.F90.

705  type(map_type), intent(inout) :: specificmap
706  logical, intent(in) :: logical_data
707  character(len=*), intent(in) :: key
708 
709  class(*), pointer :: generic
710 
711  generic=>conv_to_generic(logical_data, .true.)
712  call map_put_generic(specificmap, key, generic, .true.)
Here is the call graph for this function:

◆ map_put_real()

subroutine collections_mod::map_put_real ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
real(kind=default_precision), intent(in)  real_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
dataDouble precision real value to place in the map

Definition at line 684 of file collections.F90.

685  type(map_type), intent(inout) :: specificmap
686  real(kind=default_precision), intent(in) :: real_data
687  character(len=*), intent(in) :: key
688 
689  class(*), pointer :: generic
690 
691  generic=>conv_to_generic(real_data, .true.)
692  call map_put_generic(specificmap, key, generic, .true.)
Here is the call graph for this function:

◆ map_put_string()

subroutine collections_mod::map_put_string ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key,
character(len=string_length), intent(in)  str_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
dataString value to place in the map

Definition at line 664 of file collections.F90.

665  type(map_type), intent(inout) :: specificmap
666  character(len=STRING_LENGTH), intent(in) :: str_data
667  character(len=*), intent(in) :: key
668 
669  class(*), pointer :: generic
670 
671  generic=>conv_to_generic(str_data, .true.)
672  call map_put_generic(specificmap, key, generic, .true.)
Here is the call graph for this function:

◆ map_real_at()

real(kind=default_precision) function collections_mod::map_real_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

Retrieves the real value held at the specific map index. Converts between precision and int.

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
Double precision real value or raises an error if none is found

Definition at line 841 of file collections.F90.

842  type(map_type), intent(inout) :: specificmap
843  integer, intent(in) :: i
844  real(kind=default_precision) :: map_real_at
845 
846  class(*), pointer :: generic
847 
848  generic=>map_generic_at(specificmap, i)
849  if (.not. associated(generic)) call log_log(log_error, "Can not find real at "//trim(conv_to_string(i)))
850  select type(vr=>generic)
851  type is (real(kind=default_precision))
852  map_real_at=vr
853  type is (real)
854  map_real_at=conv_single_real_to_double(vr)
855  type is (integer)
856  map_real_at=conv_single_real_to_double(conv_to_real(vr))
857  end select
Here is the call graph for this function:

◆ map_real_entry_at()

logical function collections_mod::map_real_entry_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
real(kind=default_precision), intent(out)  real_val 
)
private

Retrieves the entry at a specific map index or null if index > map elements. This converts precision and from ints.

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

Parameters
specificmapThe specific map involved
iIndex to get value from
keyThe associated key
valueReal value or raises an error if none is found

Definition at line 952 of file collections.F90.

953  type(map_type), intent(inout) :: specificmap
954  integer, intent(in) :: i
955  character(len=*), intent(out) :: key
956  real(kind=default_precision), intent(out) :: real_val
957 
958  class(*), pointer :: generic
959 
960  map_real_entry_at=map_generic_entry_at(specificmap, i, key, generic)
961  if (.not. associated(generic)) call log_log(log_error, "Can not find real entry with key '"//trim(key)//"'")
962  select type(vr=>generic)
963  type is (real(kind=default_precision))
964  real_val=vr
965  type is (real)
966  real_val=conv_single_real_to_double(vr)
967  type is (integer)
968  real_val=conv_single_real_to_double(conv_to_real(vr))
969  end select
Here is the call graph for this function:

◆ map_remove()

subroutine collections_mod::map_remove ( type(map_type), intent(inout)  specificmap,
character(len=*), intent(in)  key 
)
private

Removes a specific key-value pair from the map.

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

Parameters
specificmapThe specific map involved
keyKey of the key-value pair to remove from the map

Definition at line 1030 of file collections.F90.

1031  type(map_type), intent(inout) :: specificmap
1032  character(len=*), intent(in) :: key
1033 
1034  integer :: key_location
1035  class(*), pointer :: raw_map_node
1036 
1037  raw_map_node=>map_getnode(specificmap, key, key_location)
1038 
1039  if (key_location .gt. 0) then
1040  select type (raw_map_node)
1041  type is (mapnode_type)
1042  if (raw_map_node%memory_allocation_automatic) then
1043  if (associated(raw_map_node%value)) deallocate(raw_map_node%value)
1044  end if
1045  deallocate(raw_map_node)
1046  end select
1047  call list_remove(specificmap%map_ds, key_location)
1048  end if
Here is the call graph for this function:

◆ map_size()

integer function collections_mod::map_size ( type(map_type), intent(inout)  specificmap)
private

Returns the number of elements in the map.

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

Parameters
specificmapThe specific map involved
Returns
Number of key-value pairs held in the map

Definition at line 1198 of file collections.F90.

1199  type(map_type), intent(inout) :: specificmap
1200 
1201  map_size = list_size(specificmap%map_ds)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ map_string_at()

character(len=string_length) function collections_mod::map_string_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i 
)
private

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

Definition at line 823 of file collections.F90.

824  type(map_type), intent(inout) :: specificmap
825  integer, intent(in) :: i
826  character(len=STRING_LENGTH) :: map_string_at
827 
828  class(*), pointer :: generic
829 
830  generic=>map_generic_at(specificmap, i)
831  if (.not. associated(generic)) call log_log(log_error, "Can not find string at "//trim(conv_to_string(i)))
832  map_string_at=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ map_string_entry_at()

logical function collections_mod::map_string_entry_at ( type(map_type), intent(inout)  specificmap,
integer, intent(in)  i,
character(len=*), intent(out)  key,
character(len=string_length), intent(out)  str_val 
)
private

Retrieves the entry at a specific map index or null if index > map elements.

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

Parameters
specificmapThe specific map involved
iIndex to get value from
keyThe associated key
valueString value or raises an error if none is found

Definition at line 932 of file collections.F90.

933  type(map_type), intent(inout) :: specificmap
934  integer, intent(in) :: i
935  character(len=*), intent(out) :: key
936  character(len=STRING_LENGTH), intent(out) :: str_val
937 
938  class(*), pointer :: generic
939 
940  map_string_entry_at=map_generic_entry_at(specificmap, i, key, generic)
941  if (.not. associated(generic)) call log_log(log_error, "Can not find string entry with key '"//trim(key)//"'")
942  str_val=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ mapentry_get_generic()

class(*) function, pointer collections_mod::mapentry_get_generic ( type(mapentry_type), intent(in)  mapentry_item)
private

Retrieves the generic value from a map entry.

Parameters
mapentry_itemThe map entry to retrieve the generic value from

Definition at line 3379 of file collections.F90.

3380  type(mapentry_type), intent(in) :: mapentry_item
3381  class(*), pointer :: mapentry_get_generic
3382 
3383  mapentry_get_generic=>mapentry_item%value

◆ mapentry_get_int()

integer function collections_mod::mapentry_get_int ( type(mapentry_type), intent(in)  mapentry_item)
private

Retrieves the integer value from a map entry.

Parameters
mapentry_itemThe map entry to retrieve the integer value from

Definition at line 3320 of file collections.F90.

3321  type(mapentry_type), intent(in) :: mapentry_item
3322  integer :: mapentry_get_int
3323 
3324  class(*), pointer :: generic
3325 
3326  generic=>mapentry_item%value
3327  if (.not. associated(generic)) call log_log(log_error, "Can not get integer from map entry")
3328  mapentry_get_int=conv_to_integer(generic, .false.)

◆ mapentry_get_logical()

logical function collections_mod::mapentry_get_logical ( type(mapentry_type), intent(in)  mapentry_item)
private

Retrieves the logical value from a map entry.

Parameters
mapentry_itemThe map entry to retrieve the logical value from

Definition at line 3366 of file collections.F90.

3367  type(mapentry_type), intent(in) :: mapentry_item
3368  logical :: mapentry_get_logical
3369 
3370  class(*), pointer :: generic
3371 
3372  generic=>mapentry_item%value
3373  if (.not. associated(generic)) call log_log(log_error, "Can not get logical from map entry")
3374  mapentry_get_logical=conv_to_logical(generic, .false.)

◆ mapentry_get_real()

real(kind=default_precision) function collections_mod::mapentry_get_real ( type(mapentry_type), intent(in)  mapentry_item)
private

Retrieves the double precision real value from a map entry.

Parameters
mapentry_itemThe 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
3348  real(kind=default_precision) :: mapentry_get_real
3349 
3350  class(*), pointer :: generic
3351 
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)
3355  type is (real(kind=default_precision))
3356  mapentry_get_real=vr
3357  type is (real)
3358  mapentry_get_real=conv_single_real_to_double(vr)
3359  type is (integer)
3360  mapentry_get_real=conv_single_real_to_double(conv_to_real(vr))
3361  end select

◆ mapentry_get_string()

character(len=string_length) function collections_mod::mapentry_get_string ( type(mapentry_type), intent(in)  mapentry_item)
private

Retrieves the string value from a map entry.

Parameters
mapentry_itemThe map entry to retrieve the string value from

Definition at line 3333 of file collections.F90.

3334  type(mapentry_type), intent(in) :: mapentry_item
3335  character(len=STRING_LENGTH) :: mapentry_get_string
3336 
3337  class(*), pointer :: generic
3338 
3339  generic=>mapentry_item%value
3340  if (.not. associated(generic)) call log_log(log_error, "Can not get string from map entry")
3341  mapentry_get_string=conv_to_string(generic, .false., string_length)

◆ queue_free()

subroutine collections_mod::queue_free ( type(queue_type), intent(inout)  specificqueue)
private

Frees up all the allocatable, heap, memory associated with a specific queue.

This basically acts like a clear operation and once freed the data structure can be reused Note that it does not free the data memory at all as this might be referenced else where in the code Do not call directly from external module, this is called via the appropriate interface

Parameters
specificqueueThe queue to delete all members and free all allocated memory of

Definition at line 2759 of file collections.F90.

2760  type(queue_type), intent(inout) :: specificqueue
2761 
2762  call list_free(specificqueue%queue_ds)
Here is the call graph for this function:

◆ queue_get_generic()

class(*) function, pointer collections_mod::queue_get_generic ( type(queue_type), intent(inout)  specificqueue,
integer, intent(in)  i 
)
private

Returns a specific queue element at an index or null if index > queue size.

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

Parameters
specificqueueThe specific queue involved
iThe index to look up
Returns
Pointer to the generic queue element at i or null if the index does not exist

Definition at line 2723 of file collections.F90.

2724  type(queue_type), intent(inout) :: specificqueue
2725  integer, intent(in) :: i
2726  class(*), pointer :: queue_get_generic
2727 
2728  queue_get_generic=>list_get_generic(specificqueue%queue_ds, i)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_get_int()

integer function collections_mod::queue_get_int ( type(queue_type), intent(inout)  specificqueue,
integer, intent(in)  i 
)
private

Returns a specific queue element at an index.

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

Parameters
specificqueueThe specific queue involved
iThe index to look up
Returns
Integer element at i or raises an error if none is found

Definition at line 2644 of file collections.F90.

2645  type(queue_type), intent(inout) :: specificqueue
2646  integer, intent(in) :: i
2647  integer :: queue_get_int
2648 
2649  class(*), pointer :: generic
2650 
2651  generic=>queue_get_generic(specificqueue, i)
2652  if (.not. associated(generic)) call log_log(log_error, "Can not get integer from queue at index "//trim(conv_to_string(i)))
2653  queue_get_int=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ queue_get_iterator()

type(iterator_type) function collections_mod::queue_get_iterator ( type(queue_type), intent(inout)  specificqueue)
private

Retrieves an iterator representation of the queue, ready to access the first element.

Parameters
specificqueueSpecific collection to base this iterator on
Returns
The iterator ready to access the first element

Definition at line 2472 of file collections.F90.

2473  type(queue_type), intent(inout) :: specificqueue
2474 
2475  queue_get_iterator%next_item=>specificqueue%queue_ds%head
2476  queue_get_iterator%hash_structure=>null()
2477  queue_get_iterator%hash_ptr=0

◆ queue_get_logical()

logical function collections_mod::queue_get_logical ( type(queue_type), intent(inout)  specificqueue,
integer, intent(in)  i 
)
private

Returns a specific queue element at an index.

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

Parameters
specificqueueThe specific queue involved
iThe index to look up
Returns
Logical element at i or raises an error if none is found

Definition at line 2705 of file collections.F90.

2706  type(queue_type), intent(inout) :: specificqueue
2707  integer, intent(in) :: i
2708  logical :: queue_get_logical
2709 
2710  class(*), pointer :: generic
2711 
2712  generic=>queue_get_generic(specificqueue, i)
2713  if (.not. associated(generic)) call log_log(log_error, "Can not get logical from queue at index "//trim(conv_to_string(i)))
2714  queue_get_logical=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ queue_get_real()

real(kind=default_precision) function collections_mod::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
specificqueueThe specific queue involved
iThe 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
2683  real(kind=default_precision) :: queue_get_real
2684 
2685  class(*), pointer :: generic
2686 
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)
2690  type is (real(kind=default_precision))
2691  queue_get_real=vr
2692  type is (real)
2693  queue_get_real=conv_single_real_to_double(vr)
2694  type is (integer)
2695  queue_get_real=conv_single_real_to_double(conv_to_real(vr))
2696  end select
Here is the call graph for this function:

◆ queue_get_string()

character(len=string_length) function collections_mod::queue_get_string ( type(queue_type), intent(inout)  specificqueue,
integer, intent(in)  i 
)
private

Returns a specific queue element at an index.

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

Parameters
specificqueueThe specific queue involved
iThe index to look up
Returns
String element at i or raises an error if none is found

Definition at line 2662 of file collections.F90.

2663  type(queue_type), intent(inout) :: specificqueue
2664  integer, intent(in) :: i
2665  character(len=STRING_LENGTH) :: queue_get_string
2666 
2667  class(*), pointer :: generic
2668 
2669  generic=>queue_get_generic(specificqueue, i)
2670  if (.not. associated(generic)) call log_log(log_error, "Can not get string from queue at index "//trim(conv_to_string(i)))
2671  queue_get_string=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ queue_is_empty()

logical function collections_mod::queue_is_empty ( type(queue_type), intent(inout)  specificqueue)
private

Returns whether a queue is empty.

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

Parameters
specificqueueThe specific queue involved
Returns
Whether the queue is empty

Definition at line 2747 of file collections.F90.

2748  type(queue_type), intent(inout) :: specificqueue
2749 
2750  queue_is_empty = list_is_empty(specificqueue%queue_ds)
Here is the call graph for this function:

◆ queue_pop_generic()

class(*) function, pointer collections_mod::queue_pop_generic ( type(queue_type), intent(inout)  specificqueue)
private

Pops the queue element off the head of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
Returns
Pointer to the generic element at head of the queue or null if none

Definition at line 2630 of file collections.F90.

2631  type(queue_type), intent(inout) :: specificqueue
2632  class(*), pointer :: queue_pop_generic
2633 
2634  queue_pop_generic=>queue_get_generic(specificqueue, 1)
2635  call list_remove(specificqueue%queue_ds, 1)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_pop_int()

integer function collections_mod::queue_pop_int ( type(queue_type), intent(inout)  specificqueue)
private

Pops the queue element off the head of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
Returns
Integer element at head of the queue or raises an error if there is none

Definition at line 2559 of file collections.F90.

2560  type(queue_type), intent(inout) :: specificqueue
2561  integer :: queue_pop_int
2562 
2563  class(*), pointer :: generic
2564 
2565  generic=>queue_pop_generic(specificqueue)
2566  if (.not. associated(generic)) call log_log(log_error, "Can not pop integer from queue")
2567  queue_pop_int=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ queue_pop_logical()

logical function collections_mod::queue_pop_logical ( type(queue_type), intent(inout)  specificqueue)
private

Pops the queue element off the head of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
Returns
Logical element at head of the queue or raises an error if there is none

Definition at line 2614 of file collections.F90.

2615  type(queue_type), intent(inout) :: specificqueue
2616  logical :: queue_pop_logical
2617 
2618  class(*), pointer :: generic
2619 
2620  generic=>queue_pop_generic(specificqueue)
2621  if (.not. associated(generic)) call log_log(log_error, "Can not pop logical from queue")
2622  queue_pop_logical=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ queue_pop_real()

real(kind=default_precision) function collections_mod::queue_pop_real ( type(queue_type), intent(inout)  specificqueue)
private

Pops the queue element off the head of the queue (FIFO). Converts between precision and from int.

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

Parameters
specificqueueThe specific queue involved
Returns
Double precision real element at head of the queue or raises an error if there is none

Definition at line 2591 of file collections.F90.

2592  type(queue_type), intent(inout) :: specificqueue
2593  real(kind=default_precision) :: queue_pop_real
2594 
2595  class(*), pointer :: generic
2596 
2597  generic=>queue_pop_generic(specificqueue)
2598  if (.not. associated(generic)) call log_log(log_error, "Can not pop real from queue")
2599  select type(vr=>generic)
2600  type is (real(kind=default_precision))
2601  queue_pop_real=vr
2602  type is (real)
2603  queue_pop_real=conv_single_real_to_double(vr)
2604  type is (integer)
2605  queue_pop_real=conv_single_real_to_double(conv_to_real(vr))
2606  end select
Here is the call graph for this function:

◆ queue_pop_string()

character(len=string_length) function collections_mod::queue_pop_string ( type(queue_type), intent(inout)  specificqueue)
private

Pops the queue element off the head of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
Returns
String element at head of the queue or raises an error if there is none

Definition at line 2575 of file collections.F90.

2576  type(queue_type), intent(inout) :: specificqueue
2577  character(len=STRING_LENGTH) :: queue_pop_string
2578 
2579  class(*), pointer :: generic
2580 
2581  generic=>queue_pop_generic(specificqueue)
2582  if (.not. associated(generic)) call log_log(log_error, "Can not pop string from queue")
2583  queue_pop_string=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ queue_push_generic()

subroutine collections_mod::queue_push_generic ( type(queue_type), intent(inout)  specificqueue,
class(*), intent(in), pointer  data,
logical, intent(in)  memory_allocation_automatic 
)
private

Adds an element to the end of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
dataPointer to the generic data to add to the queue
memory_allocation_automaticWhether the collections API should manage the freeing of memory

Definition at line 2546 of file collections.F90.

2547  type(queue_type), intent(inout) :: specificqueue
2548  class(*), pointer, intent(in) :: data
2549  logical, intent(in) :: memory_allocation_automatic
2550 
2551  call list_add_generic(specificqueue%queue_ds, data, memory_allocation_automatic)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ queue_push_int()

subroutine collections_mod::queue_push_int ( type(queue_type), intent(inout)  specificqueue,
integer, intent(in)  int_data 
)
private

Adds an element to the end of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
dataInteger data to add to the queue

Definition at line 2485 of file collections.F90.

2486  type(queue_type), intent(inout) :: specificqueue
2487  integer, intent(in) :: int_data
2488 
2489  class(*), pointer :: generic
2490 
2491  generic=>conv_to_generic(int_data, .true.)
2492  call queue_push_generic(specificqueue, generic, .true.)
Here is the call graph for this function:

◆ queue_push_logical()

subroutine collections_mod::queue_push_logical ( type(queue_type), intent(inout)  specificqueue,
logical, intent(in)  logical_data 
)
private

Adds an element to the end of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
dataLogical data to add to the queue

Definition at line 2530 of file collections.F90.

2531  type(queue_type), intent(inout) :: specificqueue
2532  logical, intent(in) :: logical_data
2533 
2534  class(*), pointer :: generic
2535 
2536  generic=>conv_to_generic(logical_data, .true.)
2537  call queue_push_generic(specificqueue, generic, .true.)
Here is the call graph for this function:

◆ queue_push_real()

subroutine collections_mod::queue_push_real ( type(queue_type), intent(inout)  specificqueue,
real(kind=default_precision), intent(in)  real_data 
)
private

Adds an element to the end of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
dataDouble precision real data to add to the queue

Definition at line 2515 of file collections.F90.

2516  type(queue_type), intent(inout) :: specificqueue
2517  real(kind=default_precision), intent(in) :: real_data
2518 
2519  class(*), pointer :: generic
2520 
2521  generic=>conv_to_generic(real_data, .true.)
2522  call queue_push_generic(specificqueue, generic, .true.)
Here is the call graph for this function:

◆ queue_push_string()

subroutine collections_mod::queue_push_string ( type(queue_type), intent(inout)  specificqueue,
character(len=string_length), intent(in)  str_data 
)
private

Adds an element to the end of the queue (FIFO)

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

Parameters
specificqueueThe specific queue involved
dataString data to add to the queue

Definition at line 2500 of file collections.F90.

2501  type(queue_type), intent(inout) :: specificqueue
2502  character(len=STRING_LENGTH), intent(in) :: str_data
2503 
2504  class(*), pointer :: generic
2505 
2506  generic=>conv_to_generic(str_data, .true.)
2507  call queue_push_generic(specificqueue, generic, .true.)
Here is the call graph for this function:

◆ queue_size()

integer function collections_mod::queue_size ( type(queue_type), intent(inout)  specificqueue)
private

Returns the number of elements held in a queue.

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

Parameters
specificqueueThe specific queue involved
Returns
Number of elements in the queue

Definition at line 2736 of file collections.F90.

2737  type(queue_type), intent(inout) :: specificqueue
2738 
2739  queue_size = list_size(specificqueue%queue_ds)
Here is the call graph for this function:

◆ stack_free()

subroutine collections_mod::stack_free ( type(stack_type), intent(inout)  specificstack)
private

Frees up all the allocatable, heap, memory associated with a specific stack.

This basically acts like a clear operation and once freed the data structure can be reused Note that it does not free the data memory at all as this might be referenced else where in the code Do not call directly from external module, this is called via the appropriate interface

Parameters
specificstackThe stack to delete all members and free all allocated memory of

Definition at line 2463 of file collections.F90.

2464  type(stack_type), intent(inout) :: specificstack
2465 
2466  call list_free(specificstack%stack_ds)
Here is the call graph for this function:

◆ stack_get_generic()

class(*) function, pointer collections_mod::stack_get_generic ( type(stack_type), intent(inout)  specificstack,
integer, intent(in)  i 
)
private

Gets a specific element from the stack at index specified or null if the index > stack size.

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

Parameters
specificstackThe specific stack involved
iThe index to retrieve the element at
Returns
Pointer to the generic data

Definition at line 2427 of file collections.F90.

2428  type(stack_type), intent(inout) :: specificstack
2429  integer, intent(in) :: i
2430  class(*), pointer :: stack_get_generic
2431 
2432  stack_get_generic=>list_get_generic(specificstack%stack_ds, i)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_get_int()

integer function collections_mod::stack_get_int ( type(stack_type), intent(inout)  specificstack,
integer, intent(in)  i 
)
private

Gets a specific element from the stack at index specified.

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

Parameters
specificstackThe specific stack involved
iThe index to retrieve the element at
Returns
Integer data or raises an error if none is found

Definition at line 2348 of file collections.F90.

2349  type(stack_type), intent(inout) :: specificstack
2350  integer, intent(in) :: i
2351  integer :: stack_get_int
2352 
2353  class(*), pointer :: generic
2354 
2355  generic=>stack_get_generic(specificstack, i)
2356  if (.not. associated(generic)) call log_log(log_error, "Can not get integer from stack at index "//trim(conv_to_string(i)))
2357  stack_get_int=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ stack_get_iterator()

type(iterator_type) function collections_mod::stack_get_iterator ( type(stack_type), intent(inout)  specificstack)
private

Retrieves an iterator representation of the stack, ready to access the first element.

Parameters
specificstackSpecific collection to base this iterator on
Returns
The iterator ready to access the first element

Definition at line 2176 of file collections.F90.

2177  type(stack_type), intent(inout) :: specificstack
2178 
2179  stack_get_iterator%next_item=>specificstack%stack_ds%head
2180  stack_get_iterator%hash_structure=>null()
2181  stack_get_iterator%hash_ptr=0

◆ stack_get_logical()

logical function collections_mod::stack_get_logical ( type(stack_type), intent(inout)  specificstack,
integer, intent(in)  i 
)
private

Gets a specific element from the stack at index specified.

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

Parameters
specificstackThe specific stack involved
iThe index to retrieve the element at
Returns
Logical data or raises an error if none is found

Definition at line 2409 of file collections.F90.

2410  type(stack_type), intent(inout) :: specificstack
2411  integer, intent(in) :: i
2412  logical :: stack_get_logical
2413 
2414  class(*), pointer :: generic
2415 
2416  generic=>stack_get_generic(specificstack, i)
2417  if (.not. associated(generic)) call log_log(log_error, "Can not get logical from stack at index "//trim(conv_to_string(i)))
2418  stack_get_logical=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ stack_get_real()

real(kind=default_precision) function collections_mod::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
specificstackThe specific stack involved
iThe 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
2387  real(kind=default_precision) :: stack_get_real
2388 
2389  class(*), pointer :: generic
2390 
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)
2394  type is (real(kind=default_precision))
2395  stack_get_real=vr
2396  type is (real)
2397  stack_get_real=conv_single_real_to_double(vr)
2398  type is (integer)
2399  stack_get_real=conv_single_real_to_double(conv_to_real(vr))
2400  end select
Here is the call graph for this function:

◆ stack_get_string()

character(len=string_length) function collections_mod::stack_get_string ( type(stack_type), intent(inout)  specificstack,
integer, intent(in)  i 
)
private

Gets a specific element from the stack at index specified.

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

Parameters
specificstackThe specific stack involved
iThe index to retrieve the element at
Returns
String data or raises an error if none is found

Definition at line 2366 of file collections.F90.

2367  type(stack_type), intent(inout) :: specificstack
2368  integer, intent(in) :: i
2369  character(len=STRING_LENGTH) :: stack_get_string
2370 
2371  class(*), pointer :: generic
2372 
2373  generic=>stack_get_generic(specificstack, i)
2374  if (.not. associated(generic)) call log_log(log_error, "Can not get string from stack at index "//trim(conv_to_string(i)))
2375  stack_get_string=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ stack_is_empty()

logical function collections_mod::stack_is_empty ( type(stack_type), intent(inout)  specificstack)
private

Returns whether a stack is empty.

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

Parameters
specificstackThe specific stack involved
Returns
Whether the stack is empty

Definition at line 2451 of file collections.F90.

2452  type(stack_type), intent(inout) :: specificstack
2453 
2454  stack_is_empty = list_is_empty(specificstack%stack_ds)
Here is the call graph for this function:

◆ stack_pop_generic()

class(*) function, pointer collections_mod::stack_pop_generic ( type(stack_type), intent(inout)  specificstack)
private

Pops an element off the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
Returns
Pointer to the generic data of the last element added to the stack

Definition at line 2334 of file collections.F90.

2335  type(stack_type), intent(inout) :: specificstack
2336  class(*), pointer :: stack_pop_generic
2337 
2338  stack_pop_generic=>stack_get_generic(specificstack, 1)
2339  call list_remove(specificstack%stack_ds, 1)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_pop_int()

integer function collections_mod::stack_pop_int ( type(stack_type), intent(inout)  specificstack)
private

Pops an element off the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
Returns
Integer data of the last element added to the stack or raises an error if none is found

Definition at line 2263 of file collections.F90.

2264  type(stack_type), intent(inout) :: specificstack
2265  integer :: stack_pop_int
2266 
2267  class(*), pointer :: generic
2268 
2269  generic=>stack_pop_generic(specificstack)
2270  if (.not. associated(generic)) call log_log(log_error, "Can not pop integer from stack")
2271  stack_pop_int=conv_to_integer(generic, .false.)
Here is the call graph for this function:

◆ stack_pop_logical()

logical function collections_mod::stack_pop_logical ( type(stack_type), intent(inout)  specificstack)
private

Pops an element off the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
Returns
Logical data of the last element added to the stack or raises an error if none is found

Definition at line 2318 of file collections.F90.

2319  type(stack_type), intent(inout) :: specificstack
2320  logical :: stack_pop_logical
2321 
2322  class(*), pointer :: generic
2323 
2324  generic=>stack_pop_generic(specificstack)
2325  if (.not. associated(generic)) call log_log(log_error, "Can not pop logical from stack")
2326  stack_pop_logical=conv_to_logical(generic, .false.)
Here is the call graph for this function:

◆ stack_pop_real()

real(kind=default_precision) function collections_mod::stack_pop_real ( type(stack_type), intent(inout)  specificstack)
private

Pops an element off the stack (LIFO). Converts between precision and from int.

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

Parameters
specificstackThe specific stack involved
Returns
Double precision real data of the last element added to the stack or raises an error if none is found

Definition at line 2295 of file collections.F90.

2296  type(stack_type), intent(inout) :: specificstack
2297  real(kind=default_precision) :: stack_pop_real
2298 
2299  class(*), pointer :: generic
2300 
2301  generic=>stack_pop_generic(specificstack)
2302  if (.not. associated(generic)) call log_log(log_error, "Can not pop real from stack")
2303  select type(vr=>generic)
2304  type is (real(kind=default_precision))
2305  stack_pop_real=vr
2306  type is (real)
2307  stack_pop_real=conv_single_real_to_double(vr)
2308  type is (integer)
2309  stack_pop_real=conv_single_real_to_double(conv_to_real(vr))
2310  end select
Here is the call graph for this function:

◆ stack_pop_string()

character(len=string_length) function collections_mod::stack_pop_string ( type(stack_type), intent(inout)  specificstack)
private

Pops an element off the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
Returns
String data of the last element added to the stack or raises an error if none is found

Definition at line 2279 of file collections.F90.

2280  type(stack_type), intent(inout) :: specificstack
2281  character(len=STRING_LENGTH) :: stack_pop_string
2282 
2283  class(*), pointer :: generic
2284 
2285  generic=>stack_pop_generic(specificstack)
2286  if (.not. associated(generic)) call log_log(log_error, "Can not pop string from stack")
2287  stack_pop_string=conv_to_string(generic, .false., string_length)
Here is the call graph for this function:

◆ stack_push_generic()

subroutine collections_mod::stack_push_generic ( type(stack_type), intent(inout)  specificstack,
class(*), intent(in), pointer  data,
logical, intent(in)  memory_allocation_automatic 
)
private

Pushes an element onto the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
dataPointer to the generic data to push onto the stack
memory_allocation_automaticWhether the collections API should manage the freeing of memory

Definition at line 2250 of file collections.F90.

2251  type(stack_type), intent(inout) :: specificstack
2252  class(*), pointer, intent(in) :: data
2253  logical, intent(in) :: memory_allocation_automatic
2254 
2255  call list_insert_generic(specificstack%stack_ds, data, 1, memory_allocation_automatic)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_push_int()

subroutine collections_mod::stack_push_int ( type(stack_type), intent(inout)  specificstack,
integer, intent(in)  int_data 
)
private

Pushes an element onto the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
dataInteger data to push onto the stack

Definition at line 2189 of file collections.F90.

2190  type(stack_type), intent(inout) :: specificstack
2191  integer, intent(in) :: int_data
2192 
2193  class(*), pointer :: generic
2194 
2195  generic=>conv_to_generic(int_data, .true.)
2196  call stack_push_generic(specificstack, generic, .true.)
Here is the call graph for this function:

◆ stack_push_logical()

subroutine collections_mod::stack_push_logical ( type(stack_type), intent(inout)  specificstack,
logical, intent(in)  logical_data 
)
private

Pushes an element onto the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
dataLogical data to push onto the stack

Definition at line 2234 of file collections.F90.

2235  type(stack_type), intent(inout) :: specificstack
2236  logical, intent(in) :: logical_data
2237 
2238  class(*), pointer :: generic
2239 
2240  generic=>conv_to_generic(logical_data, .true.)
2241  call stack_push_generic(specificstack, generic, .true.)
Here is the call graph for this function:

◆ stack_push_real()

subroutine collections_mod::stack_push_real ( type(stack_type), intent(inout)  specificstack,
real(kind=default_precision), intent(in)  real_data 
)
private

Pushes an element onto the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
dataDouble precision real data to push onto the stack

Definition at line 2219 of file collections.F90.

2220  type(stack_type), intent(inout) :: specificstack
2221  real(kind=default_precision), intent(in) :: real_data
2222 
2223  class(*), pointer :: generic
2224 
2225  generic=>conv_to_generic(real_data, .true.)
2226  call stack_push_generic(specificstack, generic, .true.)
Here is the call graph for this function:

◆ stack_push_string()

subroutine collections_mod::stack_push_string ( type(stack_type), intent(inout)  specificstack,
character(len=string_length), intent(in)  str_data 
)
private

Pushes an element onto the stack (LIFO)

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

Parameters
specificstackThe specific stack involved
dataString data to push onto the stack

Definition at line 2204 of file collections.F90.

2205  type(stack_type), intent(inout) :: specificstack
2206  character(len=STRING_LENGTH), intent(in) :: str_data
2207 
2208  class(*), pointer :: generic
2209 
2210  generic=>conv_to_generic(str_data, .true.)
2211  call stack_push_generic(specificstack, generic, .true.)
Here is the call graph for this function:

◆ stack_size()

integer function collections_mod::stack_size ( type(stack_type), intent(inout)  specificstack)
private

Returns the number of elements held on the stack.

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

Parameters
specificstackThe specific stack involved
Returns
Number of stack elements

Definition at line 2440 of file collections.F90.

2441  type(stack_type), intent(inout) :: specificstack
2442 
2443  stack_size = list_size(specificstack%stack_ds)
Here is the call graph for this function:

Variable Documentation

◆ hash_size

integer, parameter, private collections_mod::hash_size = 4993
private

Number of entries in the hash table, this is a tradeoff - larger means more memory but smaller runtime assuming a hashing function with good distribution.

Definition at line 20 of file collections.F90.

20  integer, parameter, private :: hash_size = 4993
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
datadefn_mod::default_precision
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17