| 1 |
|
.\" RCSid "$Id$" |
| 2 |
< |
.TH RCOLLATE 1 7/8/97 RADIANCE |
| 2 |
> |
.TH RCOLLATE 1 9/5/2013 RADIANCE |
| 3 |
|
.SH NAME |
| 4 |
< |
rcollate - resize or transpose matrix data |
| 4 |
> |
rcollate - resize or re-order matrix data |
| 5 |
|
.SH SYNOPSIS |
| 6 |
|
.B rcollate |
| 7 |
|
[ |
| 9 |
|
][ |
| 10 |
|
.B \-w |
| 11 |
|
][ |
| 12 |
< |
.B \-f[afdb][N] |
| 12 |
> |
.B \-c |
| 13 |
|
][ |
| 14 |
+ |
.B \-f{a|f|d|b}[N] |
| 15 |
+ |
][ |
| 16 |
|
.B \-t |
| 17 |
|
][ |
| 18 |
|
.B "\-ic in_col" |
| 44 |
|
for 30 rows by 14 columns. |
| 45 |
|
.I Rcollate |
| 46 |
|
can also reorder the input into nested blocks by continuing the output size |
| 47 |
< |
string, "3x10X7x2" would order output data with a 3x10 super-array of 7x2 |
| 48 |
< |
subblocks. |
| 49 |
< |
This is a convenient way to visualize tensor data. |
| 47 |
> |
string. |
| 48 |
> |
For example, "3x10X7x2" would order output data with a 3x10 super-array of |
| 49 |
> |
7x2 subblocks. |
| 50 |
> |
This type of block hierarchy is convenient for visualizing tensor data. |
| 51 |
|
.PP |
| 52 |
|
By default, the file is assumed to include an information header, which |
| 53 |
|
is copied to the standard output along with the command name. |
| 63 |
|
.I \-w |
| 64 |
|
option turns off non-fatal warning messages, such as unexpected EOD. |
| 65 |
|
.PP |
| 66 |
+ |
Normally, |
| 67 |
+ |
.I rcollate |
| 68 |
+ |
detects whether any transformation is actually taking place, and will |
| 69 |
+ |
reproduce the data verbatim if the input size and shape should be unaltered. |
| 70 |
+ |
The |
| 71 |
+ |
.I \-c |
| 72 |
+ |
opiton forces the operation to proceed, even if it appears to be a no-op, |
| 73 |
+ |
which can be useful to correct a misshapen input matrix or check that |
| 74 |
+ |
the data is the proper size and formatted correctly (in the case of ASCII input). |
| 75 |
+ |
.PP |
| 76 |
|
The input format is assumed to be ASCII, with three white-space separated words |
| 77 |
|
(typically numbers) in each record. |
| 78 |
|
A different input format may be specified with the |
| 101 |
|
would all be equivalent. |
| 102 |
|
Note that the lack of row separators in binary files means that |
| 103 |
|
.I rcollate |
| 104 |
< |
does not actually do anything for binary files unless the transpose |
| 105 |
< |
option is given, also. |
| 104 |
> |
does not actually do anything for binary files unless the data is being |
| 105 |
> |
re-ordered. |
| 106 |
|
.PP |
| 107 |
|
If an input header is present, it may contain the format, number of components |
| 108 |
|
and matrix dimensions. |
| 117 |
|
The transpose option, |
| 118 |
|
.I \-t |
| 119 |
|
swaps rows and columns on the input. |
| 120 |
< |
For binary files, the user must specify at least one input or output |
| 121 |
< |
dimension to define the matrix size. |
| 120 |
> |
For binary files with no header information, the user must |
| 121 |
> |
specify at least one input or output dimension to define the matrix size. |
| 122 |
|
For ASCII files, |
| 123 |
|
.I rcollate |
| 124 |
|
will automatically determine the number of columns based on the |
| 125 |
|
position of the first EOL (end-of-line) character, and the number |
| 126 |
|
of rows based on the total count of records in the file. |
| 127 |
|
The user may override these determinations, allowing the matrix to |
| 128 |
< |
be resized as well as transposed. |
| 129 |
< |
If input and output dimensions are given, the number of input rows |
| 130 |
< |
must equal the number of output columns, |
| 128 |
> |
be resized or re-ordered as well as transposed. |
| 129 |
> |
If input and output dimensions are given and there is no block re-ordering, |
| 130 |
> |
the number of input rows must equal the number of output columns, |
| 131 |
|
and the number of input columns must equal the number of output rows. |
| 119 |
– |
For large transpose operations on Unix systems, it is most efficient |
| 120 |
– |
to specify the input file on the command line, rather than reading |
| 121 |
– |
from the standard input, since |
| 122 |
– |
.I rcollate |
| 123 |
– |
can map the file directly into virtual memory. |
| 132 |
|
If the |
| 133 |
|
.I \-o |
| 134 |
|
option is also given with multiple block levels, the transpose operation |
| 135 |
< |
will logically precede the reblocking operation, regardless of the order |
| 136 |
< |
they are given on the command line. |
| 135 |
> |
will logically precede the re-ordering operation, regardless of their |
| 136 |
> |
position on the command line. |
| 137 |
|
.SH EXAMPLES |
| 138 |
|
To change put 8760 color triplets per row in a matrix with no header: |
| 139 |
|
.IP "" .2i |
| 155 |
|
.SH AUTHOR |
| 156 |
|
Greg Ward |
| 157 |
|
.SH NOTES |
| 158 |
+ |
For large transpose or re-ordering operations on Unix systems, |
| 159 |
+ |
it is most efficient to specify the input file on the command line, |
| 160 |
+ |
rather than reading from the standard input, since |
| 161 |
+ |
.I rcollate |
| 162 |
+ |
can map the file directly into virtual memory. |
| 163 |
+ |
.PP |
| 164 |
|
The |
| 165 |
|
.I rcollate |
| 166 |
|
command is rather inflexible when it comes to output field and record |
| 171 |
|
Output row separtors will always be an EOL, which may differ between systems. |
| 172 |
|
.PP |
| 173 |
|
If no options are given on the command line, or a binary file is specified |
| 174 |
< |
without a transpose, |
| 174 |
> |
without a transpose or re-ordering, |
| 175 |
|
.I rcollate |
| 176 |
|
issues a warning and simply copies its input to its standard output. |
| 177 |
|
.SH "SEE ALSO" |
| 178 |
< |
cnt(1), histo(1), neaten(1), rcalc(1), rlam(1), rmtxop(1), |
| 178 |
> |
cnt(1), histo(1), neaten(1), rcalc(1), rcrop(1), rlam(1), rmtxop(1), |
| 179 |
|
rsplit(1), tabfunc(1), total(1) |