Adds a string 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 | 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...
|
|
Adds a string to the end of the list.
This has a time complexity of O(1)
- Parameters
-
collection | The specific list involved |
data | String data to add |
Definition at line 222 of file collections.F90.
◆ hashset_add()
subroutine collections_mod::c_add_string::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
-
specificset | The specific set involved |
key | The 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
1962 class(*),
pointer :: generic
1963 type(setnode_type),
pointer :: newsetnode
1964 integer :: hash, location
1966 if (.not.
associated(specificset%set_ds))
allocate(specificset%set_ds(hash_size))
1968 call hashset_getlocation(specificset, key, hash, location)
1970 if (hash .gt. 0 .and. location .eq. 0)
then
1971 allocate(newsetnode)
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
◆ list_add_string()
subroutine collections_mod::c_add_string::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
-
specificlist | The specific list involved |
data | String 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
2921 class(*),
pointer :: generic
2923 generic=>conv_to_generic(str_data, .true.)
2924 call list_add_generic(specificlist, generic, .true.)
The documentation for this interface was generated from the following file: