##### pteqr

###### Prototype

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

    pteqr( const char compz, VectorD& d, VectorE& e, MatrixZ& z );

###### Description

`pteqr` (short for $FRIENDLY_NAME) provides a C++ interface to LAPACK routines SPTEQR, DPTEQR, CPTEQR, and ZPTEQR. `pteqr` computes all eigenvalues and, optionally, eigenvectors of a symmetric positive definite tridiagonal matrix by first factoring the matrix using DPTTRF and then calling ZBDSQR to compute the singular values of the bidiagonal factor.

This routine computes the eigenvalues of the positive definite tridiagonal matrix to high relative accuracy. This means that if the eigenvalues range over many orders of magnitude in size, then the small eigenvalues and corresponding eigenvectors will be computed more accurately than, for example, with the standard QR method.

The eigenvectors of a full or band positive definite Hermitian matrix can also be found if ZHETRD, ZHPTRD, or ZHBTRD has been used to reduce this matrix to tridiagonal form. (The reduction to tridiagonal form, however, may preclude the possibility of obtaining high relative accuracy in the small eigenvalues of the original matrix, if these eigenvalues range over many orders of magnitude.)

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

Table 1.315. Dispatching of pteqr

Value type of VectorD | LAPACK routine
--- | ---
`float` | SPTEQR
`double` | DPTEQR
`complex<float>` | CPTEQR
`complex<double>` | ZPTEQR

###### Definition

Defined in header `boost/numeric/bindings/lapack/computational/pteqr.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/computational/pteqr.hpp>
    using namespace boost::numeric::bindings;

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

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files spteqr.f, dpteqr.f, cpteqr.f, and zpteqr.f at Netlib.