##### gegv

###### Prototype

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

    gegv( const char jobvl, const char jobvr, MatrixA& a, MatrixB& b,
            VectorALPHAR& alphar, VectorALPHAI& alphai, VectorBETA& beta,
            MatrixVL& vl, MatrixVR& vr );

    gegv( const char jobvl, const char jobvr, MatrixA& a, MatrixB& b,
            VectorALPHA& alpha, VectorBETA& beta, MatrixVL& vl, MatrixVR& vr );

###### Description

`gegv` (short for $FRIENDLY_NAME) provides a C++ interface to LAPACK routines SGEGV, DGEGV, CGEGV, and ZGEGV. This routine is deprecated and has been replaced by routine ZGGEV.

`gegv` computes the eigenvalues and, optionally, the left and/or right eigenvectors of a complex matrix pair (A,B). Given two square matrices A and B, the generalized nonsymmetric eigenvalue problem (GNEP) is to find the eigenvalues lambda and corresponding (non-zero) eigenvectors x such that A*x = lambda*B*x.

An alternate form is to find the eigenvalues mu and corresponding eigenvectors y such that mu*A*y = B*y.

These two forms are equivalent with mu = 1/lambda and x = y if neither lambda nor mu is zero. In order to deal with the case that lambda or mu is zero or small, two values alpha and beta are returned for each eigenvalue, such that lambda = alpha/beta and mu = beta/alpha.

The vectors x and y in the above equations are right eigenvectors of the matrix pair (A,B). Vectors u and v satisfying u**H*A = lambdau*H*B or muvH*A = v*H*B are left eigenvectors of (A,B).

Note: this routine performs "full balancing" on A and B -- see "Further Details", below.

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.101. Dispatching of gegv

Value type of MatrixA | LAPACK routine
--- | ---
`float` | SGEGV
`double` | DGEGV
`complex<float>` | CGEGV
`complex<double>` | ZGEGV

###### Definition

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

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

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files sgegv.f, dgegv.f, cgegv.f, and zgegv.f at Netlib.