f07as solves a complex system of linear equations with multiple right-hand sides,
AX=B, ATX=B  or  AHX=B,
where A has been factorized by f07ar.

Syntax

C#
public static void f07as(
	string trans,
	int n,
	int nrhs,
	Complex[,] a,
	int[] ipiv,
	Complex[,] b,
	out int info
)
Visual Basic
Public Shared Sub f07as ( _
	trans As String, _
	n As Integer, _
	nrhs As Integer, _
	a As Complex(,), _
	ipiv As Integer(), _
	b As Complex(,), _
	<OutAttribute> ByRef info As Integer _
)
Visual C++
public:
static void f07as(
	String^ trans, 
	int n, 
	int nrhs, 
	array<Complex,2>^ a, 
	array<int>^ ipiv, 
	array<Complex,2>^ b, 
	[OutAttribute] int% info
)
F#
static member f07as : 
        trans : string * 
        n : int * 
        nrhs : int * 
        a : Complex[,] * 
        ipiv : int[] * 
        b : Complex[,] * 
        info : int byref -> unit 

Parameters

trans
Type: System..::..String
On entry: indicates the form of the equations.
trans="N"
AX=B is solved for X.
trans="T"
ATX=B is solved for X.
trans="C"
AHX=B is solved for X.
Constraint: trans="N", "T" or "C".
n
Type: System..::..Int32
On entry: n, the order of the matrix A.
Constraint: n0.
nrhs
Type: System..::..Int32
On entry: r, the number of right-hand sides.
Constraint: nrhs0.
a
Type: array<NagLibrary..::..Complex,2>[,](,)[,][,]
An array of size [dim1, dim2]
Note: dim1 must satisfy the constraint: dim1max1,n
Note: the second dimension of the array a must be at least max1,n.
On entry: the LU factorization of A, as returned by f07ar.
ipiv
Type: array<System..::..Int32>[]()[][]
An array of size [dim1]
Note: the dimension of the array ipiv must be at least max1,n.
On entry: the pivot indices, as returned by f07ar.
b
Type: array<NagLibrary..::..Complex,2>[,](,)[,][,]
An array of size [dim1, dim2]
Note: dim1 must satisfy the constraint: dim1max1,n
Note: the second dimension of the array b must be at least max1,nrhs.
On entry: the n by r right-hand side matrix B.
On exit: the n by r solution matrix X.
info
Type: System..::..Int32%
On exit: info=0 unless the method detects an error (see [Error Indicators and Warnings]).

Description

f07as is used to solve a complex system of linear equations AX=B, ATX=B or AHX=B, the method must be preceded by a call to f07ar which computes the LU factorization of A as A=PLU. The solution is computed by forward and backward substitution.
If trans="N", the solution is computed by solving PLY=B and then UX=Y.
If trans="T", the solution is computed by solving UTY=B and then LTPTX=Y.
If trans="C", the solution is computed by solving UHY=B and then LHPTX=Y.

References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

Error Indicators and Warnings

Some error messages may refer to parameters that are dropped from this interface (LDA, LDB) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.
ifail=-9000
An error occured, see message report.
ifail=-6000
Invalid Parameters value
ifail=-4000
Invalid dimension for array value
ifail=-8000
Negative dimension for array value
ifail=-6000
Invalid Parameters value
ifail=-6000
Invalid Parameters value

Accuracy

For each right-hand side vector b, the computed solution x is the exact solution of a perturbed system of equations A+Ex=b, where
EcnεPLU,
cn is a modest linear function of n, and ε is the machine precision.
If x^ is the true solution, then the computed solution x satisfies a forward error bound of the form
x-x^xcncondA,xε
where condA,x=A-1Ax/xcondA=A-1AκA.
Note that condA,x can be much smaller than condA, and condAH (which is the same as condAT) can be much larger (or smaller) than condA.
Forward and backward error bounds can be computed by calling (F07AVF not in this release), and an estimate for κA can be obtained by calling (F07AUF not in this release) with norm="I".

Parallelism and Performance

None.

Further Comments

The total number of real floating-point operations is approximately 8n2r.
This method may be followed by a call to (F07AVF not in this release) to refine the solution and return an error estimate.
The real analogue of this method is (F07AEF not in this release).

Example

See Also