Linked list for a given row index, contains the column values
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | nb_elements |
number of elements in linked list |
|||
| type(node_t), | public, | pointer | :: | head |
pointer to head (first element added) |
||
| type(node_t), | public, | pointer | :: | tail |
pointer to tail (last element added) |
Adds a new node to the linked list with a given column index and value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(row_t), | intent(inout) | :: | this |
type instance |
||
| integer, | intent(in) | :: | column |
column position of the element |
||
| class(*), | intent(in) | :: | element |
the element to be added |
Returns a pointer to the node corresponding to the given column. Returns a nullified pointer if no node containing the given column index was found.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(row_t), | intent(in) | :: | this |
type instance |
||
| integer, | intent(in) | :: | column |
column index |
the node with a column value that matches column
Deletes a given linked list row by recursively iterating over all nodes. Nullifies the pointers and deallocates the elements.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(row_t), | intent(inout) | :: | this |
type instance |
Deletes a given node from the current row.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(row_t), | intent(inout) | :: | this |
type instance |
||
| integer, | intent(in) | :: | column |
column index of node to be deleted |
Subroutine to add the first node to the linked list. Allocates a new node and sets both the head and tail to this node.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(row_t), | intent(inout) | :: | this |
type instance |
||
| integer, | intent(in) | :: | column |
column position of element |
||
| class(*), | intent(in) | :: | element |
the element to be added |
Subroutine to append a new node to an already existing list of nodes. A new node is created, appended, and the tail is updated.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(row_t), | intent(inout) | :: | this |
type instance |
||
| integer, | intent(in) | :: | column |
column position of element |
||
| class(*), | intent(in) | :: | element |
the element to be added |