]> granicus.if.org Git - graphviz/commitdiff
Make the usage string a bit clearer on the -U flag;
authorEmden R. Gansner <erg@research.att.com>
Wed, 19 Jun 2013 16:26:45 +0000 (12:26 -0400)
committerEmden R. Gansner <erg@research.att.com>
Wed, 19 Jun 2013 16:26:45 +0000 (12:26 -0400)
add -U flag to the man page.

cmd/tools/Makefile.am
cmd/tools/mm2gv.1
cmd/tools/mm2gv.c

index e4363c2c1f1eb72ffb3e1bc44e92a2c0c55f3c71..60ddf4f35df7e6514edf17865940a5ea6ad99b6c 100644 (file)
@@ -157,7 +157,7 @@ mm2gv_LDADD = \
        $(top_builddir)/lib/cgraph/libcgraph.la @MATH_LIBS@
 
 mm2gv.1.pdf: mm2gv.1
-       - @GROFF@ -Tps -man mm2gv.1 | @PS2PDF@ - - >mm2gv.1.pdf
+       - @TBL@ mm2gv.1 | @GROFF@ -Tps -man | @PS2PDF@ - - >mm2gv.1.pdf
 
 gv2gml_SOURCES = gv2gml.c
 
index d43fd7927cb759e5ed214f0ffc18de861588cedd..4fea0ab06528835c30b24d161aace5e4feb09dfe 100644 (file)
@@ -7,6 +7,9 @@ mm2gv \- Matrix Market-DOT converters
 .B \-cluv?
 ]
 [
+.BI -U i
+]
+[
 .BI -o outfile
 ]
 [ 
@@ -16,6 +19,21 @@ mm2gv \- Matrix Market-DOT converters
 .SH DESCRIPTION
 .B mm2gv
 converts a sparse matrix of the Matrix Market format to a graph in the GV (formerly DOT) format. 
+If the matrix \fIM\fP is not square, the graph is considered bipartite and the matrix is viewed
+as a bipartite graph adjacency matrix, with the rows and columns of the matrix specifying the
+two sets of vertices. Equivalently, the matrix is converted into a symmetric square matrix
+.TS
+c c.
+0    \fIM\fP
+\fIM\fP^T  0
+.TE
+a block matrix with square blocks of 0's in the upper left and lower right, the upper right
+block being \fIM\fP and the lower left block being the transpose of \fIM\fP.
+This matrix is then viewed as the adjacency matrix of the graph.
+.P
+For a square matrix, \fBmm2gv\fP uses it directly as an adjacency matrix if its pattern of non-zero
+entries is symmetric; otherwise, it will treat it as a bipartite graph as with the case of non-square
+matrices. This behavior can be modified by the \fB-U\fP flag.
 .SH OPTIONS
 The following options are supported:
 .TP
@@ -36,6 +54,15 @@ If specified, the graph is assumed to be undirected. By default, the graph gener
 This flag causes \fBmm2gv\fP to store the matrix values as the \fI"len"\fP attribute of the
 corresponding edge.
 .TP
+.BI \-U "bflag"
+Specifies how square matrices are handled. If \fIbflag\fP is 0, a square matrix will always be treated
+as an adjacency matrix.  
+If \fIbflag\fP is 1 (the default), a square matrix with a symmetric pattern
+of non-zero entries will be used as an adjacency matrix; otherwise, it will be used a bipartite graph.
+If \fIbflag\fP is 2, a symmetric matrix
+will be used as an adjacency matrix; otherwise, it will be used a bipartite graph.
+If \fIbflag\fP is 3, any input matrix will be treated like a bipartite graph.
+.TP
 .BI \-o "outfile"
 Prints output to the file \fIoutfile\fP. If not given, \fBmm2gv\fP
 uses stdout.
index 31c7766e814b09bea4684a49ec0d46e2c4624f19..a7e4e0c3b91e206c0901ff6df14531b9fc8fc90d 100644 (file)
@@ -368,11 +368,15 @@ static Agraph_t *makeDotGraph(SparseMatrix A, char *name, int dim,
 }
 
 static char* useString = "Usage: %s [-uvcl] [-o file] matrix_market_filename\n\
-  -u - make graph undirected\n\
-  -U i whether to treat unsymmetric square matrix as a bipartite graph. 0 (never), 1 (default, pattern unsymmetric as bipartite), 2 (unsymmetric matrix always as bipartite. 3: always treat square matrix as bipartite.\n\
-  -v - assign len to edges\n\
-  -c - assign color and wt to edges\n\
-  -l - add label\n\
+  -u   - make graph undirected\n\
+  -U i - treat non-square matrix as a bipartite graph\n\
+         i = 0   never\n\
+         i = 1   if pattern unsymmetric (default)\n\
+         i = 2   if matrix unsymmetric\n\
+         i = 3   always\n\
+  -v   - assign len to edges\n\
+  -c   - assign color and wt to edges\n\
+  -l   - add label\n\
   -o <file> - output file \n";
 
 static void usage(int eval)