dag_get_edges Function

private pure function dag_get_edges(me, ivertex) result(edges)

get the edges for the vertex (all the the vertices that this vertex depends on).

Type Bound

dag

Arguments

Type IntentOptional Attributes Name
class(dag), intent(in) :: me
integer, intent(in) :: ivertex

Return Value integer, dimension(:), allocatable


Source Code

    pure function dag_get_edges(me,ivertex) result(edges)

    implicit none

    class(dag),intent(in) :: me
    integer,intent(in) :: ivertex
    integer,dimension(:),allocatable :: edges

    if (ivertex>0 .and. ivertex <= me%n) then
        edges = me%vertices(ivertex)%edges  ! auto LHS allocation
    end if

    end function dag_get_edges