set info about a vertex in a dag.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dag), | intent(inout) | :: | me | |||
integer(kind=ip), | intent(in) | :: | ivertex |
vertex number |
||
character(len=*), | intent(in), | optional | :: | label |
if a label is not set, then the integer vertex number is used. |
|
character(len=*), | intent(in), | optional | :: | attributes |
other attributes when saving as a diagraph. |
|
class(*), | intent(in), | optional | :: | metadata |
optional user-defined metadata |
subroutine dag_set_vertex_info(me,ivertex,label,attributes,metadata) class(dag),intent(inout) :: me integer(ip),intent(in) :: ivertex !! vertex number character(len=*),intent(in),optional :: label !! if a label is not set, !! then the integer vertex !! number is used. character(len=*),intent(in),optional :: attributes !! other attributes when !! saving as a diagraph. class(*),intent(in),optional :: metadata !! optional user-defined metadata if (present(label)) me%vertices(ivertex)%label = label if (present(attributes)) me%vertices(ivertex)%attributes = attributes if (present(metadata)) then if (allocated(me%vertices(ivertex)%metadata)) & deallocate(me%vertices(ivertex)%metadata) allocate(me%vertices(ivertex)%metadata, source=metadata) end if end subroutine dag_set_vertex_info