typedef enum _vsip_mat_side { VSIP_MAT_LSIDE = 0, VSIP_MAT_RSIDE = 1 } vsip_mat_side; int vsip_qrdsolr_f(const vsip_qr_f *qrd, vsip_mat_op OpR, vsip_scalar_f alpha, const vsip_mview_f *xb); int vsip_cqrdsolr_f(const vsip_cqr_f *qrd, vsip_mat_op OpR, vsip_cscalar_f alpha, const vsip_cmview_f *xb);
This function solves linear systems using a QR decomposition where the
matrix has been modified by a specified
operation. It provides more flexibility than vsip_dqrsol_p by allowing operations on the
matrix before solving the
system.
The function solves systems of the form:

where
can be
,
, or
(conjugate transpose, though for real matrices this is equivalent to
).
const vsip_dqr_p* qrd: Pointer to the QR decomposition object containing a previously computed decomposition.
vsip_mat_op OpR: Operation to perform on
:
VSIP_MAT_NTRANS: Use
as is
VSIP_MAT_TRANS: Use the transpose of
,
VSIP_MAT_HERM: Use the conjugate transpose of
, 
vsip_dscalar_p alpha: Scalar multiplier for the right-hand side.
const vsip_dmview_p* xb: On input, contains the right-hand side
. On output, contains the solution
.
Returns 0 on success.
Returns a non-zero value on error.
The QR decomposition must have been previously computed using vsip_dqrd_p .
The input matrix
must have appropriate dimensions for the operation:
For VSIP_MAT_NTRANS:
should be
where
is
For VSIP_MAT_TRANS or VSIP_MAT_HERM:
should be
where
is 
The input matrix
is overwritten with the solution.
The scalar
allows scaling of the right-hand side without modifying the input matrix.
This function is more flexible than vsip_dqrsol_p but requires more understanding of the underlying linear algebra.
The QR object must have been created with an option that saves the
matrix to use this function.