![]() |
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 195 of file sphash.F90.
|
private |
Definition at line 210 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 222 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 240 of file sphash.F90.
| subroutine, public sphash_oct_m::sphash_end | ( | type(sphash_t), intent(inout) | h | ) |
Free a hash table.
Definition at line 248 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 365 of file sphash.F90.
| logical function sphash_oct_m::sphash_iterator_has_next | ( | class(sphash_iterator_t), intent(in) | this | ) |
Definition at line 386 of file sphash.F90.
| class(*) function, pointer sphash_oct_m::sphash_iterator_get_next | ( | class(sphash_iterator_t), intent(inout) | this | ) |
Definition at line 411 of file sphash.F90.