private function hash_map_values(this) result(res)
All values, in insertion order. values() and keys() are index
aligned: values(i) belongs to keys(i). Zero-sized for an empty
map.
Type Bound
hash_map_t
Arguments
| Type |
Intent | Optional | Attributes |
|
Name |
|
|
class(hash_map_t),
|
intent(in) |
|
|
:: |
this |
|
Return Value
integer(kind=int64), allocatable, (:)
Variables
| Type |
Visibility | Attributes |
|
Name |
| Initial | |
|
integer(kind=default_int),
|
private |
|
:: |
i |
|
|
|
Source Code
function hash_map_values(this) result(res)
!! All values, in insertion order. `values()` and `keys()` are index
!! aligned: `values(i)` belongs to `keys(i)`. Zero-sized for an empty
!! map.
class(hash_map_t), intent(in) :: this
integer(int64), allocatable :: res(:)
integer(default_int) :: i
allocate (res(this%n_entries))
do i = 1, this%n_entries
res(i) = this%entry_value(i)
end do
end function hash_map_values