larfg#

Functions

void slarfg(
    const INT  n,
          f32* alpha,
          f32* x,
    const INT  incx,
          f32* tau
);
void slarfg(const INT n, f32 *alpha, f32 *x, const INT incx, f32 *tau)#

SLARFG generates a real elementary reflector H of order n, such that.

  H * ( alpha ) = ( beta ),   H**T * H = I.
      (   x   )   (   0  )
where alpha and beta are scalars, and x is an (n-1)-element real vector. H is represented in the form
  H = I - tau * ( 1 ) * ( 1 v**T ),
                ( v )
where tau is a real scalar and v is a real (n-1)-element vector.

If the elements of x are all zero, then tau = 0 and H is taken to be the unit matrix.

Otherwise 1 <= tau <= 2.

Parameters

in
n

The order of the elementary reflector.

inout
alpha

On entry, the value alpha. On exit, it is overwritten with the value beta.

inout
x

Double precision array, dimension (1+(n-2)*abs(incx)). On entry, the vector x. On exit, it is overwritten with the vector v.

in
incx

The increment between elements of x. incx > 0.

out
tau

The value tau.

Functions

void dlarfg(
    const INT  n,
          f64* alpha,
          f64* x,
    const INT  incx,
          f64* tau
);
void dlarfg(const INT n, f64 *alpha, f64 *x, const INT incx, f64 *tau)#

DLARFG generates a real elementary reflector H of order n, such that.

  H * ( alpha ) = ( beta ),   H**T * H = I.
      (   x   )   (   0  )
where alpha and beta are scalars, and x is an (n-1)-element real vector. H is represented in the form
  H = I - tau * ( 1 ) * ( 1 v**T ),
                ( v )
where tau is a real scalar and v is a real (n-1)-element vector.

If the elements of x are all zero, then tau = 0 and H is taken to be the unit matrix.

Otherwise 1 <= tau <= 2.

Parameters

in
n

The order of the elementary reflector.

inout
alpha

On entry, the value alpha. On exit, it is overwritten with the value beta.

inout
x

Double precision array, dimension (1+(n-2)*abs(incx)). On entry, the vector x. On exit, it is overwritten with the vector v.

in
incx

The increment between elements of x. incx > 0.

out
tau

The value tau.

Functions

void clarfg(
    const INT  n,
          c64* alpha,
          c64* x,
    const INT  incx,
          c64* tau
);
void clarfg(const INT n, c64 *alpha, c64 *x, const INT incx, c64 *tau)#

CLARFG generates a complex elementary reflector H of order n, such that.

  H**H * ( alpha ) = ( beta ),   H**H * H = I.
         (   x   )   (   0  )
where alpha and beta are scalars, with beta real, and x is an (n-1)-element complex vector. H is represented in the form
  H = I - tau * ( 1 ) * ( 1 v**H ) ,
                ( v )
where tau is a complex scalar and v is a complex (n-1)-element vector. Note that H is not hermitian.

If the elements of x are all zero and alpha is real, then tau = 0 and H is taken to be the unit matrix.

Otherwise 1 <= real(tau) <= 2 and abs(tau-1) <= 1 .

Parameters

in
n

The order of the elementary reflector.

inout
alpha

On entry, the value alpha. On exit, it is overwritten with the value beta.

inout
x

Single complex array, dimension (1+(n-2)*abs(incx)). On entry, the vector x. On exit, it is overwritten with the vector v.

in
incx

The increment between elements of x. incx > 0.

out
tau

The value tau.

Functions

void zlarfg(
    const INT   n,
          c128* alpha,
          c128* x,
    const INT   incx,
          c128* tau
);
void zlarfg(const INT n, c128 *alpha, c128 *x, const INT incx, c128 *tau)#

ZLARFG generates a complex elementary reflector H of order n, such that.

  H**H * ( alpha ) = ( beta ),   H**H * H = I.
         (   x   )   (   0  )
where alpha and beta are scalars, with beta real, and x is an (n-1)-element complex vector. H is represented in the form
  H = I - tau * ( 1 ) * ( 1 v**H ) ,
                ( v )
where tau is a complex scalar and v is a complex (n-1)-element vector. Note that H is not hermitian.

If the elements of x are all zero and alpha is real, then tau = 0 and H is taken to be the unit matrix.

Otherwise 1 <= real(tau) <= 2 and abs(tau-1) <= 1 .

Parameters

in
n

The order of the elementary reflector.

inout
alpha

On entry, the value alpha. On exit, it is overwritten with the value beta.

inout
x

Double complex array, dimension (1+(n-2)*abs(incx)). On entry, the vector x. On exit, it is overwritten with the vector v.

in
incx

The increment between elements of x. incx > 0.

out
tau

The value tau.