extract

Functions

int main(int argc, char *argv[])

extract [ option ] idxfile [ infile ]

  • -l int

    • length of vector \((1 \le M + 1)\)

  • -m int

    • order of vector \((0 \le M)\)

  • -i int

    • codebook index \((0 \le j)\)

  • infile str

    • double-type data sequence

  • stdout

    • double-type extracted data sequence

The command takes two input sequence:

\[ \begin{array}{cccc} \boldsymbol{x}(0), & \boldsymbol{x}(1), & \boldsymbol{x}(2), & \ldots, \end{array} \]
and
\[ \begin{array}{cccc} i(0), & i(1), & i(2), & \ldots, \end{array} \]
where \(\boldsymbol{x}(t)\) is an \((M+1)\)-dimensional vector. If \(i(t)\) is the same as the given codebook index \(j\), this command outputs \(\boldsymbol{x}(t)\). An example of the output is
\[ \begin{array}{cccc} \boldsymbol{x}(1), & \boldsymbol{x}(4), & \boldsymbol{x}(5), & \ldots \end{array} \]

The below example extracts 10th order vectors indexed as 0 from data.d.

extract -l 10 -i 0 data.idx < data.d > data.ext
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

lbg msvq imsvq