larre#

Functions

void slarre(
    const char* range,
    const INT   n,
          f32*  vl,
          f32*  vu,
    const INT   il,
    const INT   iu,
          f32*  D,
          f32*  E,
          f32*  E2,
    const f32   rtol1,
    const f32   rtol2,
    const f32   spltol,
          INT*  nsplit,
          INT*  isplit,
          INT*  m,
          f32*  W,
          f32*  werr,
          f32*  wgap,
          INT*  iblock,
          INT*  indexw,
          f32*  gers,
          f32*  pivmin,
          f32*  work,
          INT*  iwork,
          INT*  info
);
void slarre(const char *range, const INT n, f32 *vl, f32 *vu, const INT il, const INT iu, f32 *D, f32 *E, f32 *E2, const f32 rtol1, const f32 rtol2, const f32 spltol, INT *nsplit, INT *isplit, INT *m, f32 *W, f32 *werr, f32 *wgap, INT *iblock, INT *indexw, f32 *gers, f32 *pivmin, f32 *work, INT *iwork, INT *info)#

To find the desired eigenvalues of a given real symmetric tridiagonal matrix T, SLARRE sets any “small” off-diagonal elements to zero, and for each unreduced block T_i, it finds (a) a suitable shift at one end of the block’s spectrum, (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and (c) eigenvalues of each L_i D_i L_i^T.

The representations and eigenvalues found are then used by SSTEMR to compute the eigenvectors of T. The accuracy varies depending on whether bisection is used to find a few eigenvalues or the dqds algorithm (subroutine SLASQ2) to compute all and then discard any unwanted one. As an added benefit, SLARRE also outputs the n Gerschgorin intervals for the matrices L_i D_i L_i^T.

Parameters

in
range

CHARACTER*1 = ‘A’: (“All”) all eigenvalues will be found. = ‘V’: (“Value”) all eigenvalues in (VL, VU]. = ‘I’: (“Index”) the IL-th through IU-th eigenvalues (0-based) will be found.

in
n

The order of the matrix. N > 0.

inout
vl

If RANGE=’V’, the lower bound for eigenvalues. If RANGE=’I’ or =’A’, computed by the routine.

inout
vu

If RANGE=’V’, the upper bound for eigenvalues. If RANGE=’I’ or =’A’, computed by the routine.

in
il

If RANGE=’I’, the index (0-based) of the smallest eigenvalue to be returned. 0 <= il <= iu <= n-1.

in
iu

If RANGE=’I’, the index (0-based) of the largest eigenvalue to be returned. 0 <= il <= iu <= n-1.

inout
D

Double precision array, dimension (N). On entry, the N diagonal elements of T. On exit, the diagonal elements of D_i.

inout
E

Double precision array, dimension (N). On entry, the first (N-1) subdiagonal elements of T; E[N-1] need not be set. On exit, the subdiagonal elements of L_i. The entries E[ISPLIT[i]], 0 <= i < NSPLIT, contain the base points sigma_i on output.

inout
E2

Double precision array, dimension (N). On entry, the first (N-1) entries contain the SQUARES of the subdiagonal elements of T; E2[N-1] need not be set. On exit, the entries E2[ISPLIT[i]], 0 <= i < NSPLIT, have been set to zero.

in
rtol1

Tolerance for bisection convergence.

in
rtol2

Tolerance for bisection convergence. An interval [LEFT,RIGHT] has converged if RIGHT-LEFT < MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )

in
spltol

The threshold for splitting.

out
nsplit

The number of blocks T splits into. 1 <= NSPLIT <= N.

out
isplit

Integer array, dimension (N). The splitting points (0-based last indices of each block).

out
m

The total number of eigenvalues found.

out
W

Double precision array, dimension (N). The first M elements contain the eigenvalues.

out
werr

Double precision array, dimension (N). The error bound on the corresponding eigenvalue in W.

out
wgap

Double precision array, dimension (N). The separation from the right neighbor eigenvalue in W.

out
iblock

Integer array, dimension (N). Block indices (0-based) for each eigenvalue.

out
indexw

Integer array, dimension (N). Local index (0-based) within block for each eigenvalue.

out
gers

Double precision array, dimension (2*N). The N Gerschgorin intervals: (gers[2*i], gers[2*i+1]).

out
pivmin

The minimum pivot in the Sturm sequence for T.

out
work

Double precision array, dimension (6*N). Workspace.

out
iwork

Integer array, dimension (5*N). Workspace.

out
info

  • = 0: successful exit.

  • > 0: A problem occurred in SLARRE.

  • < 0: One of the called subroutines signaled an internal problem.

  • = -1: Problem in SLARRD.

  • = 2: No base representation could be found in MAXTRY iterations.

  • = -3: Problem in SLARRB when computing the refined root representation for SLASQ2.

  • = -4: Problem in SLARRB when performing bisection on the desired part of the spectrum.

  • = -5: Problem in SLASQ2.

  • = -6: Problem in SLASQ2.

