DIJKSTRA(1) General Commands Manual DIJKSTRA(1)NAME
dijkstra - single-source distance filter
SYNOPSIS
dijkstra [ -ap? ] [ sourcenode file ]
DESCRIPTION
dijkstra reads a stream of graphs and for each computes 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.
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 calculation of color or some other attribute.
SEE ALSO gvpr(1), gvcolor(1), libgraph(3)
21 March 2001 DIJKSTRA(1)
Check Out this Related Man Page
GVCOLOR(1) General Commands Manual GVCOLOR(1)NAME
gvcolor - flow colors through a ranked digraph
( previously known as colorize )
SYNOPSIS
gvcolor [ files ]
USAGE
dot file.dot | gvcolor | dot -T<format>
DESCRIPTION
gvcolor is a filter that sets node colors from initial seed values. Colors flow along edges from tail to head, and are averaged (as HSB
vectors) at nodes. The graph must already have been processed by dot. Appropriate choice of initial colors yields drawings in which node
colors help to emphasize logical relationships between nodes, even when they are spread far apart in the layout.
Initial colors must be set externally, using the color attribute of a node. It is often effective to assign colors to a few key source or
sink nodes, manually setting their colors by editing the graph file. Color names are as in dot(1): symbolic names or RGB triples. It is
best to choose some easily-distinguished but related colors; not necessarily spaced evenly around the color wheel. For example,
blue_green, green, and light_yellow looks better than red, green, blue.
Certain graph attributes control the gvcolor algorithm. flow=back reverses the flow of colors from heads to tails. saturation=.1,.9 (or
any two numbers between 0 and 1) adjusts the color saturation linearly from least to greatest rank. If Defcolor is set, this color value
is applied to any node not otherwise colored.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
1 If nodes of the graph do not possess a ``pos'' attribute.
BUGS
It would be nice to make the program work without relying on an initial pass through dot.
AUTHORS
Stephen C. North <north@research.att.com>
Emden R. Gansner <erg@research.att.com>
SEE ALSO gc(1), dot(1), gvpr(1), ccomps(1), sccmap(1), tred(1), libgraph(3)
21 March 2001 GVCOLOR(1)
Hello,
I am testing some data to get line number at cursor position 9 and found some problem, the code is below.Assume we got 3 attribute. At second attribute, there are some data(eg.A41/A6) missing like at the fourth and six line
11006 A41 1888
11006 ... (7 Replies)
Can you help to adjust the void dijkstra(int s) function to find a path from source to every node so that the minimum cost on that path is maximum.
Ex:
From 1 to 2 we have 1 - 3 - 4 - 2 , costs(2+3+4+5)
From 1 to 2 we have 1 - 5 - 6 - 2 , costs(3+3+4+5)
I need the algorithm to choose path 1... (4 Replies)
Does anyone know of any script or packages that allow the calculation of the geographical distance between two points of lat/long from within a bash shell?
I have been searching the web for the past few days and none of the options seem compatible with bash variables... (eg. geodist)
Many... (3 Replies)