annotate toolboxes/graph_visualisation/share/man/man1/prune.1 @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 .\" Copyright (c) 2002 Marcus Harnisch <marcus.harnisch@gmx.net>
Daniel@0 2 .\"
Daniel@0 3 .\" This is free documenation. It is provided to you without any
Daniel@0 4 .\" warranty that it is useful or that you can understand it.
Daniel@0 5 .\"
Daniel@0 6 .\" You are granted the right to use and redistribute the source code
Daniel@0 7 .\" or parts of it (even single words and letters), provided that the
Daniel@0 8 .\" copyright notice and the license terms will not be removed.
Daniel@0 9 .\"
Daniel@0 10 .TH prune 1
Daniel@0 11
Daniel@0 12 .SH NAME
Daniel@0 13 prune \- Prune directed graphs
Daniel@0 14 .SH SYNOPSIS
Daniel@0 15 .B prune
Daniel@0 16 [
Daniel@0 17 .BI \-n " node"
Daniel@0 18 ]
Daniel@0 19 [
Daniel@0 20 .BI \-N " attrspec"
Daniel@0 21 ]
Daniel@0 22 [
Daniel@0 23 .I files ...
Daniel@0 24 ]
Daniel@0 25 .SH DESCRIPTION
Daniel@0 26 .B prune
Daniel@0 27 reads directed graphs in the same format used by
Daniel@0 28 .B dot(1)
Daniel@0 29 and removes subgraphs rooted at nodes specified on the
Daniel@0 30 command line via options. These nodes themselves will not be removed,
Daniel@0 31 but can be given attributes so that they can be easily located by a
Daniel@0 32 graph stream editor such as
Daniel@0 33 .B gpr(1).
Daniel@0 34 .B prune
Daniel@0 35 correctly handles cycles, loops and multi\(hyedges.
Daniel@0 36
Daniel@0 37 Both options can appear multiple times on the command line. All
Daniel@0 38 subgraphs rooted at the respective nodes given will then be
Daniel@0 39 processed. If a node does not exist,
Daniel@0 40 .B prune
Daniel@0 41 will skip it and print a warning message to stderr.
Daniel@0 42 If multiple attributes are given, they will be applied to
Daniel@0 43 all nodes that have been processed.
Daniel@0 44 .B prune
Daniel@0 45 writes the result to the stdout.
Daniel@0 46 .SH OPTIONS
Daniel@0 47 .TP
Daniel@0 48 .BI \-n " name"
Daniel@0 49 Specifies name of node to prune.
Daniel@0 50 .TP
Daniel@0 51 .BI \-N " attrspec"
Daniel@0 52 Specifies attribute that will be set (or changed if it exists) for any
Daniel@0 53 pruned node.
Daniel@0 54 .I attrspec
Daniel@0 55 is a string of the form
Daniel@0 56 .IR attr "=" value.
Daniel@0 57
Daniel@0 58 .SH EXAMPLES
Daniel@0 59 An input graph
Daniel@0 60 .I test.dot
Daniel@0 61 of the form
Daniel@0 62 .PP
Daniel@0 63 digraph DG {
Daniel@0 64 .br
Daniel@0 65 A \-> B;
Daniel@0 66 .br
Daniel@0 67 A \-> C;
Daniel@0 68 .br
Daniel@0 69
Daniel@0 70 .br
Daniel@0 71 B \-> D;
Daniel@0 72 .br
Daniel@0 73 B \-> E;
Daniel@0 74 .br
Daniel@0 75 }
Daniel@0 76 .br
Daniel@0 77
Daniel@0 78 , processed by the command
Daniel@0 79 .PP
Daniel@0 80 prune \-n B test.dot
Daniel@0 81 .PP
Daniel@0 82 would produce the following output (the actual code might be formatted
Daniel@0 83 in a slightly different way).
Daniel@0 84 .PP
Daniel@0 85 digraph DG {
Daniel@0 86 .br
Daniel@0 87 A \-> B;
Daniel@0 88 .br
Daniel@0 89 A \-> C;
Daniel@0 90 .br
Daniel@0 91 }
Daniel@0 92 .br
Daniel@0 93
Daniel@0 94 Another input graph
Daniel@0 95 .I test.dot
Daniel@0 96 of the form
Daniel@0 97 .PP
Daniel@0 98 digraph DG {
Daniel@0 99 .br
Daniel@0 100 A \-> B;
Daniel@0 101 .br
Daniel@0 102 A \-> C;
Daniel@0 103 .br
Daniel@0 104
Daniel@0 105 .br
Daniel@0 106 B \-> D;
Daniel@0 107 .br
Daniel@0 108 B \-> E;
Daniel@0 109 .br
Daniel@0 110
Daniel@0 111 .br
Daniel@0 112 C \-> E;
Daniel@0 113 .br
Daniel@0 114 }
Daniel@0 115 .br
Daniel@0 116
Daniel@0 117 (note the additional edge from
Daniel@0 118 .I C
Daniel@0 119 to
Daniel@0 120 .I E
Daniel@0 121 ), processed by the command
Daniel@0 122 .PP
Daniel@0 123 prune \-n B \-N color=red test.dot
Daniel@0 124 .PP
Daniel@0 125 results in
Daniel@0 126 .PP
Daniel@0 127 digraph DG {
Daniel@0 128 .br
Daniel@0 129 B [color=red];
Daniel@0 130 .br
Daniel@0 131 A \-> B;
Daniel@0 132 .br
Daniel@0 133 A \-> C;
Daniel@0 134 .br
Daniel@0 135 C \-> E;
Daniel@0 136 .br
Daniel@0 137 }
Daniel@0 138 .br
Daniel@0 139
Daniel@0 140 Node
Daniel@0 141 .I E
Daniel@0 142 has not been removed since its second parent
Daniel@0 143 .I C
Daniel@0 144 is not being pruned.
Daniel@0 145
Daniel@0 146 .SH "EXIT STATUS"
Daniel@0 147 .B prune
Daniel@0 148 returns 0 on successful completion.
Daniel@0 149 It returns 1 if an error occurs.
Daniel@0 150 .SH SEE ALSO
Daniel@0 151 .BR dot (1),
Daniel@0 152 .BR gpr (1)
Daniel@0 153
Daniel@0 154 .SH AUTHOR
Daniel@0 155 Marcus Harnisch <marcus.harnisch@gmx.net>