Construct a dag_t object from an array of (unsorted) vertex_t objects (result contains a topologically sorted index array)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vertex_t), | intent(in) | :: | vertices(:) |
Encapsulate a graph as an array of vertices, each storing dependency information
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(vertex_t), | private, | allocatable | :: | vertices(:) |
private function construct_from_vertices(vertices) | Construct a dag_t object from an array of (unsorted) vertex_t objects (result contains a topologically sorted index array) |
procedure, public :: dependencies_for | |
procedure, public :: depends_on |
Result is an array of the ids on which vertex_id depends
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dag_t), | intent(in) | :: | self | |||
integer, | intent(in) | :: | vertex_id |
Result is an array of the vertex numbers that depend on on vertex vertex_num
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dag_t), | intent(in) | :: | self | |||
integer, | intent(in) | :: | vertex_num |