par2lar

Functions

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

par2lar [ option ] [ infile ]

  • -m int

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

  • infile str

    • double-type PARCOR coefficients

  • stdout

    • double-type LAR coefficients

The below example converts PARCOR coefficients into LAR coefficients:

par2lar < data.rc > data.lar

The converted LAR coefficients can be reverted by

lar2par < data.lar > data.rc
Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

lar2par

class ParcorCoefficientsToLogAreaRatio

Convert PARCOR coefficients to log area ratio (LAR).

The input is the \(M\)-th order PARCOR coefficients:

\[ \begin{array}{cccc} K, & k(1), & \ldots, & k(M), \end{array} \]
and the output is the \(M\)-th order LAR coefficients:
\[ \begin{array}{cccc} K, & g(1), & \ldots, & g(M), \end{array} \]
where \(K\) is the gain. The conversion is performed by
\[\begin{split}\begin{eqnarray} g(m) &=& \frac{1 + k(m)}{1 - k(m)} \\ &=& 2\tanh^{-1}(k(m)). \end{eqnarray}\end{split}\]

Public Functions

explicit ParcorCoefficientsToLogAreaRatio(int num_order)
Parameters:

num_order[in] Order of coefficients.

inline int GetNumOrder() const
Returns:

Order of coefficients.

inline bool IsValid() const
Returns:

True if this object is valid.

bool Run(const std::vector<double> &parcor_coefficients, std::vector<double> *log_area_ratio) const
Parameters:
  • parcor_coefficients[in] \(M\)-th order PARCOR coefficients.

  • log_area_ratio[out] \(M\)-th order LAR coefficients.

Returns:

True on success, false on failure.

bool Run(std::vector<double> *input_and_output) const
Parameters:

input_and_output[inout] \(M\)-th order coefficients.

Returns:

True on success, false on failure.