File: dlaebz

package info (click to toggle)
ruby-lapack 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 28,552 kB
  • sloc: ansic: 191,612; ruby: 3,934; makefile: 8
file content (292 lines) | stat: -rwxr-xr-x 12,318 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
--- 
:name: dlaebz
:md5sum: 667b9d1d21f6f805330766d1f74f173b
:category: :subroutine
:arguments: 
- ijob: 
    :type: integer
    :intent: input
- nitmax: 
    :type: integer
    :intent: input
- n: 
    :type: integer
    :intent: input
- mmax: 
    :type: integer
    :intent: input
- minp: 
    :type: integer
    :intent: input
- nbmin: 
    :type: integer
    :intent: input
- abstol: 
    :type: doublereal
    :intent: input
- reltol: 
    :type: doublereal
    :intent: input
- pivmin: 
    :type: doublereal
    :intent: input
- d: 
    :type: doublereal
    :intent: input
    :dims: 
    - n
- e: 
    :type: doublereal
    :intent: input
    :dims: 
    - n
- e2: 
    :type: doublereal
    :intent: input
    :dims: 
    - n
- nval: 
    :type: integer
    :intent: input/output
    :dims: 
    - "(ijob==1||ijob==2) ? 0 : ijob==3 ? minp : 0"
- ab: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - mmax
    - "2"
- c: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - "ijob==1 ? 0 : (ijob==2||ijob==3) ? mmax : 0"
- mout: 
    :type: integer
    :intent: output
- nab: 
    :type: integer
    :intent: input/output
    :dims: 
    - mmax
    - "2"
- work: 
    :type: doublereal
    :intent: workspace
    :dims: 
    - mmax
- iwork: 
    :type: integer
    :intent: workspace
    :dims: 
    - mmax
- info: 
    :type: integer
    :intent: output
:substitutions: {}

