# DSPF_dp_lud_solver [Matrix]

Collaboration diagram for DSPF_dp_lud_solver:

## Detailed Description

 int DSPF_dp_lud_solver (const int order, unsigned short *restrict P, double *restrict L, double *restrict U, double *restrict b, double *restrict b_mod, double *restrict y, double *restrict x)

## Function Documentation

 int DSPF_dp_lud_solver ( const int order, unsigned short *restrict P, double *restrict L, double *restrict U, double *restrict b, double *restrict b_mod, 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_lud where A*x=transpose(P)*L*U*x=b. The following procedure is performed.

1. Modify b using permutation matrix: b_mod = L*U*x = P*b
2. Use forward substitution to solve for y: y = U*x = inv(L)*b_mod
3. Use backward substitution for solve for x: x = inv(U)*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.

Parameters:
 order = order of matrix A P = pointer to permutation matrix P[order*order] L = pointer to lower triangular matrix L[order*order] U = pointer to upper triangular matrix U[order*order] b = pointer to vector b[order] b_mod = pointer to modified vector b_mod[order] y = pointer to temporary vector y[order] x = pointer to final solver output vector x[order]
Algorithm:
DSPF_dp_lud_solver.c is the natural C equivalent of the optimized intrinsic C code without restrictions. Note that the intrinsic C code is optimized and restrictions may apply.
Assumptions:
The arrays P, L, U, and inv_A are stored in distinct arrays. In-place processing is not done.
Implementation Notes:
Interruptibility : The code is interruptible.
Endian support : supports both Little and Big endian modes.