Collaboration diagram for DSPF_dp_qrd_solver:
Functions | |
int | DSPF_dp_qrd_solver (const int Nrows, const int Ncols, double *restrict Q, double *restrict R, double *restrict b, double *restrict y, double *restrict x) |
int | DSPF_dp_qrd_solver_cmplx (const int Nrows, const int Ncols, double *restrict Q, double *restrict R, double *restrict b, double *restrict y, double *restrict x) |
int DSPF_dp_qrd_solver | ( | const int | Nrows, | |
const int | Ncols, | |||
double *restrict | Q, | |||
double *restrict | R, | |||
double *restrict | b, | |||
double *restrict | y, | |||
double *restrict | x | |||
) |
This function solves the system of linear equations A*x=b for x using the inputs produced by DSPF_dp_qrd where A*x=Q*R*x=b. The following procedure is performed.
1. Use matrix multiplication to generate y: y = transpose(Q)*b
2. Use backward substitution for solve for x: x = inv(R)*y
The values stored in the matrices are assumed to be double precision floating point values. This code is suitable for dense matrices. No optimizations are made for sparse matrices.
Nrows | = number of rows in matrix A | |
Ncols | = number of columns in matrix A | |
Q | = pointer to lower triangular matrix Q[Nrows*Nrows] | |
R | = pointer to upper triangular matrix R[Nrows*Ncols] | |
b | = pointer to vector b[Nrows] | |
y | = pointer to temporary vector y[Nrows] | |
x | = pointer to final solver output vector x[Ncols] |
int DSPF_dp_qrd_solver_cmplx | ( | const int | Nrows, | |
const int | Ncols, | |||
double *restrict | Q, | |||
double *restrict | R, | |||
double *restrict | b, | |||
double *restrict | y, | |||
double *restrict | x | |||
) |
This function solves the system of linear equations A*x=b for x using the inputs produced by DSPF_dp_qrd where A*x=Q*R*x=b. The following procedure is performed.
1. Use matrix multiplication to generate y: y = transpose(Q)*b
2. Use backward substitution for solve for x: x = inv(R)*y
The values stored in the matrices are assumed to be double precision floating point values. This code is suitable for dense matrices. No optimizations are made for sparse matrices.
Nrows | = number of rows in matrix A | |
Ncols | = number of columns in matrix A | |
Q | = pointer to lower triangular matrix Q[Nrows*2*Nrows] | |
R | = pointer to upper triangular matrix R[Nrows*2*Ncols] | |
b | = pointer to vector b[2*Nrows] | |
y | = pointer to temporary vector y[2*Nrows] | |
x | = pointer to final solver output vector x[2*Ncols] |