CMSIS-DSP
CMSIS DSP Software Library
|
Functions | |
arm_status | arm_mat_qr_f16 (const arm_matrix_instance_f16 *pSrc, const float16_t threshold, arm_matrix_instance_f16 *pOutR, arm_matrix_instance_f16 *pOutQ, float16_t *pOutTau, float16_t *pTmpA, float16_t *pTmpB) |
QR decomposition of a m x n half floating point matrix with m >= n. More... | |
arm_status | arm_mat_qr_f32 (const arm_matrix_instance_f32 *pSrc, const float32_t threshold, arm_matrix_instance_f32 *pOutR, arm_matrix_instance_f32 *pOutQ, float32_t *pOutTau, float32_t *pTmpA, float32_t *pTmpB) |
QR decomposition of a m x n floating point matrix with m >= n. More... | |
arm_status | arm_mat_qr_f64 (const arm_matrix_instance_f64 *pSrc, const float64_t threshold, arm_matrix_instance_f64 *pOutR, arm_matrix_instance_f64 *pOutQ, float64_t *pOutTau, float64_t *pTmpA, float64_t *pTmpB) |
QR decomposition of a m x n double floating point matrix with m >= n. More... | |
Computes the QR decomposition of a matrix M using Householder algorithm.
\[ M = Q R \]
where Q is an orthogonal matrix and R is upper triangular. No pivoting strategy is used.
The returned value for R is using a format a bit similar to LAPACK : it is not just containing the matrix R but also the Householder reflectors.
The function is also returning a vector \(\tau\) that is containing the scaling factor for the reflectors.
Returned value R has the structure:
\[ \begin{pmatrix} r_{11} & r_{12} & \dots & r_{1n} \\ v_{12} & r_{22} & \dots & r_{2n} \\ v_{13} & v_{22} & \dots & r_{3n} \\ \vdots & \vdots & \ddots & \vdots \\ v_{1m} & v_{2(m-1)} & \dots & r_{mn} \\ \end{pmatrix} \]
where
\[ v_1 = \begin{pmatrix} 1 \\ v_{12} \\ \vdots \\ v_{1m} \\ \end{pmatrix} \]
is the first householder reflector.
The Householder Matrix is given by \(H_1\)
\[ H_1 = I - \tau_1 v_1 v_1^T \]
The Matrix Q is the product of the Householder matrices:
\[ Q = H_1 H_2 \dots H_n \]
The computation of the matrix Q by this function is optional.
And the matrix R, would be the returned value R without the householder reflectors:
\[ \begin{pmatrix} r_{11} & r_{12} & \dots & r_{1n} \\ 0 & r_{22} & \dots & r_{2n} \\ 0 & 0 & \dots & r_{3n} \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \dots & r_{mn} \\ \end{pmatrix} \]
arm_status arm_mat_qr_f16 | ( | const arm_matrix_instance_f16 * | pSrc, |
const float16_t | threshold, | ||
arm_matrix_instance_f16 * | pOutR, | ||
arm_matrix_instance_f16 * | pOutQ, | ||
float16_t * | pOutTau, | ||
float16_t * | pTmpA, | ||
float16_t * | pTmpB | ||
) |
QR decomposition of a m x n floating point matrix with m >= n.
[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[in] | threshold | norm2 threshold. |
[out] | pOutR | points to output R matrix structure of dimension m x n |
[out] | pOutQ | points to output Q matrix structure of dimension m x m (can be NULL) |
[out] | pOutTau | points to Householder scaling factors of dimension n |
[in,out] | pTmpA | points to a temporary vector of dimension m. |
[in,out] | pTmpB | points to a temporary vector of dimension m. |
arm_status arm_mat_qr_f32 | ( | const arm_matrix_instance_f32 * | pSrc, |
const float32_t | threshold, | ||
arm_matrix_instance_f32 * | pOutR, | ||
arm_matrix_instance_f32 * | pOutQ, | ||
float32_t * | pOutTau, | ||
float32_t * | pTmpA, | ||
float32_t * | pTmpB | ||
) |
[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[in] | threshold | norm2 threshold. |
[out] | pOutR | points to output R matrix structure of dimension m x n |
[out] | pOutQ | points to output Q matrix structure of dimension m x m (can be NULL) |
[out] | pOutTau | points to Householder scaling factors of dimension n |
[in,out] | pTmpA | points to a temporary vector of dimension m. |
[in,out] | pTmpB | points to a temporary vector of dimension m. |
arm_status arm_mat_qr_f64 | ( | const arm_matrix_instance_f64 * | pSrc, |
const float64_t | threshold, | ||
arm_matrix_instance_f64 * | pOutR, | ||
arm_matrix_instance_f64 * | pOutQ, | ||
float64_t * | pOutTau, | ||
float64_t * | pTmpA, | ||
float64_t * | pTmpB | ||
) |
QR decomposition of a m x n floating point matrix with m >= n.
[in] | pSrc | points to input matrix structure. The source matrix is modified by the function. |
[in] | threshold | norm2 threshold. |
[out] | pOutR | points to output R matrix structure of dimension m x n |
[out] | pOutQ | points to output Q matrix structure of dimension m x m (can be NULL) |
[out] | pOutTau | points to Householder scaling factors of dimension n |
[in,out] | pTmpA | points to a temporary vector of dimension m. |
[in,out] | pTmpB | points to a temporary vector of dimension m. |