dag_t Derived Type

type, public :: dag_t

Encapsulate a graph as an array of vertices, each storing dependency information


Inherits

type~~dag_t~~InheritsGraph type~dag_t dag_t type~vertex_t vertex_t type~dag_t->type~vertex_t vertices type~task_t task_t type~vertex_t->type~task_t task

Contents


Components

TypeVisibilityAttributesNameInitial
type(vertex_t), private, allocatable:: vertices(:)

Constructor

public interface dag_t

  • private function construct_from_vertices(vertices) result(dag)

    Construct a dag_t object from an array of (unsorted) vertex_t objects (result contains a topologically sorted index array)

    Arguments

    TypeIntentOptionalAttributesName
    type(vertex_t), intent(in) :: vertices(:)

    Return Value type(dag_t)


Type-Bound Procedures

procedure, public :: dependencies_for

  • private pure function dependencies_for(self, vertex_id) result(dependency_ids)

    Result is an array of the ids on which vertex_id depends

    Arguments

    TypeIntentOptionalAttributesName
    class(dag_t), intent(in) :: self
    integer, intent(in) :: vertex_id

    Return Value integer,allocatable, (:)

procedure, public :: depends_on

  • private pure function depends_on(self, vertex_num) result(dependencies)

    Result is an array of the vertex numbers that depend on on vertex vertex_num

    Arguments

    TypeIntentOptionalAttributesName
    class(dag_t), intent(in) :: self
    integer, intent(in) :: vertex_num

    Return Value integer,allocatable, (:)