vertex_t Derived Type

type, public :: vertex_t

Encapsulate a node in a graph comprised of vertices connected by dependencies (edges)


Inherits

type~~vertex_t~~InheritsGraph type~vertex_t vertex_t varying_string varying_string type~vertex_t->varying_string label_, attributes_

Inherited by

type~~vertex_t~~InheritedByGraph type~vertex_t vertex_t type~dag_t dag_t type~dag_t->type~vertex_t vertices

Contents


Components

Type Visibility Attributes Name Initial
type(varying_string), private :: attributes_
integer, private, allocatable :: edges_(:)
type(varying_string), private :: label_

Constructor

public interface vertex_t

  • private pure module function construct_from_components(edges, label, attributes) result(vertex)

    Component-wise constructor of a vertex_t object

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(in) :: edges(:)

    vertices on which this vertex depends

    type(varying_string), intent(in) :: label

    vertex description (e.g., name)

    type(varying_string), intent(in), optional :: attributes

    Graphvizl .dot symbol description

    Return Value type(vertex_t)

  • private impure elemental module function from_json_element(json_element) result(vertex)

    Construct a scalar array vertex_t or an array of objects from a JSON representation of a vertex or vertices

    Arguments

    Type IntentOptional Attributes Name
    type(json_element_t), intent(in) :: json_element

    Return Value type(vertex_t)

  • private module function from_json_value(json_value) result(vertex)

    Construct a single vertex_t object from a JSON representation of a vertex

    Arguments

    Type IntentOptional Attributes Name
    class(json_value_t), intent(in) :: json_value

    Return Value type(vertex_t)


Type-Bound Procedures

procedure, public, :: attributes

  • interface

    private elemental module function attributes(self) result(my_attributes)

    Vertex attributes getter

    Arguments

    Type IntentOptional Attributes Name
    class(vertex_t), intent(in) :: self

    Return Value type(varying_string)

procedure, public, :: edges

  • interface

    private pure module function edges(self) result(my_edges)

    Result is the array element numbers of the vertices on which this vertex depends

    Arguments

    Type IntentOptional Attributes Name
    class(vertex_t), intent(in) :: self

    Return Value integer, (size(self%edges_))

procedure, public, :: edges_allocated

  • interface

    private elemental module function edges_allocated(self) result(edges_array_allocated)

    Result is .true. iff the edges component is allocated

    Arguments

    Type IntentOptional Attributes Name
    class(vertex_t), intent(in) :: self

    Return Value logical

procedure, public, :: label

  • interface

    private elemental module function label(self) result(my_label)

    Vertex label getter

    Arguments

    Type IntentOptional Attributes Name
    class(vertex_t), intent(in) :: self

    Return Value type(varying_string)

procedure, public, :: to_json

  • interface

    private impure elemental module function to_json(self) result(json_object)

    Result is a JSON representation of self

    Arguments

    Type IntentOptional Attributes Name
    class(vertex_t), intent(in) :: self

    Return Value type(json_object_t)