Functions

void dlarre(
    const char* range,
    const INT   n,
          f64*  vl,
          f64*  vu,
    const INT   il,
    const INT   iu,
          f64*  D,
          f64*  E,
          f64*  E2,
    const f64   rtol1,
    const f64   rtol2,
    const f64   spltol,
          INT*  nsplit,
          INT*  isplit,
          INT*  m,
          f64*  W,
          f64*  werr,
          f64*  wgap,
          INT*  iblock,
          INT*  indexw,
          f64*  gers,
          f64*  pivmin,
          f64*  work,
          INT*  iwork,
          INT*  info
);
void dlarre(const char *range, const INT n, f64 *vl, f64 *vu, const INT il, const INT iu, f64 *D, f64 *E, f64 *E2, const f64 rtol1, const f64 rtol2, const f64 spltol, INT *nsplit, INT *isplit, INT *m, f64 *W, f64 *werr, f64 *wgap, INT *iblock, INT *indexw, f64 *gers, f64 *pivmin, f64 *work, INT *iwork, INT *info)#

To find the desired eigenvalues of a given real symmetric tridiagonal matrix T, DLARRE sets any “small” off-diagonal elements to zero, and for each unreduced block T_i, it finds (a) a suitable shift at one end of the block’s spectrum, (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and (c) eigenvalues of each L_i D_i L_i^T.

The representations and eigenvalues found are then used by DSTEMR to compute the eigenvectors of T. The accuracy varies depending on whether bisection is used to find a few eigenvalues or the dqds algorithm (subroutine DLASQ2) to compute all and then discard any unwanted one. As an added benefit, DLARRE also outputs the n Gerschgorin intervals for the matrices L_i D_i L_i^T.

Parameters

in
range

CHARACTER*1 = ‘A’: (“All”) all eigenvalues will be found. = ‘V’: (“Value”) all eigenvalues in (VL, VU]. = ‘I’: (“Index”) the IL-th through IU-th eigenvalues (0-based) will be found.

in
n

The order of the matrix. N > 0.

inout
vl

If RANGE=’V’, the lower bound for eigenvalues. If RANGE=’I’ or =’A’, computed by the routine.

inout
vu

If RANGE=’V’, the upper bound for eigenvalues. If RANGE=’I’ or =’A’, computed by the routine.

in
il

If RANGE=’I’, the index (0-based) of the smallest eigenvalue to be returned. 0 <= il <= iu <= n-1.

in
iu

If RANGE=’I’, the index (0-based) of the largest eigenvalue to be returned. 0 <= il <= iu <= n-1.

inout
D

Double precision array, dimension (N). On entry, the N diagonal elements of T. On exit, the diagonal elements of D_i.

inout
E

Double precision array, dimension (N). On entry, the first (N-1) subdiagonal elements of T; E[N-1] need not be set. On exit, the subdiagonal elements of L_i. The entries E[ISPLIT[i]], 0 <= i < NSPLIT, contain the base points sigma_i on output.

inout
E2

Double precision array, dimension (N). On entry, the first (N-1) entries contain the SQUARES of the subdiagonal elements of T; E2[N-1] need not be set. On exit, the entries E2[ISPLIT[i]], 0 <= i < NSPLIT, have been set to zero.

in
rtol1

Tolerance for bisection convergence.

in
rtol2

Tolerance for bisection convergence. An interval [LEFT,RIGHT] has converged if RIGHT-LEFT < MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )

in
spltol

The threshold for splitting.

out
nsplit

The number of blocks T splits into. 1 <= NSPLIT <= N.

out
isplit

Integer array, dimension (N). The splitting points (0-based last indices of each block).

out
m

The total number of eigenvalues found.

out
W

Double precision array, dimension (N). The first M elements contain the eigenvalues.

out
werr

Double precision array, dimension (N). The error bound on the corresponding eigenvalue in W.

out
wgap

Double precision array, dimension (N). The separation from the right neighbor eigenvalue in W.

out
iblock

Integer array, dimension (N). Block indices (0-based) for each eigenvalue.

out
indexw

Integer array, dimension (N). Local index (0-based) within block for each eigenvalue.

out
gers

Double precision array, dimension (2*N). The N Gerschgorin intervals: (gers[2*i], gers[2*i+1]).

out
pivmin

The minimum pivot in the Sturm sequence for T.

out
work

Double precision array, dimension (6*N). Workspace.

out
iwork

Integer array, dimension (5*N). Workspace.

out
info

  • = 0: successful exit.

  • > 0: A problem occurred in DLARRE.

  • < 0: One of the called subroutines signaled an internal problem.

  • = -1: Problem in DLARRD.

  • = 2: No base representation could be found in MAXTRY iterations.

  • = -3: Problem in DLARRB when computing the refined root representation for DLASQ2.

  • = -4: Problem in DLARRB when performing bisection on the desired part of the spectrum.

  • = -5: Problem in DLASQ2.

  • = -6: Problem in DLASQ2.