File: mcxmap.1

package info (click to toggle)
mcl 1%3A14-137-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 10,704 kB
  • ctags: 5,125
  • sloc: ansic: 53,217; sh: 4,448; perl: 3,967; makefile: 422
file content (223 lines) | stat: -rw-r--r-- 5,403 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
.\" Copyright (c) 2014 Stijn van Dongen
.TH "mcxmap" 1 "16 May 2014" "mcxmap 14-137" "USER COMMANDS "
.po 2m
.de ZI
.\" Zoem Indent/Itemize macro I.
.br
'in +\\$1
.nr xa 0
.nr xa -\\$1
.nr xb \\$1
.nr xb -\\w'\\$2'
\h'|\\n(xau'\\$2\h'\\n(xbu'\\
..
.de ZJ
.br
.\" Zoem Indent/Itemize macro II.
'in +\\$1
'in +\\$2
.nr xa 0
.nr xa -\\$2
.nr xa -\\w'\\$3'
.nr xb \\$2
\h'|\\n(xau'\\$3\h'\\n(xbu'\\
..
.if n .ll -2m
.am SH
.ie n .in 4m
.el .in 8m
..
.SH NAME
mcxmap \- permute or remap the indices of graphs and matrices\&.
.SH SYNOPSIS

\fBmcxmap\fP
\fB-imx\fP fname (\fIinput\fP)
\fB[-o\fP fname (\fIoutput\fP)\fB]\fP
\fB[-make-map\fP (\fIoutput map file name\fP)\fB]\fP
\fB[-make-mapc\fP (\fIoutput map file name\fP)\fB]\fP
\fB[-make-mapr\fP (\fIoutput map file name\fP)\fB]\fP
\fB[-cmul\fP a (\fIcoefficient\fP)\fB]\fP
\fB[-cshift\fP b (\fItranslate\fP)\fB]\fP
\fB[-rmul\fP c (\fIcoefficient\fP)\fB]\fP
\fB[-rshift\fP d (\fItranslate\fP)\fB]\fP
\fB[-mul\fP e (\fIcoefficient\fP)\fB]\fP
\fB[-shift\fP f (\fItranslate\fP)\fB]\fP
\fB[-map\fP fname (\fIrow/col map file\fP)\fB]\fP
\fB[-rmap\fP fname (\fIrow map file\fP)\fB]\fP
\fB[-cmap\fP fname (\fIcolumn map file\fP)\fB]\fP
\fB[-mapi\fP fname (\fIrow/col map file (use inverse)\fP)\fB]\fP
\fB[-rmapi\fP fname (\fIrow map file (use inverse)\fP)\fB]\fP
\fB[-cmapi\fP fname (\fIcolumn map file (use inverse)\fP)\fB]\fP
\fB[-tab\fP fname (\fIread (and map) tab file\fP)\fB]\fP
.SH DESCRIPTION

This utility relabels graphs or matrices\&. Its main use is in applying a
\fImap file\fP to a given matrix or graph\&. A map file contains a so called
\fImap matrix\fP in mcl format that has some special properties (given
further below)\&. The functionality of mcxmap can also be provided by \fBmcx\fP, as
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\&. However,
\fBmcx\fP will construct a new matrix and leave the original matrix to be mapped
alone\&. When dealing with huge matrices, considerable gains in efficiency
memory-wise and time-wise can be achieved by doing the mapping in-place\&.
This is what mcxmap does\&. In the future, its functionality may be
embedded in \fBmcx\fP with new mcx operators\&.

The special properties of a map matrix are

.ZJ 1m 1m "\(bu"
The column domain and row domain are
of the same cardinality\&.
.in -2m
.ZJ 1m 1m "\(bu"
Each column has exactly one entry\&.
.in -2m
.ZJ 1m 1m "\(bu"
Each row domain index occurs in exactly one column\&.
.in -2m

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 \fBEXAMPLES\fP Section\&.
.SH OPTIONS

.ZI 2m "\fB-o\fP fname (\fIoutput file\fP)"
\&
.br
Output file\&.
.in -2m

.ZI 2m "\fB-imx\fP fname (\fIinput file\fP)"
\&
.br
Input file\&.
.in -2m

.ZI 2m "\fB-map\fP fname (\fIrow/col map file)\fP)"
\&
'in -2m
.ZI 2m "\fB-rmap\fP fname (\fIrow map file\fP)"
\&
'in -2m
.ZI 2m "\fB-cmap\fP fname (\fIcolumn map file\fP)"
\&
'in -2m
.ZI 2m "\fB-mapi\fP fname (\fIrow/col map file (use inverse)\fP)"
\&
'in -2m
.ZI 2m "\fB-rmapi\fP fname (\fIrow map fil (use inverse)\fP)"
\&
'in -2m
.ZI 2m "\fB-cmapi\fP fname (\fIcolumn map fil (use inverse)\fP)"
\&
'in -2m
'in +2m
\&
.br
Different ways to specify map files\&.
.in -2m

.ZI 2m "\fB-make-map\fP (\fIoutput map file name\fP)"
\&
'in -2m
.ZI 2m "\fB-make-mapc\fP (\fIoutput map file name\fP)"
\&
'in -2m
.ZI 2m "\fB-make-mapr\fP (\fIoutput map file name\fP)"
\&
'in -2m
'in +2m
\&
.br
Generate a map that maps the specified domain onto
the appropriate canonical domain and write the map
matrix to file\&.
.in -2m

.ZI 2m "\fB-cmul\fP a (\fIcoefficient\fP)"
\&
'in -2m
.ZI 2m "\fB-cshift\fP b (\fItranslate\fP)"
\&
'in -2m
'in +2m
\&
.br
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\ \&\fCi\fP are mapped to\ \&\fCa*i+b\fP\&.
.in -2m

.ZI 2m "\fB-rmul\fP c (\fIcoefficient\fP)"
\&
'in -2m
.ZI 2m "\fB-rshift\fP d (\fItranslate\fP)"
\&
'in -2m
'in +2m
\&
.br
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\ \&\fCi\fP are mapped to\ \&\fCc*i+d\fP\&.
.in -2m

.ZI 2m "\fB-mul\fP e (\fIcoefficient\fP)"
\&
'in -2m
.ZI 2m "\fB-shift\fP f (\fItranslate\fP)"
\&
'in -2m
'in +2m
\&
.br
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\ \&\fCi\fP will be mapped to\ \&\fCe*i+f\fP\&.
.in -2m

.ZI 2m "\fB-tab\fP fname (\fIread (and map) tab file\fP)"
\&
.br
This option requires the \fB-map\fP option\&. \fBmcxmap\fP will output the
mapped tab definition\&.
.in -2m
.SH 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\&.

.nf \fC
(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  $
)
.fi \fR

.SH AUTHOR

Stijn van Dongen\&.
.SH SEE ALSO

\fBmcxio(5)\fP,
\fBmcx(1)\fP,
\fBmcxsubs(1)\fP,
and \fBmclfamily(7)\fP for an overview of all the documentation
and the utilities in the mcl family\&.