LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ zlatb5()

subroutine zlatb5 ( character*3  path,
integer  imat,
integer  n,
character  type,
integer  kl,
integer  ku,
double precision  anorm,
integer  mode,
double precision  cndnum,
character  dist 
)

ZLATB5

Purpose:
 ZLATB5 sets parameters for the matrix generator based on the type
 of matrix to be generated.
Parameters
[in]PATH
          PATH is CHARACTER*3
          The LAPACK path name.
[in]IMAT
          IMAT is INTEGER
          An integer key describing which matrix to generate for this
          path.
[in]N
          N is INTEGER
          The number of rows and columns in the matrix to be generated.
[out]TYPE
          TYPE is CHARACTER*1
          The type of the matrix to be generated:
          = 'S':  symmetric matrix
          = 'P':  symmetric positive (semi)definite matrix
          = 'N':  nonsymmetric matrix
[out]KL
          KL is INTEGER
          The lower band width of the matrix to be generated.
[out]KU
          KU is INTEGER
          The upper band width of the matrix to be generated.
[out]ANORM
          ANORM is DOUBLE PRECISION
          The desired norm of the matrix to be generated.  The diagonal
          matrix of singular values or eigenvalues is scaled by this
          value.
[out]MODE
          MODE is INTEGER
          A key indicating how to choose the vector of eigenvalues.
[out]CNDNUM
          CNDNUM is DOUBLE PRECISION
          The desired condition number.
[out]DIST
          DIST is CHARACTER*1
          The type of distribution to be used by the random number
          generator.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.

Definition at line 112 of file zlatb5.f.

114*
115* -- LAPACK test routine --
116* -- LAPACK is a software package provided by Univ. of Tennessee, --
117* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
118*
119* .. Scalar Arguments ..
120 DOUBLE PRECISION ANORM, CNDNUM
121 INTEGER IMAT, KL, KU, MODE, N
122 CHARACTER DIST, TYPE
123 CHARACTER*3 PATH
124* ..
125*
126* =====================================================================
127*
128* .. Parameters ..
129 DOUBLE PRECISION SHRINK, TENTH
130 parameter( shrink = 0.25d0, tenth = 0.1d+0 )
131 DOUBLE PRECISION ONE
132 parameter( one = 1.0d+0 )
133 DOUBLE PRECISION TWO
134 parameter( two = 2.0d+0 )
135* ..
136* .. Local Scalars ..
137 DOUBLE PRECISION BADC1, BADC2, EPS, LARGE, SMALL
138 LOGICAL FIRST
139 CHARACTER*2 C2
140* ..
141* .. External Functions ..
142 DOUBLE PRECISION DLAMCH
143 EXTERNAL dlamch
144* ..
145* .. Intrinsic Functions ..
146 INTRINSIC max, sqrt
147* ..
148* .. Save statement ..
149 SAVE eps, small, large, badc1, badc2, first
150* ..
151* .. Data statements ..
152 DATA first / .true. /
153* ..
154* .. Executable Statements ..
155*
156* Set some constants for use in the subroutine.
157*
158 IF( first ) THEN
159 first = .false.
160 eps = dlamch( 'Precision' )
161 badc2 = tenth / eps
162 badc1 = sqrt( badc2 )
163 small = dlamch( 'Safe minimum' )
164 large = one / small
165 small = shrink*( small / eps )
166 large = one / small
167 END IF
168*
169 c2 = path( 2: 3 )
170*
171* Set some parameters
172*
173 dist = 'S'
174 mode = 3
175*
176* Set TYPE, the type of matrix to be generated.
177*
178 TYPE = c2( 1: 1 )
179*
180* Set the lower and upper bandwidths.
181*
182 IF( imat.EQ.1 ) THEN
183 kl = 0
184 ELSE
185 kl = max( n-1, 0 )
186 END IF
187 ku = kl
188*
189* Set the condition number and norm.etc
190*
191 IF( imat.EQ.3 ) THEN
192 cndnum = 1.0d12
193 mode = 2
194 ELSE IF( imat.EQ.4 ) THEN
195 cndnum = 1.0d12
196 mode = 1
197 ELSE IF( imat.EQ.5 ) THEN
198 cndnum = 1.0d12
199 mode = 3
200 ELSE IF( imat.EQ.6 ) THEN
201 cndnum = badc1
202 ELSE IF( imat.EQ.7 ) THEN
203 cndnum = badc2
204 ELSE
205 cndnum = two
206 END IF
207*
208 IF( imat.EQ.8 ) THEN
209 anorm = small
210 ELSE IF( imat.EQ.9 ) THEN
211 anorm = large
212 ELSE
213 anorm = one
214 END IF
215*
216 IF( n.LE.1 )
217 $ cndnum = one
218*
219 RETURN
220*
221* End of ZLATB5
222*
double precision function dlamch(cmach)
DLAMCH
Definition dlamch.f:69
Here is the caller graph for this function: