int vsip_covsol_f(const vsip_vview_f* r, const vsip_vview_f* b, const vsip_vview_f* x); int vsip_ccovsol_f(const vsip_cvview_f* r, const vsip_cvview_f* b, const vsip_cvview_f* x);
This function solves a covariance system of linear equations
, where T is a symmetric positive definite Toeplitz
covariance matrix defined by its first column r, b is the right-hand side vector, and x is the solution vector. The
covariance matrix is a special type of Toeplitz matrix where the first column r completely defines the matrix
structure.
This function is particularly useful in signal processing applications such as linear prediction and Wiener filtering, where covariance matrices frequently appear.
const vsip_dvview_p* r: Pointer to the vector view containing the first column of the covariance matrix (autocorrelation sequence). The length of this vector determines the size of the covariance matrix.
const vsip_dvview_p* b: Pointer to the vector view containing the right-hand side vector.
const vsip_dvview_p* x: Pointer to the vector view where the solution will be stored.
Returns 0 on success.
Returns a non-zero value on error (e.g., if the covariance matrix is singular or not positive definite).
vsip_vview_f *covariance_vector; vsip_vview_f *rhs_vector; vsip_vview_f *solution_vector; int result; // Assuming all vector views have been properly initialized // and covariance_vector contains the autocorrelation sequence result = vsip_covsol_f(covariance_vector, rhs_vector, solution_vector); if (result != 0) { // Handle error (e.g., singular or non-positive definite matrix) }
The covariance matrix is assumed to be symmetric and positive definite.
The length of the covariance vector r should be one more than the length of vectors b and x.
This function uses a Levinson-Durbin recursion algorithm for efficient solution of the covariance system.