tvecselect(1)

NAME
tvecselect - selects (wt rename) specified tvecs from multiple files

SYNOPSIS
tvecselect [-i infile] [-o outfile] [-# Nf] [-S N nam1 ... namN]
         [-R N nam1 rep1 ...namN repN]  [-s N nam1 ... namN]
         [-r N nam1 rep1 ... namN repN]

DESCRIPTION
tvecselect takes selected tvecs originally from multiple files and puts then into one. It has two modes of operation, global and local. Regardless of mode, tvecselect requires the mandatory flag [-# Nf], where Nf is the number of tvec files that have been concatonated in the input.

If the global option is selected (using -s), tvecselect looks for those names in file order, from first file to last, and takes the first such instance of a name. So, if we are taking two files, the first one of which has two vectors called MFLOP, while the second has one, -s will take MFLOP from the first file's first MFLOP vector. Therefore, if you expect tvecs with repeated names (in either one or multiple files) to be retained, you will need to use the local option (-S, see below).

The -s flag can optionally be coupled with the -r flag, which tells select to rename a series of vectors that have already been selected by -s. For example, -s 2 M MFLOP -r 1 MFLOP MFLOP_QR results in taking two vectors from the specified file stream, but renaming only MFLOP to MFLOP_QR.

Local mode is selected using -S, which tells tvecselect to take possibly different tvecs from each input file. Therefore, in local mode tvecselect expects up to Nf different -S options, each of which provides the number of tvecs to take from the respective tvec input. If the number of -S options is less than Nf, any remaining files will be completely ignored. If there are multiple tvecs with the same name that is given to -S, all such tvecs are selected.

To rename tvecs in local mode, the -R flag is used. If -R appears only once, it means that we are renaming only vectors in the first file. Therefore, in order to rename vectors only in the second input file, -R 0 must be specified before our second input file's -R, to indicate no tvec is renamed from the first input file. Renaming multiple vectors with the same name will work as long as the -R list reflects the file order of the tvecs. Therefore, assuming the tvec named MFLOP is repeated twice in the same file, the arguments -S 2 M MFLOP -R 2 MFLOP LU_MF MFLOP QR_MF will result in the MFLOP tvec that comes first in the file being renamed to LU_MF, while the second tvec's name is changed to QR_MF.

OPTIONS

-i infile
    Take input from infile, rather than stdin.

-o outfile
    Write tvecs to outfile, rather than stdout.

-# Nf
    The number of tvec files concatonated in input.

-S N nam1 ... namN
    tvec namelist to take from each respective file. -S should appear Nf or less times, can optionally be combined with -R, and may not used with either -s or -r.

-R N nam1 rep1 ... namN repN
    Vectors with names namI are replaced with the associated repI string. -R can be used with -S, but not -s or -r. -R can legally appear 0 to Nf times when -S is used, with each -R renaming tvecs for the associated tvec input file. N may be supplied as 0, indicating no renaming for a particular file.

-s N nam1 ... namN
    Name of tvecs that are looked for in all files. Should appear only once in tvecselect's arguments, and cannot be mixed with -R or -S.

-r N nam1 rep1 ... namN repN
    Vectors with names namI are replaced with associated repI string. Should appear only once in tvecselect's arguments, and cannot be mixed with -R or -S.

EXAMPLE
The following are roughly equivalent:

    cat lu.tv QR.tv | \
       tvecselect -# 2 -S 2 N MFLOP_LU -R 1 MFLOP_LU LU \
                  -S 1 MFLOP_QR -R 1 MFLOP_QR QR
    cat lu.tv QR.tv | \
        tvecselect -# 2 -s 3 N MFLOP_LU MFLOP_QR \
                        -r 2 MFLOP_LU LU MFLOP_QR QR

BUGS
http://math-atlas.sourceforge.net/faq.html#help

SEE ALSO
atltvecs(7) tvecget(1) tvecunify() tveccat(1) tvecselect(1) tvecratio(1) tvecjoin(1) tvecscale(1) tvecreduce(1) tvecrename(1) tvecprint(1)

AUTHOR
Md Rakib Hasan