add an edge index for this vertex
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(vertex), | intent(inout) | :: | me | |||
| integer, | intent(in) | :: | edge |
subroutine add_edge(me,edge) class(vertex),intent(inout) :: me integer,intent(in) :: edge if (allocated(me%edges)) then if (.not. any (edge==me%edges)) then me%edges = [me%edges, edge] ! auto lhs reallocation end if else allocate(me%edges(1)) me%edges = [edge] end if end subroutine add_edge