dag_get_edges Function

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

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

Type Bound

dag

Arguments

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

Return Value integer(kind=ip), dimension(:), allocatable


Source Code

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

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

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

    end function dag_get_edges