##### rotmg

###### Prototype

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

    rotmg( Scalar >, Scalar >, Scalar >, const Scalar >,
            VectorSPARAM& sparam );

    rotmg( Scalar >, Scalar >, Scalar >, const Scalar >,
            VectorDPARAM& dparam );

###### Description

`rotmg` (short for TODO) provides a C++ interface to BLAS routines SROTMG and DROTMG. CONSTRUCT THE MODIFIED GIVENS TRANSFORMATION MATRIX H WHICH ZEROS THE SECOND COMPONENT OF THE 2-VECTOR (DSQRT(DD1)DX1,DSQRT(DD2) DY2)**T. WITH DPARAM(1)=DFLAG, H HAS ONE OF THE FOLLOWING FORMS..

DFLAG=-1.D0 DFLAG=0.D0 DFLAG`1.D0 DFLAG`-2.D0

(DH11 DH12) (1.D0 DH12) (DH11 1.D0) (1.D0 0.D0) H=( ) ( ) ( ) ( ) (DH21 DH22), (DH21 1.D0), (-1.D0 DH22), (0.D0 1.D0). LOCATIONS 2-4 OF DPARAM CONTAIN DH11, DH21, DH12, AND DH22 RESPECTIVELY. (VALUES OF 1.D0, -1.D0, OR 0.D0 IMPLIED BY THE VALUE OF DPARAM(1) ARE NOT STORED IN DPARAM.)

THE VALUES OF GAMSQ AND RGAMSQ SET IN THE DATA STATEMENT MAY BE INEXACT. THIS IS OK AS THEY ARE ONLY USED FOR TESTING THE SIZE OF DD1 AND DD2. ALL ACTUAL SCALING OF DATA IS DONE USING GAM.

The selection of the BLAS routine is done during compile-time, and is determined by the type of values contained in type `VectorSPARAM`. The type of values is obtained through the `value_type` meta-function `typename value_type<VectorSPARAM>::type`. Table X below illustrates to which specific routine this dispatching will take place.

Table 1.24. Dispatching of rotmg.

Value type of VectorSPARAM | BLAS routine | CBLAS routine | CUBLAS routine
--- | --- | --- | ---
`float` | SROTMG | cblas_srotmg | cublasSrotmg
`double` | DROTMG | cblas_drotmg | cublasDrotmg

The original routines SROTMG and DROTMG have five arguments, whereas `rotmg` requires five arguments.

Table 1.25. Deduction of arguments of rotmg.

###### Definition

Defined in header `boost/numeric/bindings/blas/level1/rotmg.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/blas/level1/rotmg.hpp>
    using namespace boost::numeric::bindings;

    blas::rotmg( x, y, z );

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files srotmg.f and drotmg.f at Netlib.