##### iter_posv

###### Prototype

There is one prototype of `iter_posv` available, please see below.

    iter_posv( MatrixA& a, const MatrixB& b, MatrixX& x,
            int_t& iter );

###### Description

`iter_posv` (short for $FRIENDLY_NAME) provides a C++ interface to LAPACK routines DSPOSV and ZCPOSV. `iter_posv` computes the solution to a complex system of linear equations A * X = B, where A is an N-by-N Hermitian positive definite matrix and X and B are N-by-NRHS matrices.

`iter_posv` first attempts to factorize the matrix in COMPLEX and use this factorization within an iterative refinement procedure to produce a solution with COMPLEX*16 normwise backward error quality (see below). If the approach fails the method switches to a COMPLEX*16 factorization and solve.

The iterative refinement is not going to be a winning strategy if the ratio COMPLEX performance over COMPLEX*16 performance is too small. A reasonable strategy should take the number of right-hand sides and the size of the matrix into account. This might be done with a call to ILAENV in the future. Up to now, we always try iterative refinement.

The iterative refinement process is stopped if ITER > ITERMAX or for all the RHS we have: RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX where o ITER is the number of the current iteration in the iterative refinement process o RNRM is the infinity-norm of the residual o XNRM is the infinity-norm of the solution o ANRM is the infinity-operator-norm of the matrix A o EPS is the machine epsilon returned by DLAMCH('Epsilon') The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00 respectively.

The selection of the LAPACK routine is done during compile-time, and is determined by the type of values contained in type `MatrixA`. The type of values is obtained through the `value_type` meta-function `typename value_type<MatrixA>::type`. The dispatching table below illustrates to which specific routine the code path will be generated.

Table 1.138. Dispatching of iter_posv

Value type of MatrixA | LAPACK routine
--- | ---
`double` | DSPOSV
`complex<double>` | ZCPOSV

###### Definition

Defined in header `boost/numeric/bindings/lapack/driver/iter_posv.hpp`.

###### Parameters or Requirements on Types

Parameters

MatrixA

  The definition of term 1

MatrixB

  The definition of term 2

MatrixC

  The definition of term 3.

  Definitions may contain paragraphs.

###### Complexity

###### Example

    #include <boost/numeric/bindings/lapack/driver/iter_posv.hpp>
    using namespace boost::numeric::bindings;

    lapack::iter_posv( x, y, z );

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files dsposv.f and zcposv.f at Netlib.