Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | num_rows | = | 0 | ||
type(ivector_t), | public | :: | buffer | ||||
integer, | public, | dimension(:), allocatable | :: | row_indx |
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 .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 |
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 |
type itable_t
integer :: num_rows = 0 !Must be > 0
type(ivector_t) :: buffer
integer, dimension(:), allocatable :: row_indx
contains
procedure :: delete => itbl_delete
procedure :: clear => itbl_clear
procedure :: append => itbl_append
procedure :: set_val => itbl_set_val
procedure :: is_in => itbl_is_in
procedure :: get_val => itbl_get_val
procedure :: get_row => itbl_get_row
procedure :: shrink_to_fit => itbl_shrink_to_fit
procedure :: print => itbl_print
end type itable_t