![]() |
Octopus
|
This module implements a simple hash table for string valued keys and integer values using the C++ STL unordered_map container. More...
This module implements a simple hash table for string valued keys and integer values using the C++ STL unordered_map container.
Data Types | |
type | sihash_iterator_t |
type | sihash_t |
Functions/Subroutines | |
subroutine, public | sihash_init (h) |
Initialize a hash table h with size entries. Since we use separate chaining, the number of entries in the hash table is, in principle, unlimited. We take the smallest prime number as table size that is greater or equal than the requested size to reduce collisions. More... | |
subroutine, public | sihash_end (h) |
Free a hash table. More... | |
subroutine, public | sihash_insert (h, key, val) |
Insert a (key, val) pair into the hash table h. More... | |
integer function, public | sihash_lookup (h, key, found) |
Look up a value in the hash table h. If found is present, it indicates if key could be found in the table. If found = .false., the return value of iihash_lookup is meaningless (and essentially undefined). More... | |
subroutine | sihash_iterator_start (this, h) |
logical function | sihash_iterator_has_next (this) |
integer function | sihash_iterator_get_next (this) |
subroutine, public sihash_oct_m::sihash_init | ( | type(sihash_t), intent(out) | h | ) |
Initialize a hash table h with size entries. Since we use separate chaining, the number of entries in the hash table is, in principle, unlimited. We take the smallest prime number as table size that is greater or equal than the requested size to reduce collisions.
Definition at line 163 of file sihash.F90.
subroutine, public sihash_oct_m::sihash_end | ( | type(sihash_t), intent(inout) | h | ) |
Free a hash table.
Definition at line 184 of file sihash.F90.
subroutine, public sihash_oct_m::sihash_insert | ( | type(sihash_t), intent(inout) | h, |
character(len=*), intent(in) | key, | ||
integer, intent(in) | val | ||
) |
Insert a (key, val) pair into the hash table h.
Definition at line 204 of file sihash.F90.
integer function, public sihash_oct_m::sihash_lookup | ( | type(sihash_t), intent(in) | h, |
character(len=*), intent(in) | key, | ||
logical, intent(out), optional | found | ||
) |
Look up a value in the hash table h. If found is present, it indicates if key could be found in the table. If found = .false., the return value of iihash_lookup is meaningless (and essentially undefined).
Definition at line 230 of file sihash.F90.
subroutine sihash_oct_m::sihash_iterator_start | ( | class(sihash_iterator_t), intent(inout) | this, |
class(sihash_t), intent(in) | h | ||
) |
Definition at line 261 of file sihash.F90.
logical function sihash_oct_m::sihash_iterator_has_next | ( | class(sihash_iterator_t), intent(in) | this | ) |
Definition at line 282 of file sihash.F90.
integer function sihash_oct_m::sihash_iterator_get_next | ( | class(sihash_iterator_t), intent(inout) | this | ) |
Definition at line 307 of file sihash.F90.