1zct(1) User Commands zct(1)
2
3
4
6 zct - cut matrices or permutations
7
9 zct [OPTIONS] <Rows>[:<Columns>] <Input> <Output>
10
12 This program cuts a piece, specified by Rows and Columns, out of the
13 file Input, and writes the piece to Output. The input may be a matrix
14 or a set of permutations. Both Rows and Columns are lists of positive
15 integers or ranges (e.g., "13-25") separated by commas. If the input
16 is a matrix, the corresponding rows and columns are cut, and the
17 resulting rectangular pieces are combined into one rectangular matrix
18 which is written to the output file. If the columns list is omitted,
19 all columns of the selected rows are cut.
20
21 Here are some examples. Assume the input is the following 5 by 10
22 matrix:
23
24 1 2 3 4 5 6 7 8 9 0
25 0 1 2 3 4 5 6 7 8 9
26 0 0 1 2 3 4 5 6 7 8
27 0 0 0 0 0 0 0 0 0 0
28 9 8 7 6 5 4 3 2 1 0
29
30 Then, zct would produce the output shown below for different Rows:Col‐
31 umns lists:
32
33 Rows:Columns Result
34 ─────────────────────────────────────
35 1,4-5 1 2 3 4 5 6 7 8 9 0
36 0 0 0 0 0 0 0 0 0 0
37 9 8 7 6 5 4 3 2 1 0
38
39 1-3:8-10 8 9 0
40 7 8 9
41 6 7 8
42
43 1-2:2,5-7,9 2 5 6 7 9
44 1 4 5 6 8
45
46 1-2,5:1-3,9-10 1 2 3 9 0
47 0 1 2 8 9
48 9 8 7 1 0
49
50 The rows and columns which select the piece need not occur in ascending
51 order, but the output depends on the ordering. For example,
52
53 zct 1,2 output input
54 zct 2,1 output input
55
56 both extract the first two rows of `input', but the second form will
57 also permute the rows. Another example:
58
59 zct 3-4,1-2:3-4,1-2 inp out
60
61 would perform the following operation on a 4 by 4 matrix:
62
63 inp out
64 1 1 2 2 4 4 3 3
65 1 1 2 2 4 4 3 3
66
67 3 3 4 4 2 2 1 1
68 3 3 4 4 2 2 1 1
69
70 With permutations the program works in the same way as with matrices.
71 Each permutation is treated as a row. The Columns list must be empty
72 in this case, because zct can cut only entire permutations.
73
75 -Q Quiet, no messages.
76
77 -V Verbose, more messages.
78
79 -T <MaxTime>
80 Set CPU time limit
81
83 The number of entries in the Rows and Columns list must not be greater
84 than 10. One row (or permutation, respectively) of the input file and
85 the whole result of the cut must fit into memory.
86
87
88
89MeatAxe 2.4.24 zct(1)