Get the i
th vertex.
The program will stop if vertex i
does not exist.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dag), | intent(inout) | :: | me | |||
integer(kind=ip), | intent(in) | :: | i |
vertex number |
function dag_get_vertex(me,i) result(v) class(dag),intent(inout) :: me integer(ip),intent(in) :: i !! vertex number type(vertex) :: v if (i<0 .or. i>me%n) then error stop 'Error in dag_get_vertex: invalid vertex number' else v = me%vertices(i) end if end function dag_get_vertex