vertex_m Module

  • Jacob Williams, Damian Rouson, Robert Singleterry, Brad Richardson
  • 2020-Nov-30
  • Copyright (c) 2020-2021, Sourcery Institute, BSD 3-clause license Copyright (c) 2018 Jacob Williams
  • v1.0
  • 70 statements
  • Source File

Uses

    • rojff
    • iso_varying_string
  • module~~vertex_m~~UsesGraph module~vertex_m vertex_m iso_varying_string iso_varying_string module~vertex_m->iso_varying_string rojff rojff module~vertex_m->rojff

Used by

  • module~~vertex_m~~UsedByGraph module~vertex_m vertex_m module~dag_m dag_m module~dag_m->module~vertex_m module~vertex_s vertex_s module~vertex_s->module~vertex_m module~dag_s dag_s module~dag_s->module~dag_m

Contents


Interfaces

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)

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)

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_))

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

interface

  • private module function from_json_object(json_object) result(vertex)

    construct a vertexa_t object from a jsonff JSON object

    Arguments

    Type IntentOptional Attributes Name
    type(json_object_t), intent(in) :: json_object

    Return Value type(vertex_t)

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)

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)


Derived Types

type, public ::  vertex_t

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

Components

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

Constructor

private pure, module function construct_from_components (edges, label, attributes)

Component-wise constructor of a vertex_t object

private impure, elemental, module function from_json_element (json_element)

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

private module function from_json_value (json_value)

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

Type-Bound Procedures

procedure , public , :: attributes Interface
procedure , public , :: edges Interface
procedure , public , :: edges_allocated Interface
procedure , public , :: label Interface
procedure , public , :: to_json Interface