--- ray/doc/man/man1/rcollate.1 2019/11/08 05:39:05 1.10 +++ ray/doc/man/man1/rcollate.1 2022/03/15 00:25:50 1.15 @@ -1,7 +1,7 @@ -.\" RCSid "$Id: rcollate.1,v 1.10 2019/11/08 05:39:05 greg Exp $" -.TH RCOLLATE 1 7/8/97 RADIANCE +.\" RCSid "$Id: rcollate.1,v 1.15 2022/03/15 00:25:50 greg Exp $" +.TH RCOLLATE 1 9/5/2013 RADIANCE .SH NAME -rcollate - resize or transpose matrix data +rcollate - resize or re-order matrix data .SH SYNOPSIS .B rcollate [ @@ -9,8 +9,10 @@ rcollate - resize or transpose matrix data ][ .B \-w ][ -.B \-f[afdb][N] +.B \-c ][ +.B \-f{a|f|d|b}[N] +][ .B \-t ][ .B "\-ic in_col" @@ -42,9 +44,10 @@ option with the number of rows and columns separated b for 30 rows by 14 columns. .I Rcollate can also reorder the input into nested blocks by continuing the output size -string, "3x10X7x2" would order output data with a 3x10 super-array of 7x2 -subblocks. -This is a convenient way to visualize tensor data. +string. +For example, "3x10X7x2" would order output data with a 3x10 super-array of +7x2 subblocks. +This type of block hierarchy is convenient for visualizing tensor data. .PP By default, the file is assumed to include an information header, which is copied to the standard output along with the command name. @@ -60,6 +63,16 @@ The .I \-w option turns off non-fatal warning messages, such as unexpected EOD. .PP +Normally, +.I rcollate +detects whether any transformation is actually taking place, and will +reproduce the data verbatim if the input size and shape should be unaltered. +The +.I \-c +opiton forces the operation to proceed, even if it appears to be a no-op, +which can be useful to correct a misshapen input matrix or check that +the data is the proper size. +.PP The input format is assumed to be ASCII, with three white-space separated words (typically numbers) in each record. A different input format may be specified with the @@ -88,8 +101,8 @@ and would all be equivalent. Note that the lack of row separators in binary files means that .I rcollate -does not actually do anything for binary files unless the transpose -option is given, also. +does not actually do anything for binary files unless the data is being +re-ordered. .PP If an input header is present, it may contain the format, number of components and matrix dimensions. @@ -104,27 +117,23 @@ information if provided. The transpose option, .I \-t swaps rows and columns on the input. -For binary files, the user must specify at least one input or output -dimension to define the matrix size. +For binary files with no header information, the user must +specify at least one input or output dimension to define the matrix size. For ASCII files, .I rcollate will automatically determine the number of columns based on the position of the first EOL (end-of-line) character, and the number of rows based on the total count of records in the file. The user may override these determinations, allowing the matrix to -be resized as well as transposed. -If input and output dimensions are given, the number of input rows -must equal the number of output columns, +be resized or re-ordered as well as transposed. +If input and output dimensions are given and there is no block re-ordering, +the number of input rows must equal the number of output columns, and the number of input columns must equal the number of output rows. -For large transpose operations on Unix systems, it is most efficient -to specify the input file on the command line, rather than reading -from the standard input, since -.I rcollate -can map the file directly into virtual memory. If the .I \-o option is also given with multiple block levels, the transpose operation -will logically precede the reblocking operation. +will logically precede the re-ordering operation, regardless of their +position on the command line. .SH EXAMPLES To change put 8760 color triplets per row in a matrix with no header: .IP "" .2i @@ -146,6 +155,12 @@ rcollate -o 64x64X32x32 s-c_bsdf.mtx | rmtxop -fc - > .SH AUTHOR Greg Ward .SH NOTES +For large transpose or re-ordering operations on Unix systems, +it is most efficient to specify the input file on the command line, +rather than reading from the standard input, since +.I rcollate +can map the file directly into virtual memory. +.PP The .I rcollate command is rather inflexible when it comes to output field and record @@ -156,9 +171,9 @@ between words and tabs as record separators on output. Output row separtors will always be an EOL, which may differ between systems. .PP If no options are given on the command line, or a binary file is specified -without a transpose, +without a transpose or re-ordering, .I rcollate issues a warning and simply copies its input to its standard output. .SH "SEE ALSO" -cnt(1), histo(1), neaten(1), rcalc(1), rlam(1), rmtxop(1), +cnt(1), histo(1), neaten(1), rcalc(1), rcrop(1), rlam(1), rmtxop(1), rsplit(1), tabfunc(1), total(1)