Module that contains the implementation of nodes in the linked-list matrix representation.
Base node corresponding to a given column - value pair for a given row
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | column | column index |
|||
complex(kind=dp), | private | :: | element | complex value for the matrix element |
|||
class(node_t), | public, | pointer | :: | next | pointer to next node |
procedure, public :: add_to_node_element | |
procedure, public :: get_node_element | |
procedure, public :: delete |
Constructor for a new node, sets the column and element attributes.
The element passed is polymorphic, but will be cast to complex in the node itself.
No nodes are linked yet; the pointer to the next node is initialised to null()
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | column | column index |
||
class(*), | intent(in) | :: | element | element added to the node |
new node with given column and element attributes
Returns the node element.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(node_t), | intent(in) | :: | this | type instance |
node element
Destructor, deallocates the node attributes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(node_t), | intent(inout) | :: | this | type instance |
Adds a given element to the node element, does type-checking of the polymorphic element given. Allowed types are complex, real, integer.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(node_t), | intent(inout) | :: | this | type instance |
||
class(*), | intent(in) | :: | element | element to add to the existing element |