mcxmap(1)
mcxmap(1) ๐
okay bestie, welcome to mcxmap โ a USER COMMANDS situation, and it's giving โจindex remappingโจ. stay with me, it's actually so good.
โจ NAME โจ
mcxmap โ permute or remap the indices of graphs and matrices. literally its whole personality. ๐ฆ
๐ธ SYNOPSIS ๐ธ
mcxmap -imx fname (input) [-o fname (output)] [-make-map (output map file
name)] [-make-mapc (output map file name)] [-make-mapr (output map file
name)] [-cmul a (coefficient)] [-cshift b (translate)] [-rmul c
(coefficient)] [-rshift d (translate)] [-mul e (coefficient)] [-shift f
(translate)] [-map fname (row/col map file)] [-rmap fname (row map file)]
[-cmap fname (column map file)] [-mapi fname (row/col map file (use
inverse))] [-rmapi fname (row map file (use inverse))] [-cmapi fname
(column map file (use inverse))] [-tab fname (read (and map) tab file)]
๐ DESCRIPTION ๐
so this lil utility relabels graphs or matrices. that's the whole gig. its main character use is applying a map file to a given matrix or graph, and it does it in place which is the slay part.
a map file contains a so called map matrix in mcl format that has some special properties (we're getting to those, hold on ๐ซถ).
ngl the functionality of mcxmap can also be provided by mcx, because a mapped matrix (i.e. the result of applying a map matrix to another matrix) is simply the usual matrix product of a matrix and a map matrix. but here's the tea: mcx will construct a new matrix and leave the original matrix to be mapped alone. and when you're dealing with huge matrices, doing the mapping in-place is a considerable gain in efficiency โ memory-wise and time-wise. that's what mcxmap does. ๐ฅ
future note bestie: its functionality may be embedded inmcxwith newmcxoperators. so watch this space. ๐
the special properties of a map matrix ๐
- The column domain and row domain are of the same cardinality.
- Each column has exactly one entry.
- Each row domain index occurs in exactly one column.
these properties imply that the matrix can be used as a map from the column domain onto the row domain. an example map matrix is found in the EXAMPLES Section (yes, we go there, it's cute). โจ
๐ OPTIONS ๐
-ofname (output file) โ the output file. where the glow-up lands. ๐-imxfname (input file) โ the input file. the before picture. ๐ธ-mapfname (row/col map file)) โ different ways to specify map files.-rmapfname (row map file) โ different ways to specify map files.-cmapfname (column map file) โ different ways to specify map files.-mapifname (row/col map file (use inverse)) โ different ways to specify map files.-rmapifname (row map fil (use inverse)) โ different ways to specify map files.-cmapifname (column map fil (use inverse)) โ different ways to specify map files.-make-map(output map file name) โ generate a map that maps the specified domain onto the appropriate canonical domain, and write the map matrix to file. ๐-make-mapc(output map file name) โ generate a map that maps the specified domain onto the appropriate canonical domain, and write the map matrix to file. ๐-make-mapr(output map file name) โ generate a map that maps the specified domain onto the appropriate canonical domain, and write the map matrix to file. ๐-cmula (coefficient) โ these options have affect if neither a column map file nor column canonification is specified. if any of the first two options is used, column indices i are mapped toa*i+b. ๐งฎ-cshiftb (translate) โ same vibe as above: if any of the first two options is used, column indices i are mapped toa*i+b. ๐งฎ-rmulc (coefficient) โ these options have affect if neither a row map file nor row canonification is specified. if any of the first two options is used, indices i are mapped toc*i+d. ๐งฎ-rshiftd (translate) โ if any of the first two options is used, indices i are mapped toc*i+d. ๐งฎ-mule (coefficient) โ if a map file is specified for a given domain, neither a map file nor canonification is specified. if any of the first two options is used, the indices i will be mapped toe*i+f. ๐งฎ-shiftf (translate) โ if any of the first two options is used, the indices i will be mapped toe*i+f. ๐งฎ-tabfname (read (and map) tab file) โ this option requires the-mapoption.mcxmapwill output the mapped tab definition. ๐
๐ฆ EXAMPLES ๐ฆ
the matrix below has two canonical domains which are identical. it denotes a map of the canonical domain onto itself, in which node 0 is relabeled to 8, node 1 is relabeled to 5, et cetera. iconic honestly.
(mclheader
mcltype matrix
dimensions 12x12
)
(mclmatrix
begin
0 8 $
1 5 $
2 3 $
3 2 $
4 4 $
5 6 $
6 7 $
7 9 $
8 1 $
9 10 $
10 11 $
11 0 $
)
๐ AUTHOR ๐
Stijn van Dongen. (the author. we stan ๐)
โญ SEE ALSO โญ
mcxio(5), mcx(1), mcxsubs(1), and mclfamily(7) for an overview of all the documentation and the utilities in the mcl family. go read them bestie, iykyk ๐ซถ
that's the whole page!! mwah ๐ this was mcxmap version 22-282, dated 9 Oct 2022, and yes she's still mcxmap(1) at heart. periodt. โจ๐
๐
๐ฆ where this page comes from
- debian bookworm: mcl 1:22-282+ds-2 ยท GPL-3.0-or-later
- debian trixie: mcl 1:22-282+ds-4 ยท GPL-3.0-or-later
- ubuntu noble: mcl 1:22-282+ds-2 ยท GPL-3.0-or-later
- ubuntu questing: mcl 1:22-282+ds-4
- ubuntu resolute: mcl 1:22-282+ds-4build1 ยท GPL-3.0-or-later
- ubuntu stonking: mcl 1:22-282+ds-4build1 ยท GPL-3.0-or-later
- Copyright (c) 2022 Stijn van Dongen
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms