A hash table. E.g. of a hash table with vec_len=4
vect(1) :: key1 --> key2 --> key3 --> key4 --> nul() | | | | | | val1 val2 val3 val4 | vect(2) :: key1 --> null() | | | val1 | vect(3) :: null() | | | vect(4) :: key1 --> key2 --> null() | | | | val1 val2
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(sllist_obj), | public, | allocatable | :: | vec(:) | |||
| integer, | public | :: | vec_len | = | 0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(inout) | :: | this |
Hashtable object |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| integer(kind=leapI4), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| integer(kind=leapI8), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| real(kind=leapSP), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| real(kind=leapDP), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | str |
String to hash |
Returned hash
Initializes the hashtable.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(inout) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | tbl_len |
Hashtable vector length |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(inout), | target | :: | this |
Hashtable object |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(inout) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to add in hashtable |
||
| class(*), | intent(in) | :: | val |
Val from key-val pair to add in hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(inout) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to remove from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| integer(kind=leapI4), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| integer(kind=leapI8), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| real(kind=leapDP), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(hashtbl_obj), | intent(in) | :: | this |
Hashtable object |
||
| integer, | intent(in) | :: | key |
Key from key-val pair to retrieve from hashtable |
||
| real(kind=leapSP), | intent(out) | :: | val |
Val from key-val pair to retrieve from hashtable |
type :: hashtbl_obj !> A hash table. ! E.g. of a hash table with vec_len=4 ! ! vect(1) :: key1 --> key2 --> key3 --> key4 --> nul() ! | | | | | ! | val1 val2 val3 val4 ! | ! vect(2) :: key1 --> null() ! | | ! | val1 ! | ! vect(3) :: null() ! | ! | ! | ! vect(4) :: key1 --> key2 --> null() ! | | | ! | val1 val2 type(sllist_obj), allocatable :: vec(:) integer :: vec_len = 0 contains procedure :: Initialize => hashtbl_obj_Init procedure :: Finalize => hashtbl_obj_Final procedure :: Put => hashtbl_obj_Put generic :: Get => hashtbl_obj_Get_int4, & hashtbl_obj_Get_int8, & hashtbl_obj_Get_real_sp, & hashtbl_obj_Get_real_dp procedure :: Remove => hashtbl_obj_Remove procedure :: Print => hashtbl_obj_Print procedure, nopass :: HashString => hashtbl_obj_HashString ! Internal/private procedures procedure, private :: hashtbl_obj_Get_int4 procedure, private :: hashtbl_obj_Get_int8 procedure, private :: hashtbl_obj_Get_real_sp procedure, private :: hashtbl_obj_Get_real_dp end type hashtbl_obj