Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

dijkstra (1)

Name

dijkstra - source distance filter for Graphviz

Synopsis

dijkstra [ -adp?  ] [ sourcenode file ]

Description

DIJKSTRA(1)                 General Commands Manual                DIJKSTRA(1)



NAME
       dijkstra - single-source distance filter for Graphviz

SYNOPSIS
       dijkstra [ -adp?  ] [ sourcenode file ]

DESCRIPTION
       dijkstra  reads a stream of Graphviz formatted graphs and for each com-
       putes the distance of every node from sourcenode.  Edge length is given
       in  the  len  attribute,  and  the default is 1.  The dist attribute of
       every node is set to its distance from sourcenode.  If the -p  flag  is
       used,  the prev attribute of each node reachable from sourcenode is set
       to the name of the  previous  node  on  a  shortest  path.   The  graph
       attribute maxdist is set to the maximum dist of all nodes in the graph.

       If  the -d flag is used, the graph is treated as directed and only for-
       ward edges are used.

       By default, if the graph is disconnected, the dist attribute  of  nodes
       unreachable  from  sourcenode are left untouched, and maxdist is set to
       the maximum of any previous value and the largest distance recorded  in
       this run. On the other hand, if the -a flag is used, the dist attribute
       of an unreachable node is assigned a  very  large  value,  and  maxdist
       records   the  maximum  distance  found  in  the  component  containing
       sourcenode.

       Any number of sourcenode file pairs may be given.  If the last file  is
       missing, stdin is used.  All output is written to stdout.

       In  a typical application, dist and maxdist can drive a downstream cal-
       culation of color or some other attribute.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | image/graphviz   |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+

SEE ALSO
       gvpr(1), gvcolor(1), libgraph(3)



NOTES
       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source was downloaded  from   http://gitlab.com/graphviz/graphviz/-/ar-
       chive/2.47.1/graphviz-2.47.1.tar.gz.

       Further information about this software can be found on the open source
       community website at http://www.graphviz.org/.



                                 21 March 2001                     DIJKSTRA(1)