MM2GV(1)

πŸ“¦
version 16.1.0 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– 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 causes mm2gv to 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, mm2gv attaches 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 causes mm2gv to 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.
  • -ooutfile β€” prints output to the file outfile. if not given, mm2gv uses stdout. 🫧

πŸŽ€ OPERANDS πŸŽ€

the following operand is supported:

  • file β€” name of the file in MatrixMarket format. if no file operand is specified, the standard input will be used. (stdin girlies rise up πŸ™ˆ)

⭐ RETURN CODES ⭐

  • return 0 if 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