##### tgsen

###### Prototype

There are two prototypes of `tgsen` available, please see below.

    tgsen( const int_t ijob, const fortran_bool_t wantq,
            const fortran_bool_t wantz, const VectorSELECT& select, MatrixA& a,
            MatrixB& b, VectorALPHAR& alphar, VectorALPHAI& alphai,
            VectorBETA& beta, MatrixQ& q, MatrixZ& z, int_t& m,
            Scalar >, Scalar >, VectorDIF& dif );

    tgsen( const int_t ijob, const fortran_bool_t wantq,
            const fortran_bool_t wantz, const VectorSELECT& select, MatrixA& a,
            MatrixB& b, VectorALPHA& alpha, VectorBETA& beta, MatrixQ& q,
            MatrixZ& z, int_t& m, Scalar >, Scalar >, VectorDIF& dif );

###### Description

`tgsen` (short for $FRIENDLY_NAME) provides a C++ interface to LAPACK routines STGSEN, DTGSEN, CTGSEN, and ZTGSEN. `tgsen` reorders the generalized Schur decomposition of a complex matrix pair (A, B) (in terms of an unitary equivalence trans- formation Q' * (A, B) * Z), so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the pair (A,B). The leading columns of Q and Z form unitary bases of the corresponding left and right eigenspaces (deflating subspaces). (A, B) must be in generalized Schur canonical form, that is, A and B are both upper triangular.

`tgsen` also computes the generalized eigenvalues

w(j)= ALPHA(j) / BETA(j)

of the reordered matrix pair (A, B).

Optionally, the routine computes estimates of reciprocal condition numbers for eigenvalues and eigenspaces. These are Difu[(A11,B11), (A22,B22)] and Difl[(A11,B11), (A22,B22)], i.e. the separation(s) between the matrix pairs (A11, B11) and (A22,B22) that correspond to the selected cluster and the eigenvalues outside the cluster, resp., and norms of "projections" onto left and right eigenspaces w.r.t. the selected cluster in the (1,1)-block.

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

Table 1.336. Dispatching of tgsen

Value type of VectorSELECT | LAPACK routine
--- | ---
`float` | STGSEN
`double` | DTGSEN
`complex<float>` | CTGSEN
`complex<double>` | ZTGSEN

###### Definition

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

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

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files stgsen.f, dtgsen.f, ctgsen.f, and ztgsen.f at Netlib.