larre(3)
okay so this is larre(3), straight out of the Library Functions Manual, and itβs giving very specific Fortran step-in-stemr energy β¨ buckle up, bestie.
π NAME
larre - larre: step in stemr
β¨ SYNOPSIS
π« Functions
subroutine dlarre (range, n, vl, vu, il, iu, d, e, e2, rtol1, rtol2,
spltol, nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers,
pivmin, work, iwork, info)
subroutine slarre (range, n, vl, vu, il, iu, d, e, e2, rtol1, rtol2,
spltol, nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers,
pivmin, work, iwork, info)
dlarreβDLARREgiven the tridiagonal matrixT, sets small off-diagonal elements to zero and for each unreduced blockTi, finds base representations and eigenvalues.slarreβSLARREgiven the tridiagonal matrixT, sets small off-diagonal elements to zero and for each unreduced blockTi, finds base representations and eigenvalues.
π¦ Detailed Description
this is where the docs get super Fortran-specific, and honestly? iconic.
π Function Documentation
π subroutine dlarre
subroutine dlarre (character range, integer n, double precision vl, double
precision vu, integer il, integer iu, double precision, dimension( * )
d, double precision, dimension( * ) e, double precision, dimension( * )
e2, double precision rtol1, double precision rtol2, double precision
spltol, integer nsplit, integer, dimension( * ) isplit, integer m,
double precision, dimension( * ) w, double precision, dimension( * )
werr, double precision, dimension( * ) wgap, integer, dimension( * )
iblock, integer, dimension( * ) indexw, double precision, dimension( * )
gers, double precision pivmin, double precision, dimension( * ) work,
integer, dimension( * ) iwork, integer info)
DLARRE given the tridiagonal matrix T, sets small off-diagonal elements to zero and for each unreduced block Ti, finds base representations and eigenvalues.
Purpose:
To find the desired eigenvalues of a given real symmetric tridiagonal matrix T, DLARRE sets any 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
RANGEβRANGE is CHARACTER*1= 'A': ()all eigenvalues will be found.= 'V': ()all eigenvalues in the half-open interval(VL, VU]will be found.= 'I': ()theIL-th throughIU-th eigenvalues (of the entire matrix) will be found.
NβN is INTEGER. The order of the matrix.N > 0.VLβVL is DOUBLE PRECISION. IfRANGE='V', the lower bound for the eigenvalues. Eigenvalues less than or equal toVL, or greater thanVU, will not be returned.VL < VU. IfRANGE='I'or='A',DLARREcomputes bounds on the desired part of the spectrum.VUβVU is DOUBLE PRECISION. IfRANGE='V', the upper bound for the eigenvalues. Eigenvalues less than or equal toVL, or greater thanVU, will not be returned.VL < VU. IfRANGE='I'or='A',DLARREcomputes bounds on the desired part of the spectrum.ILβIL is INTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N.IUβIU is INTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N.DβD is DOUBLE PRECISION array, dimension (N). On entry, theNdiagonal elements of the tridiagonal matrixT. On exit, theNdiagonal elements of the diagonal matricesD_i.EβE is DOUBLE PRECISION array, dimension (N). On entry, the first(N-1)entries contain the subdiagonal elements of the tridiagonal matrixT;E(N)need not be set. On exit,Econtains the subdiagonal elements of the unit bidiagonal matricesL_i. The entriesE( ISPLIT( I ) ),1 <= I <= NSPLIT, contain the base pointssigma_ion output.E2βE2 is DOUBLE PRECISION array, dimension (N). On entry, the first(N-1)entries contain the SQUARES of the subdiagonal elements of the tridiagonal matrixT;E2(N)need not be set. On exit, the entriesE2( ISPLIT( I ) ),1 <= I <= NSPLIT, have been set to zero.RTOL1βRTOL1 is DOUBLE PRECISION.RTOL2βRTOL2 is DOUBLE PRECISION. Parameters for bisection. An interval[LEFT,RIGHT]has converged ifRIGHT-LEFT < MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) ).SPLTOLβSPLTOL is DOUBLE PRECISION. The threshold for splitting.NSPLITβNSPLIT is INTEGER. The number of blocksTsplits into.1 <= NSPLIT <= N.ISPLITβISPLIT is INTEGER array, dimension (N). The splitting points, at whichTbreaks up into blocks. The first block consists of rows/columns1toISPLIT(1), the second of rows/columnsISPLIT(1)+1throughISPLIT(2), etc., and theNSPLIT-th consists of rows/columnsISPLIT(NSPLIT-1)+1throughISPLIT(NSPLIT)=N.MβM is INTEGER. The total number of eigenvalues (of allL_i D_i L_i^T) found.WβW is DOUBLE PRECISION array, dimension (N). The firstMelements contain the eigenvalues. The eigenvalues of each of the blocks,L_i D_i L_i^T, are sorted in ascending order (DLARREmay use the remainingN-Melements as workspace).WERRβWERR is DOUBLE PRECISION array, dimension (N). The error bound on the corresponding eigenvalue inW.WGAPβWGAP is DOUBLE PRECISION array, dimension (N). The separation from the right neighbor eigenvalue inW. The gap is only with respect to the eigenvalues of the same block as each block has its own representation tree. Exception: at the right end of a block we store the left gap.IBLOCKβIBLOCK is INTEGER array, dimension (N). The indices of the blocks (submatrices) associated with the corresponding eigenvalues inW;IBLOCK(i)=1if eigenvalueW(i)belongs to the first block from the top,=2ifW(i)belongs to the second block, etc.INDEXWβINDEXW is INTEGER array, dimension (N). The indices of the eigenvalues within each block (submatrix); for example,INDEXW(i)= 10andIBLOCK(i)=2imply that thei-th eigenvalueW(i)is the10-th eigenvalue in block2.GERSβGERS is DOUBLE PRECISION array, dimension (2*N). TheNGerschgorin intervals (thei-th Gerschgorin interval is(GERS(2*i-1), GERS(2*i)).PIVMINβPIVMIN is DOUBLE PRECISION. The minimum pivot in the Sturm sequence forT.WORKβWORK is DOUBLE PRECISION array, dimension (6*N). Workspace.IWORKβIWORK is INTEGER array, dimension (5*N). Workspace.INFOβINFO is INTEGER.= 0: successful exit> 0: A problem occurred inDLARRE.< 0: One of the called subroutines signaled an internal problem. Needs inspection of the corresponding parameterIINFOfor further information.=-1: Problem inDLARRD.= 2: No base representation could be found inMAXTRYiterations. IncreasingMAXTRYand recompilation might be a remedy.=-3: Problem inDLARRBwhen computing the refined root representation forDLASQ2.=-4: Problem inDLARRBwhen preforming bisection on the desired part of the spectrum.=-5: Problem inDLASQ2.=-6: Problem inDLASQ2.
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Further Details
The base representations are required to suffer very little element growth and consequently define all their eigenvalues to high relative accuracy.
Contributors
- Beresford Parlett, University of California, Berkeley, USA
- Jim Demmel, University of California, Berkeley, USA
- Inderjit Dhillon, University of Texas, Austin, USA
- Osni Marques, LBNL/NERSC, USA
- Christof Voemel, University of California, Berkeley, USA
Definition at line 301 of file dlarre.f.
okay so the star of the show is SLARRE, and here's its whole signature:
subroutine slarre (character range, integer n, real vl, real vu, integer il,
integer iu, real, dimension( * ) d, real, dimension( * ) e, real,
dimension( * ) e2, real rtol1, real rtol2, real spltol, integer nsplit,
integer, dimension( * ) isplit, integer m, real, dimension( * ) w, real,
dimension( * ) werr, real, dimension( * ) wgap, integer, dimension( * )
iblock, integer, dimension( * ) indexw, real, dimension( * ) gers, real
pivmin, real, dimension( * ) work, integer, dimension( * ) iwork,
integer info)
so basically, SLARRE takes your tridiagonal matrix T, sets any tiny off-diagonal elements to zero (bye, noise β¨), and for each unreduced block Ti, it finds base representations and eigenvalues. iconic.
Purpose π
okay so the whole point: to find the desired eigenvalues of a real symmetric tridiagonal matrix T, SLARRE sets any 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 it finds are then used by SSTEMR to compute the eigenvectors of T. 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. slay.
Parameters π
RANGEisCHARACTER*1β tells us which eigenvalues we're hunting:= 'A': all eigenvalues will be found.= 'V': all eigenvalues in the half-open interval(VL, VU]will be found.= 'I': theIL-th throughIU-th eigenvalues (of the entire matrix) will be found.
NisINTEGERβ the order of the matrix.N > 0.VLisREALβ ifRANGE='V', the lower bound for the eigenvalues. eigenvalues less than or equal toVL, or greater thanVU, will not be returned.VL < VU. ifRANGE='I'or='A',SLARREcomputes bounds on the desired part of the spectrum.VUisREALβ ifRANGE='V', the upper bound for the eigenvalues. eigenvalues less than or equal toVL, or greater thanVU, will not be returned.VL < VU. ifRANGE='I'or='A',SLARREcomputes bounds on the desired part of the spectrum.ILisINTEGERβ ifRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N.IUisINTEGERβ ifRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N.DisREAL array, dimension (N)β on entry, theNdiagonal elements of the tridiagonal matrixT. on exit, theNdiagonal elements of the diagonal matricesD_i.EisREAL array, dimension (N)β on entry, the first(N-1)entries contain the subdiagonal elements of the tridiagonal matrixT;E(N)need not be set. on exit,Econtains the subdiagonal elements of the unit bidiagonal matricesL_i. the entriesE( ISPLIT( I ) ),1 <= I <= NSPLIT, contain the base pointssigma_ion output.E2isREAL array, dimension (N)β on entry, the first(N-1)entries contain the SQUARES of the subdiagonal elements of the tridiagonal matrixT;E2(N)need not be set. on exit, the entriesE2( ISPLIT( I ) ),1 <= I <= NSPLIT, have been set to zero.RTOL1isREAL.RTOL2isREALβ parameters for bisection. an interval[LEFT,RIGHT]has converged ifRIGHT-LEFT < MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) ).SPLTOLisREALβ the threshold for splitting.NSPLITisINTEGERβ the number of blocksTsplits into.1 <= NSPLIT <= N.ISPLITisINTEGER array, dimension (N)β the splitting points, at whichTbreaks up into blocks. the first block consists of rows/columns1toISPLIT(1), the second of rows/columnsISPLIT(1)+1throughISPLIT(2), etc., and theNSPLIT-th consists of rows/columnsISPLIT(NSPLIT-1)+1throughISPLIT(NSPLIT)=N.MisINTEGERβ the total number of eigenvalues (of allL_i D_i L_i^T) found.WisREAL array, dimension (N)β the firstMelements contain the eigenvalues. the eigenvalues of each of the blocks,L_i D_i L_i^T, are sorted in ascending order (SLARREmay use the remainingN-Melements as workspace).WERRisREAL array, dimension (N)β the error bound on the corresponding eigenvalue inW.WGAPisREAL array, dimension (N)β the separation from the right neighbor eigenvalue inW. the gap is only with respect to the eigenvalues of the same block as each block has its own representation tree. exception: at the right end of a block we store the left gap.IBLOCKisINTEGER array, dimension (N)β the indices of the blocks (submatrices) associated with the corresponding eigenvalues inW;IBLOCK(i)=1if eigenvalueW(i)belongs to the first block from the top,=2ifW(i)belongs to the second block, etc.INDEXWisINTEGER array, dimension (N)β the indices of the eigenvalues within each block (submatrix); for example,INDEXW(i)= 10andIBLOCK(i)=2imply that thei-th eigenvalueW(i)is the 10-th eigenvalue in block 2.GERSisREAL array, dimension (2*N)β theNGerschgorin intervals (thei-th Gerschgorin interval is(GERS(2*i-1), GERS(2*i))).PIVMINisREALβ the minimum pivot in the Sturm sequence forT.WORKisREAL array, dimension (6*N)β workspace.IWORKisINTEGER array, dimension (5*N)β workspace.INFOisINTEGERβ the exit tea:= 0: successful exit.> 0: a problem occurred inSLARRE.< 0: one of the called subroutines signaled an internal problem. needs inspection of the corresponding parameterIINFOfor further information.=-1: problem inSLARRD.= 2: no base representation could be found inMAXTRYiterations. increasingMAXTRYand recompilation might be a remedy.=-3: problem inSLARRBwhen computing the refined root representation forSLASQ2.=-4: problem inSLARRBwhen performing bisection on the desired part of the spectrum.=-5: problem inSLASQ2.=-6: problem inSLASQ2.
Author π«
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Further Details π
the base representations are required to suffer very little element growth and consequently define all their eigenvalues to high relative accuracy. periodt.
Contributors π
- Beresford Parlett, University of California, Berkeley, USA
- Jim Demmel, University of California, Berkeley, USA
- Inderjit Dhillon, University of Texas, Austin, USA
- Osni Marques, LBNL/NERSC, USA
- Christof Voemel, University of California, Berkeley, USA
Definition at line 301 of file slarre.f.
Author (Doxygen's version) π€
Generated automatically by Doxygen for LAPACK from the source code.
and that's the whole vibe check! this page is from LAPACK Version 3.12.0, auto-generated by Doxygen for LAPACK from the source code. stay slay, bestie π β¨
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms