Implements a table with contiguously stored rows.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | num_rows | = | 0 | ||
type(ivector_t), | public | :: | buffer | ||||
integer, | public, | dimension(:), allocatable | :: | row_indx |
procedure, public :: delete => itbl_delete | |
procedure, public :: clear => itbl_clear | |
procedure, public :: append => itbl_append | |
procedure, public :: set_val => itbl_set_val | |
procedure, public :: is_in => itbl_is_in | |
procedure, public :: get_val => itbl_get_val | |
procedure, public :: get_row => itbl_get_row | |
procedure, public :: shrink_to_fit => itbl_shrink_to_fit | |
procedure, public :: print => itbl_print |
Returns .true. if val is in row irow, .false. otherwise.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(in) | :: | this | |||
integer, | intent(in) | :: | irow | |||
integer, | intent(in) | :: | val |
Returns the jth element of row irow
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(in) | :: | this | |||
integer, | intent(in) | :: | irow | |||
integer, | intent(in) | :: | j |
Creates an empty itable_t with num_rows rows and all rows having zero elements.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(itable_t), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | num_rows | Must be > 0 |
||
integer, | intent(out), | optional | :: | ierr |
Deletes an itable_t. No access is allowed to this object after this call.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(inout) | :: | this |
Clears all rows. Does not deallocate memory.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(inout) | :: | this |
Appends an element val
to row irow.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | irow | |||
integer, | intent(in) | :: | val |
Sets the value of the jth element of row irow.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(inout) | :: | this | |||
integer, | intent(in) | :: | irow | |||
integer, | intent(in) | :: | j | |||
integer, | intent(in) | :: | val |
Returns a pointer to the row data of irow. No bounds checking is performed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(in), | target | :: | this | ||
integer, | intent(in) | :: | irow | |||
integer, | intent(out), | dimension(:), pointer | :: | res |
Releases additional memory to fit underlying data.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(inout) | :: | this | |||
integer, | intent(out), | optional | :: | ierr |
Prints an itable_t.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(itable_t), | intent(in) | :: | this |