![]() |
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 | sphash_iterator_t |
type | sphash_t |
interface | sphash_value_t |
Functions/Subroutines | |
type(sphash_value_t) function, pointer | sphash_value_constructor (value, clone) |
subroutine | sphash_value_finalize (this) |
class(*) function, pointer | sphash_value_get (this) |
subroutine, public | sphash_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... | |
logical function | sphash_is_associated (this) |
Check if the sphash attribute, map, is associated. More... | |
subroutine, public | sphash_end (h) |
Free a hash table. More... | |
subroutine, public | sphash_insert (h, key, val, clone) |
Insert a (key, val) pair into the hash table h. If clone=.true., the object will be copied. More... | |
class(*) function, pointer, public | sphash_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 | sphash_iterator_start (this, h) |
logical function | sphash_iterator_has_next (this) |
class(*) function, pointer | sphash_iterator_get_next (this) |
|
private |
Definition at line 178 of file sphash.F90.
|
private |
Definition at line 196 of file sphash.F90.
|
private |
Definition at line 211 of file sphash.F90.
subroutine, public sphash_oct_m::sphash_init | ( | type(sphash_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 223 of file sphash.F90.
logical function sphash_oct_m::sphash_is_associated | ( | class(sphash_t), intent(in) | this | ) |
Check if the sphash attribute, map, is associated.
Definition at line 241 of file sphash.F90.
subroutine, public sphash_oct_m::sphash_end | ( | type(sphash_t), intent(inout) | h | ) |
Free a hash table.
Definition at line 249 of file sphash.F90.
subroutine, public sphash_oct_m::sphash_insert | ( | type(sphash_t), intent(inout) | h, |
character(len=*), intent(in) | key, | ||
class(*), intent(in), target | val, | ||
logical, intent(in), optional | clone | ||
) |
Insert a (key, val) pair into the hash table h. If clone=.true., the object will be copied.
Definition at line 292 of file sphash.F90.
class(*) function, pointer, public sphash_oct_m::sphash_lookup | ( | type(sphash_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 324 of file sphash.F90.
subroutine sphash_oct_m::sphash_iterator_start | ( | class(sphash_iterator_t), intent(inout) | this, |
class(sphash_t), intent(in) | h | ||
) |
Definition at line 363 of file sphash.F90.
logical function sphash_oct_m::sphash_iterator_has_next | ( | class(sphash_iterator_t), intent(in) | this | ) |
Definition at line 384 of file sphash.F90.
class(*) function, pointer sphash_oct_m::sphash_iterator_get_next | ( | class(sphash_iterator_t), intent(inout) | this | ) |
Definition at line 409 of file sphash.F90.