| 618 | /******************************************************************************/ |
| 619 | |
| 620 | void dgesl ( double a[], int lda, int n, int ipvt[], double b[], int job ) |
| 621 | |
| 622 | /******************************************************************************/ |
| 623 | /* |
| 624 | Purpose: |
| 625 | |
| 626 | DGESL solves a real general linear system A * X = B. |
| 627 | |
| 628 | Discussion: |
| 629 | |
| 630 | DGESL can solve either of the systems A * X = B or A' * X = B. |
| 631 | |
| 632 | The system matrix must have been factored by DGECO or DGEFA. |
| 633 | |
| 634 | A division by zero will occur if the input factor contains a |
| 635 | zero on the diagonal. Technically this indicates singularity |
| 636 | but it is often caused by improper arguments or improper |
| 637 | setting of LDA. It will not occur if the subroutines are |
| 638 | called correctly and if DGECO has set 0.0 < RCOND |
| 639 | or DGEFA has set INFO == 0. |
| 640 | |
| 641 | Modified: |
| 642 | |
| 643 | 16 May 2005 |
| 644 | |
| 645 | Author: |
| 646 | |
| 647 | C version by John Burkardt. |
| 648 | |
| 649 | Reference: |
| 650 | |
| 651 | Jack Dongarra, Cleve Moler, Jim Bunch and Pete Stewart, |
| 652 | LINPACK User's Guide, |
| 653 | SIAM, (Society for Industrial and Applied Mathematics), |
| 654 | 3600 University City Science Center, |
| 655 | Philadelphia, PA, 19104-2688. |
| 656 | ISBN 0-89871-172-X |
| 657 | |
| 658 | Parameters: |
| 659 | |
| 660 | Input, double A[LDA*N], the output from DGECO or DGEFA. |
| 661 | |
| 662 | Input, int LDA, the leading dimension of A. |
| 663 | |
| 664 | Input, int N, the order of the matrix A. |
| 665 | |
| 666 | Input, int IPVT[N], the pivot vector from DGECO or DGEFA. |
| 667 | |
| 668 | Input/output, double B[N]. |
| 669 | On input, the right hand side vector. |
| 670 | On output, the solution vector. |
| 671 | |
| 672 | Input, int JOB. |
| 673 | 0, solve A * X = B; |
| 674 | nonzero, solve A' * X = B. |
| 675 | */ |
| 676 | { |
| 677 | int k; |