:fortran_help: "      SUBROUTINE DLAEBZ( IJOB, NITMAX, N, MMAX, MINP, NBMIN, ABSTOL, RELTOL, PIVMIN, D, E, E2, NVAL, AB, C, MOUT, NAB, WORK, IWORK, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  DLAEBZ contains the iteration loops which compute and use the\n\
  *  function N(w), which is the count of eigenvalues of a symmetric\n\
  *  tridiagonal matrix T less than or equal to its argument  w.  It\n\
  *  performs a choice of two types of loops:\n\
  *\n\
  *  IJOB=1, followed by\n\
  *  IJOB=2: It takes as input a list of intervals and returns a list of\n\
  *          sufficiently small intervals whose union contains the same\n\
  *          eigenvalues as the union of the original intervals.\n\
  *          The input intervals are (AB(j,1),AB(j,2)], j=1,...,MINP.\n\
  *          The output interval (AB(j,1),AB(j,2)] will contain\n\
  *          eigenvalues NAB(j,1)+1,...,NAB(j,2), where 1 <= j <= MOUT.\n\
  *\n\
  *  IJOB=3: It performs a binary search in each input interval\n\
  *          (AB(j,1),AB(j,2)] for a point  w(j)  such that\n\
  *          N(w(j))=NVAL(j), and uses  C(j)  as the starting point of\n\
  *          the search.  If such a w(j) is found, then on output\n\
  *          AB(j,1)=AB(j,2)=w.  If no such w(j) is found, then on output\n\
  *          (AB(j,1),AB(j,2)] will be a small interval containing the\n\
  *          point where N(w) jumps through NVAL(j), unless that point\n\
  *          lies outside the initial interval.\n\
  *\n\
  *  Note that the intervals are in all cases half-open intervals,\n\
  *  i.e., of the form  (a,b] , which includes  b  but not  a .\n\
  *\n\
  *  To avoid underflow, the matrix should be scaled so that its largest\n\
  *  element is no greater than  overflow**(1/2) * underflow**(1/4)\n\
  *  in absolute value.  To assure the most accurate computation\n\
  *  of small eigenvalues, the matrix should be scaled to be\n\
  *  not much smaller than that, either.\n\
  *\n\
  *  See W. Kahan \"Accurate Eigenvalues of a Symmetric Tridiagonal\n\
  *  Matrix\", Report CS41, Computer Science Dept., Stanford\n\
  *  University, July 21, 1966\n\
  *\n\
  *  Note: the arguments are, in general, *not* checked for unreasonable\n\
  *  values.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  IJOB    (input) INTEGER\n\
  *          Specifies what is to be done:\n\
  *          = 1:  Compute NAB for the initial intervals.\n\
  *          = 2:  Perform bisection iteration to find eigenvalues of T.\n\
  *          = 3:  Perform bisection iteration to invert N(w), i.e.,\n\
  *                to find a point which has a specified number of\n\
  *                eigenvalues of T to its left.\n\
  *          Other values will cause DLAEBZ to return with INFO=-1.\n\
  *\n\
  *  NITMAX  (input) INTEGER\n\
  *          The maximum number of \"levels\" of bisection to be\n\
  *          performed, i.e., an interval of width W will not be made\n\
  *          smaller than 2^(-NITMAX) * W.  If not all intervals\n\
  *          have converged after NITMAX iterations, then INFO is set\n\
  *          to the number of non-converged intervals.\n\
  *\n\
  *  N       (input) INTEGER\n\
  *          The dimension n of the tridiagonal matrix T.  It must be at\n\
  *          least 1.\n\
  *\n\
  *  MMAX    (input) INTEGER\n\
  *          The maximum number of intervals.  If more than MMAX intervals\n\
  *          are generated, then DLAEBZ will quit with INFO=MMAX+1.\n\
  *\n\
  *  MINP    (input) INTEGER\n\
  *          The initial number of intervals.  It may not be greater than\n\
  *          MMAX.\n\
  *\n\
  *  NBMIN   (input) INTEGER\n\
  *          The smallest number of intervals that should be processed\n\
  *          using a vector loop.  If zero, then only the scalar loop\n\
  *          will be used.\n\
  *\n\
  *  ABSTOL  (input) DOUBLE PRECISION\n\
  *          The minimum (absolute) width of an interval.  When an\n\
  *          interval is narrower than ABSTOL, or than RELTOL times the\n\
  *          larger (in magnitude) endpoint, then it is considered to be\n\
  *          sufficiently small, i.e., converged.  This must be at least\n\
  *          zero.\n\
  *\n\
  *  RELTOL  (input) DOUBLE PRECISION\n\
  *          The minimum relative width of an interval.  When an interval\n\
  *          is narrower than ABSTOL, or than RELTOL times the larger (in\n\
  *          magnitude) endpoint, then it is considered to be\n\
  *          sufficiently small, i.e., converged.  Note: this should\n\
  *          always be at least radix*machine epsilon.\n\
  *\n\
  *  PIVMIN  (input) DOUBLE PRECISION\n\
  *          The minimum absolute value of a \"pivot\" in the Sturm\n\
  *          sequence loop.  This *must* be at least  max |e(j)**2| *\n\
  *          safe_min  and at least safe_min, where safe_min is at least\n\
  *          the smallest number that can divide one without overflow.\n\
  *\n\
  *  D       (input) DOUBLE PRECISION array, dimension (N)\n\
  *          The diagonal elements of the tridiagonal matrix T.\n\
  *\n\
  *  E       (input) DOUBLE PRECISION array, dimension (N)\n\
  *          The offdiagonal elements of the tridiagonal matrix T in\n\
  *          positions 1 through N-1.  E(N) is arbitrary.\n\
  *\n\
  *  E2      (input) DOUBLE PRECISION array, dimension (N)\n\
  *          The squares of the offdiagonal elements of the tridiagonal\n\
  *          matrix T.  E2(N) is ignored.\n\
  *\n\
  *  NVAL    (input/output) INTEGER array, dimension (MINP)\n\
  *          If IJOB=1 or 2, not referenced.\n\
  *          If IJOB=3, the desired values of N(w).  The elements of NVAL\n\
  *          will be reordered to correspond with the intervals in AB.\n\
  *          Thus, NVAL(j) on output will not, in general be the same as\n\
  *          NVAL(j) on input, but it will correspond with the interval\n\
  *          (AB(j,1),AB(j,2)] on output.\n\
  *\n\
  *  AB      (input/output) DOUBLE PRECISION array, dimension (MMAX,2)\n\
  *          The endpoints of the intervals.  AB(j,1) is  a(j), the left\n\
  *          endpoint of the j-th interval, and AB(j,2) is b(j), the\n\
  *          right endpoint of the j-th interval.  The input intervals\n\
  *          will, in general, be modified, split, and reordered by the\n\
  *          calculation.\n\
  *\n\
  *  C       (input/output) DOUBLE PRECISION array, dimension (MMAX)\n\
  *          If IJOB=1, ignored.\n\
  *          If IJOB=2, workspace.\n\
  *          If IJOB=3, then on input C(j) should be initialized to the\n\
  *          first search point in the binary search.\n\
  *\n\
  *  MOUT    (output) INTEGER\n\
  *          If IJOB=1, the number of eigenvalues in the intervals.\n\
  *          If IJOB=2 or 3, the number of intervals output.\n\
  *          If IJOB=3, MOUT will equal MINP.\n\
  *\n\
  *  NAB     (input/output) INTEGER array, dimension (MMAX,2)\n\
  *          If IJOB=1, then on output NAB(i,j) will be set to N(AB(i,j)).\n\
  *          If IJOB=2, then on input, NAB(i,j) should be set.  It must\n\
  *             satisfy the condition:\n\
  *             N(AB(i,1)) <= NAB(i,1) <= NAB(i,2) <= N(AB(i,2)),\n\
  *             which means that in interval i only eigenvalues\n\
  *             NAB(i,1)+1,...,NAB(i,2) will be considered.  Usually,\n\
  *             NAB(i,j)=N(AB(i,j)), from a previous call to DLAEBZ with\n\
  *             IJOB=1.\n\
  *             On output, NAB(i,j) will contain\n\
  *             max(na(k),min(nb(k),N(AB(i,j)))), where k is the index of\n\
  *             the input interval that the output interval\n\
  *             (AB(j,1),AB(j,2)] came from, and na(k) and nb(k) are the\n\
  *             the input values of NAB(k,1) and NAB(k,2).\n\
  *          If IJOB=3, then on output, NAB(i,j) contains N(AB(i,j)),\n\
  *             unless N(w) > NVAL(i) for all search points  w , in which\n\
  *             case NAB(i,1) will not be modified, i.e., the output\n\
  *             value will be the same as the input value (modulo\n\
  *             reorderings -- see NVAL and AB), or unless N(w) < NVAL(i)\n\
  *             for all search points  w , in which case NAB(i,2) will\n\
  *             not be modified.  Normally, NAB should be set to some\n\
  *             distinctive value(s) before DLAEBZ is called.\n\
  *\n\
  *  WORK    (workspace) DOUBLE PRECISION array, dimension (MMAX)\n\
  *          Workspace.\n\
  *\n\
  *  IWORK   (workspace) INTEGER array, dimension (MMAX)\n\
  *          Workspace.\n\
  *\n\
  *  INFO    (output) INTEGER\n\
  *          = 0:       All intervals converged.\n\
  *          = 1--MMAX: The last INFO intervals did not converge.\n\
  *          = MMAX+1:  More than MMAX intervals were generated.\n\
  *\n\n\
  *  Further Details\n\
  *  ===============\n\
  *\n\
  *      This routine is intended to be called only by other LAPACK\n\
  *  routines, thus the interface is less user-friendly.  It is intended\n\
  *  for two purposes:\n\
  *\n\
  *  (a) finding eigenvalues.  In this case, DLAEBZ should have one or\n\
  *      more initial intervals set up in AB, and DLAEBZ should be called\n\
  *      with IJOB=1.  This sets up NAB, and also counts the eigenvalues.\n\
  *      Intervals with no eigenvalues would usually be thrown out at\n\
  *      this point.  Also, if not all the eigenvalues in an interval i\n\
  *      are desired, NAB(i,1) can be increased or NAB(i,2) decreased.\n\
  *      For example, set NAB(i,1)=NAB(i,2)-1 to get the largest\n\
  *      eigenvalue.  DLAEBZ is then called with IJOB=2 and MMAX\n\
  *      no smaller than the value of MOUT returned by the call with\n\
  *      IJOB=1.  After this (IJOB=2) call, eigenvalues NAB(i,1)+1\n\
  *      through NAB(i,2) are approximately AB(i,1) (or AB(i,2)) to the\n\
  *      tolerance specified by ABSTOL and RELTOL.\n\
  *\n\
  *  (b) finding an interval (a',b'] containing eigenvalues w(f),...,w(l).\n\
  *      In this case, start with a Gershgorin interval  (a,b).  Set up\n\
  *      AB to contain 2 search intervals, both initially (a,b).  One\n\
  *      NVAL element should contain  f-1  and the other should contain  l\n\
  *      , while C should contain a and b, resp.  NAB(i,1) should be -1\n\
  *      and NAB(i,2) should be N+1, to flag an error if the desired\n\
  *      interval does not lie in (a,b).  DLAEBZ is then called with\n\
  *      IJOB=3.  On exit, if w(f-1) < w(f), then one of the intervals --\n\
  *      j -- will have AB(j,1)=AB(j,2) and NAB(j,1)=NAB(j,2)=f-1, while\n\
  *      if, to the specified tolerance, w(f-k)=...=w(f+r), k > 0 and r\n\
  *      >= 0, then the interval will have  N(AB(j,1))=NAB(j,1)=f-k and\n\
  *      N(AB(j,2))=NAB(j,2)=f+r.  The cases w(l) < w(l+1) and\n\
  *      w(l-r)=...=w(l+k) are handled similarly.\n\
  *\n\
  *  =====================================================================\n\
  *\n"