MM2GV(1)
π MM2GV β Matrix Market-DOT converters π
okay bestie, welcome to MM2GV(1), a General Commands Manual page, section 1, no big deal. (there's a lil delim $$ troff directive chillin' at the top of the source, it's just math-mode setup, ignore it, she's doing her job β¨)
β¨ NAME β¨
mm2gv β Matrix Market-DOT converters
πΈ SYNOPSIS πΈ
mm2gv [ -cluv? ] [ -Ui ] [ -ooutfile ] [ file ]
π¦ DESCRIPTION π¦
okay so, mm2gv takes a sparse matrix in the Matrix Market format and turns it into a graph in the GV format (yes, GV, the format formerly known as DOT, she rebranded and we respect it π
).
now here's the tea: if your matrix M is not square, the graph is considered bipartite π, and the matrix gets viewed as a bipartite graph adjacency matrix, where the rows and the columns of the matrix specify the two sets of vertices. equivalently, the matrix is converted into a symmetric square matrix:
0 M
$M sup T$ 0
it's a block matrix, periodt β square blocks of 0's in the upper left and lower right, the upper right block being M and the lower left block being the transpose of M. then that matrix gets viewed as the adjacency matrix of the graph. iconic behavior honestly π₯
for a square matrix, mm2gv uses it directly as an adjacency matrix if its pattern of non-zero entries is symmetric. otherwise? it'll treat it as a bipartite graph, same as the non-square case. and you can change this whole vibe with the -U flag π«Ά
π OPTIONS π
the following options are supported:
-cβ this flag causesmm2gvto assign colors to the edges π. the matrix element is scaled to the range[0,1]depending on where it lies between the minimum and maximum set matrix values. that scaled value is used as the"wt"attribute of the corresponding edge. in addition, this scalar value is mapped to an RGB value, which is stored as the edge"color".-lβ if set,mm2gvattaches a label to the graph indicating the base name of the input file, and the number of nodes and edges π·οΈ-uβ if specified, the graph is assumed to be undirected. by default, the graph generated is directed. so like, flip it if you want π«-vβ this flag causesmm2gvto store the matrix values as the"len"attribute of the corresponding edge.-Ubflagβ specifies how square matrices are handled. the details, in order, no skipping:- if bflag is
0, a square matrix will always be treated as an adjacency matrix. - if bflag 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 bflag is
2, a symmetric matrix will be used as an adjacency matrix; otherwise, it will be used a bipartite graph. - if bflag is
3, any input matrix will be treated like a bipartite graph.
- if bflag is
-ooutfileβ prints output to the file outfile. if not given,mm2gvusesstdout. π«§
π OPERANDS π
the following operand is supported:
fileβ name of the file in MatrixMarket format. if nofileoperand is specified, the standard input will be used. (stdin girlies rise up π)
β RETURN CODES β
- return
0if there were no problems during conversion π - and non-zero if any error occurred π
π AUTHORS π
- Yifan Hu <yifanhu@yahoo.com>
- Emden R. Gansner <erg@graphviz.com>
π ADDITIONAL INFO π
see http://math.nist.gov/MatrixMarket/ for description of the format, and http://www.cise.ufl.edu/research/sparse/matrices/ for a large collection of sparse matrices in this format. go forth and convert bestie π§
that's the whole page! this version of MM2GV(1) is dated 31 July 2008, and the footer says MM2GV(1) again because she's consistent like that π mwah, ily, go make some graphs β¨
π¦ where this page comes from
- alpine 3.22: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.23: graphviz-doc 12.2.1-r0 Β· EPL-1.0
- alpine 3.24: graphviz-doc 12.2.1-r3 Β· EPL-1.0
- arch rolling: graphviz 16.1.0-2 Β· EPL
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.1-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 43: graphviz 13.1.2-3.fc43 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.2-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- fedora 44: graphviz 14.1.4-2.fc44 Β· epl-1.0 AND cpl-1.0 AND bsd-3-clause AND mit AND gpl-3.0-or-later WITH bison-exception-2.2 AND apache-1.1 AND lgpl-2.0-or-later WITH libtool-exception AND smlnj AND hpnd-uc
- nixos 26.05: graphviz 12.2.1
- nixpkgs unstable: graphviz 15.1.1
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- opensuse-leap 16.0: graphviz 12.2.1-160000.1.1 Β· EPL-1.0
- ubuntu resolute: graphviz-tools 14.1.2-1ubuntu1 Β· EPL-1.0
- ubuntu stonking: graphviz-tools 14.1.2-1ubuntu2 Β· EPL-1.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms