ruby-lapack 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/dev/defs/cgelsd +2 -2
- data/dev/defs/clarrv +1 -1
- data/dev/defs/clatdf +1 -1
- data/dev/defs/cstegr +1 -1
- data/dev/defs/dgelsd +1 -1
- data/dev/defs/dlamrg +1 -1
- data/dev/defs/dlarre +1 -1
- data/dev/defs/dlarrv +1 -1
- data/dev/defs/dlasdq +1 -1
- data/dev/defs/dlat2s +1 -1
- data/dev/defs/dlatdf +1 -1
- data/dev/defs/dsgesv +1 -1
- data/dev/defs/dsposv +1 -1
- data/dev/defs/dstegr +1 -1
- data/dev/defs/sgelsd +1 -1
- data/dev/defs/slamrg +1 -1
- data/dev/defs/slarre +1 -1
- data/dev/defs/slarrv +1 -1
- data/dev/defs/slasdq +1 -1
- data/dev/defs/slatdf +1 -1
- data/dev/defs/sstegr +1 -1
- data/dev/defs/zcgesv +1 -1
- data/dev/defs/zcposv +1 -1
- data/dev/defs/zgelsd +2 -2
- data/dev/defs/zlarrv +1 -1
- data/dev/defs/zlat2c +1 -1
- data/dev/defs/zlatdf +1 -1
- data/dev/defs/zstegr +1 -1
- data/ext/cgelsd.c +1 -1
- data/ext/clarrv.c +1 -1
- data/ext/clatdf.c +1 -1
- data/ext/cstegr.c +1 -1
- data/ext/dgelsd.c +1 -1
- data/ext/dlamrg.c +1 -1
- data/ext/dlarre.c +1 -1
- data/ext/dlarrv.c +1 -1
- data/ext/dlasdq.c +1 -1
- data/ext/dlat2s.c +1 -1
- data/ext/dlatdf.c +1 -1
- data/ext/dsgesv.c +1 -1
- data/ext/dsposv.c +1 -1
- data/ext/dstegr.c +1 -1
- data/ext/extconf.rb +47 -24
- data/ext/sgelsd.c +1 -1
- data/ext/slamrg.c +1 -1
- data/ext/slarre.c +1 -1
- data/ext/slarrv.c +1 -1
- data/ext/slasdq.c +1 -1
- data/ext/slatdf.c +1 -1
- data/ext/sstegr.c +1 -1
- data/ext/zcgesv.c +1 -1
- data/ext/zcposv.c +1 -1
- data/ext/zgelsd.c +1 -1
- data/ext/zlarrv.c +1 -1
- data/ext/zlat2c.c +1 -1
- data/ext/zlatdf.c +1 -1
- data/ext/zstegr.c +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c57b5d80acada2d3f08646f7bf7fc99f3bac5aad
|
4
|
+
data.tar.gz: c67d5f889e0c703a2e2a0866a9f3cb9ed2bc23db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b844a82c4845cac8a7c7cadd5673cec32f7b5dfbee245405657bd446f5bb0d001f0b7f1010f5820faf7be878ca33d069256202c0a29520a51e465ed3291b9db
|
7
|
+
data.tar.gz: 05f231ce34a1404d791d495c60e456d1e0c47ac605411e531e91899bdd63681ccffdfc664c2108e2ea9bd76378a88dc1efee7c1c129373d44f87d59959a223a2
|
data/Rakefile
CHANGED
data/dev/defs/cgelsd
CHANGED
@@ -93,10 +93,10 @@
|
|
93
93
|
*\n\
|
94
94
|
* The problem is solved in three steps:\n\
|
95
95
|
* (1) Reduce the coefficient matrix A to bidiagonal form with\n\
|
96
|
-
* Householder
|
96
|
+
* Householder transformations, reducing the original problem\n\
|
97
97
|
* into a \"bidiagonal least squares problem\" (BLS)\n\
|
98
98
|
* (2) Solve the BLS using a divide and conquer approach.\n\
|
99
|
-
* (3) Apply back all the Householder
|
99
|
+
* (3) Apply back all the Householder transformations to solve\n\
|
100
100
|
* the original least squares problem.\n\
|
101
101
|
*\n\
|
102
102
|
* The effective rank of A is determined by treating as zero those\n\
|
data/dev/defs/clarrv
CHANGED
@@ -227,7 +227,7 @@
|
|
227
227
|
* INFO (output) INTEGER\n\
|
228
228
|
* = 0: successful exit\n\
|
229
229
|
*\n\
|
230
|
-
* > 0: A problem
|
230
|
+
* > 0: A problem occurred in CLARRV.\n\
|
231
231
|
* < 0: One of the called subroutines signaled an internal problem.\n\
|
232
232
|
* Needs inspection of the corresponding parameter IINFO\n\
|
233
233
|
* for further information.\n\
|
data/dev/defs/clatdf
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
* Zx = +-e - f with the sign giving the greater value of\n\
|
65
65
|
* 2-norm(x). About 5 times as expensive as Default.\n\
|
66
66
|
* IJOB .ne. 2: Local look ahead strategy where\n\
|
67
|
-
* all entries of the r.h.s. b is
|
67
|
+
* all entries of the r.h.s. b is chosen as either +1 or\n\
|
68
68
|
* -1. Default.\n\
|
69
69
|
*\n\
|
70
70
|
* N (input) INTEGER\n\
|
data/dev/defs/cstegr
CHANGED
@@ -98,7 +98,7 @@
|
|
98
98
|
* either an interval (VL,VU] or a range of indices IL:IU for the desired\n\
|
99
99
|
* eigenvalues.\n\
|
100
100
|
*\n\
|
101
|
-
* CSTEGR is a
|
101
|
+
* CSTEGR is a compatibility wrapper around the improved CSTEMR routine.\n\
|
102
102
|
* See SSTEMR for further details.\n\
|
103
103
|
*\n\
|
104
104
|
* One important change is that the ABSTOL parameter no longer provides any\n\
|
data/dev/defs/dgelsd
CHANGED
@@ -90,7 +90,7 @@
|
|
90
90
|
* Householder transformations, reducing the original problem\n\
|
91
91
|
* into a \"bidiagonal least squares problem\" (BLS)\n\
|
92
92
|
* (2) Solve the BLS using a divide and conquer approach.\n\
|
93
|
-
* (3) Apply back all the Householder
|
93
|
+
* (3) Apply back all the Householder transformations to solve\n\
|
94
94
|
* the original least squares problem.\n\
|
95
95
|
*\n\
|
96
96
|
* The effective rank of A is determined by treating as zero those\n\
|
data/dev/defs/dlamrg
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
*\n\
|
41
41
|
* N1 (input) INTEGER\n\
|
42
42
|
* N2 (input) INTEGER\n\
|
43
|
-
* These
|
43
|
+
* These arguments contain the respective lengths of the two\n\
|
44
44
|
* sorted lists to be merged.\n\
|
45
45
|
*\n\
|
46
46
|
* A (input) DOUBLE PRECISION array, dimension (N1+N2)\n\
|
data/dev/defs/dlarre
CHANGED
@@ -233,7 +233,7 @@
|
|
233
233
|
*\n\
|
234
234
|
* INFO (output) INTEGER\n\
|
235
235
|
* = 0: successful exit\n\
|
236
|
-
* > 0: A problem
|
236
|
+
* > 0: A problem occurred in DLARRE.\n\
|
237
237
|
* < 0: One of the called subroutines signaled an internal problem.\n\
|
238
238
|
* Needs inspection of the corresponding parameter IINFO\n\
|
239
239
|
* for further information.\n\
|
data/dev/defs/dlarrv
CHANGED
@@ -227,7 +227,7 @@
|
|
227
227
|
* INFO (output) INTEGER\n\
|
228
228
|
* = 0: successful exit\n\
|
229
229
|
*\n\
|
230
|
-
* > 0: A problem
|
230
|
+
* > 0: A problem occurred in DLARRV.\n\
|
231
231
|
* < 0: One of the called subroutines signaled an internal problem.\n\
|
232
232
|
* Needs inspection of the corresponding parameter IINFO\n\
|
233
233
|
* for further information.\n\
|
data/dev/defs/dlasdq
CHANGED
@@ -92,7 +92,7 @@
|
|
92
92
|
*\n\
|
93
93
|
* UPLO (input) CHARACTER*1\n\
|
94
94
|
* On entry, UPLO specifies whether the input bidiagonal matrix\n\
|
95
|
-
* is upper or lower bidiagonal, and
|
95
|
+
* is upper or lower bidiagonal, and whether it is square are\n\
|
96
96
|
* not.\n\
|
97
97
|
* UPLO = 'U' or 'u' B is upper bidiagonal.\n\
|
98
98
|
* UPLO = 'L' or 'l' B is lower bidiagonal.\n\
|
data/dev/defs/dlat2s
CHANGED
@@ -41,7 +41,7 @@
|
|
41
41
|
*\n\
|
42
42
|
* RMAX is the overflow for the SINGLE PRECISION arithmetic\n\
|
43
43
|
* DLAS2S checks that all the entries of A are between -RMAX and\n\
|
44
|
-
* RMAX. If not the
|
44
|
+
* RMAX. If not the conversion is aborted and a flag is raised.\n\
|
45
45
|
*\n\
|
46
46
|
* This is an auxiliary routine so there is no argument checking.\n\
|
47
47
|
*\n\n\
|
data/dev/defs/dlatdf
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
* Zx = +-e - f with the sign giving the greater value\n\
|
65
65
|
* of 2-norm(x). About 5 times as expensive as Default.\n\
|
66
66
|
* IJOB .ne. 2: Local look ahead strategy where all entries of\n\
|
67
|
-
* the r.h.s. b is
|
67
|
+
* the r.h.s. b is chosen as either +1 or -1 (Default).\n\
|
68
68
|
*\n\
|
69
69
|
* N (input) INTEGER\n\
|
70
70
|
* The number of columns of the matrix Z.\n\
|
data/dev/defs/dsgesv
CHANGED
@@ -155,7 +155,7 @@
|
|
155
155
|
* -3 : failure of SGETRF\n\
|
156
156
|
* -31: stop the iterative refinement after the 30th\n\
|
157
157
|
* iterations\n\
|
158
|
-
* > 0: iterative refinement has been
|
158
|
+
* > 0: iterative refinement has been successfully used.\n\
|
159
159
|
* Returns the number of iterations\n\
|
160
160
|
*\n\
|
161
161
|
* INFO (output) INTEGER\n\
|
data/dev/defs/dsposv
CHANGED
@@ -158,7 +158,7 @@
|
|
158
158
|
* -3 : failure of SPOTRF\n\
|
159
159
|
* -31: stop the iterative refinement after the 30th\n\
|
160
160
|
* iterations\n\
|
161
|
-
* > 0: iterative refinement has been
|
161
|
+
* > 0: iterative refinement has been successfully used.\n\
|
162
162
|
* Returns the number of iterations\n\
|
163
163
|
*\n\
|
164
164
|
* INFO (output) INTEGER\n\
|
data/dev/defs/dstegr
CHANGED
@@ -98,7 +98,7 @@
|
|
98
98
|
* either an interval (VL,VU] or a range of indices IL:IU for the desired\n\
|
99
99
|
* eigenvalues.\n\
|
100
100
|
*\n\
|
101
|
-
* DSTEGR is a
|
101
|
+
* DSTEGR is a compatibility wrapper around the improved DSTEMR routine.\n\
|
102
102
|
* See DSTEMR for further details.\n\
|
103
103
|
*\n\
|
104
104
|
* One important change is that the ABSTOL parameter no longer provides any\n\
|
data/dev/defs/sgelsd
CHANGED
@@ -90,7 +90,7 @@
|
|
90
90
|
* Householder transformations, reducing the original problem\n\
|
91
91
|
* into a \"bidiagonal least squares problem\" (BLS)\n\
|
92
92
|
* (2) Solve the BLS using a divide and conquer approach.\n\
|
93
|
-
* (3) Apply back all the Householder
|
93
|
+
* (3) Apply back all the Householder transformations to solve\n\
|
94
94
|
* the original least squares problem.\n\
|
95
95
|
*\n\
|
96
96
|
* The effective rank of A is determined by treating as zero those\n\
|
data/dev/defs/slamrg
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
*\n\
|
41
41
|
* N1 (input) INTEGER\n\
|
42
42
|
* N2 (input) INTEGER\n\
|
43
|
-
* These
|
43
|
+
* These arguments contain the respective lengths of the two\n\
|
44
44
|
* sorted lists to be merged.\n\
|
45
45
|
*\n\
|
46
46
|
* A (input) REAL array, dimension (N1+N2)\n\
|
data/dev/defs/slarre
CHANGED
@@ -233,7 +233,7 @@
|
|
233
233
|
*\n\
|
234
234
|
* INFO (output) INTEGER\n\
|
235
235
|
* = 0: successful exit\n\
|
236
|
-
* > 0: A problem
|
236
|
+
* > 0: A problem occurred in SLARRE.\n\
|
237
237
|
* < 0: One of the called subroutines signaled an internal problem.\n\
|
238
238
|
* Needs inspection of the corresponding parameter IINFO\n\
|
239
239
|
* for further information.\n\
|
data/dev/defs/slarrv
CHANGED
@@ -227,7 +227,7 @@
|
|
227
227
|
* INFO (output) INTEGER\n\
|
228
228
|
* = 0: successful exit\n\
|
229
229
|
*\n\
|
230
|
-
* > 0: A problem
|
230
|
+
* > 0: A problem occurred in SLARRV.\n\
|
231
231
|
* < 0: One of the called subroutines signaled an internal problem.\n\
|
232
232
|
* Needs inspection of the corresponding parameter IINFO\n\
|
233
233
|
* for further information.\n\
|
data/dev/defs/slasdq
CHANGED
@@ -92,7 +92,7 @@
|
|
92
92
|
*\n\
|
93
93
|
* UPLO (input) CHARACTER*1\n\
|
94
94
|
* On entry, UPLO specifies whether the input bidiagonal matrix\n\
|
95
|
-
* is upper or lower bidiagonal, and
|
95
|
+
* is upper or lower bidiagonal, and whether it is square are\n\
|
96
96
|
* not.\n\
|
97
97
|
* UPLO = 'U' or 'u' B is upper bidiagonal.\n\
|
98
98
|
* UPLO = 'L' or 'l' B is lower bidiagonal.\n\
|
data/dev/defs/slatdf
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
* Zx = +-e - f with the sign giving the greater value\n\
|
65
65
|
* of 2-norm(x). About 5 times as expensive as Default.\n\
|
66
66
|
* IJOB .ne. 2: Local look ahead strategy where all entries of\n\
|
67
|
-
* the r.h.s. b is
|
67
|
+
* the r.h.s. b is chosen as either +1 or -1 (Default).\n\
|
68
68
|
*\n\
|
69
69
|
* N (input) INTEGER\n\
|
70
70
|
* The number of columns of the matrix Z.\n\
|
data/dev/defs/sstegr
CHANGED
@@ -98,7 +98,7 @@
|
|
98
98
|
* either an interval (VL,VU] or a range of indices IL:IU for the desired\n\
|
99
99
|
* eigenvalues.\n\
|
100
100
|
*\n\
|
101
|
-
* SSTEGR is a
|
101
|
+
* SSTEGR is a compatibility wrapper around the improved SSTEMR routine.\n\
|
102
102
|
* See SSTEMR for further details.\n\
|
103
103
|
*\n\
|
104
104
|
* One important change is that the ABSTOL parameter no longer provides any\n\
|
data/dev/defs/zcgesv
CHANGED
@@ -161,7 +161,7 @@
|
|
161
161
|
* -3 : failure of CGETRF\n\
|
162
162
|
* -31: stop the iterative refinement after the 30th\n\
|
163
163
|
* iterations\n\
|
164
|
-
* > 0: iterative refinement has been
|
164
|
+
* > 0: iterative refinement has been successfully used.\n\
|
165
165
|
* Returns the number of iterations\n\
|
166
166
|
*\n\
|
167
167
|
* INFO (output) INTEGER\n\
|
data/dev/defs/zcposv
CHANGED
@@ -167,7 +167,7 @@
|
|
167
167
|
* -3 : failure of CPOTRF\n\
|
168
168
|
* -31: stop the iterative refinement after the 30th\n\
|
169
169
|
* iterations\n\
|
170
|
-
* > 0: iterative refinement has been
|
170
|
+
* > 0: iterative refinement has been successfully used.\n\
|
171
171
|
* Returns the number of iterations\n\
|
172
172
|
*\n\
|
173
173
|
* INFO (output) INTEGER\n\
|
data/dev/defs/zgelsd
CHANGED
@@ -93,10 +93,10 @@
|
|
93
93
|
*\n\
|
94
94
|
* The problem is solved in three steps:\n\
|
95
95
|
* (1) Reduce the coefficient matrix A to bidiagonal form with\n\
|
96
|
-
* Householder
|
96
|
+
* Householder transformations, reducing the original problem\n\
|
97
97
|
* into a \"bidiagonal least squares problem\" (BLS)\n\
|
98
98
|
* (2) Solve the BLS using a divide and conquer approach.\n\
|
99
|
-
* (3) Apply back all the Householder
|
99
|
+
* (3) Apply back all the Householder transformations to solve\n\
|
100
100
|
* the original least squares problem.\n\
|
101
101
|
*\n\
|
102
102
|
* The effective rank of A is determined by treating as zero those\n\
|
data/dev/defs/zlarrv
CHANGED
@@ -227,7 +227,7 @@
|
|
227
227
|
* INFO (output) INTEGER\n\
|
228
228
|
* = 0: successful exit\n\
|
229
229
|
*\n\
|
230
|
-
* > 0: A problem
|
230
|
+
* > 0: A problem occurred in ZLARRV.\n\
|
231
231
|
* < 0: One of the called subroutines signaled an internal problem.\n\
|
232
232
|
* Needs inspection of the corresponding parameter IINFO\n\
|
233
233
|
* for further information.\n\
|
data/dev/defs/zlat2c
CHANGED
@@ -41,7 +41,7 @@
|
|
41
41
|
*\n\
|
42
42
|
* RMAX is the overflow for the SINGLE PRECISION arithmetic\n\
|
43
43
|
* ZLAT2C checks that all the entries of A are between -RMAX and\n\
|
44
|
-
* RMAX. If not the
|
44
|
+
* RMAX. If not the conversion is aborted and a flag is raised.\n\
|
45
45
|
*\n\
|
46
46
|
* This is an auxiliary routine so there is no argument checking.\n\
|
47
47
|
*\n\n\
|
data/dev/defs/zlatdf
CHANGED
@@ -64,7 +64,7 @@
|
|
64
64
|
* Zx = +-e - f with the sign giving the greater value of\n\
|
65
65
|
* 2-norm(x). About 5 times as expensive as Default.\n\
|
66
66
|
* IJOB .ne. 2: Local look ahead strategy where\n\
|
67
|
-
* all entries of the r.h.s. b is
|
67
|
+
* all entries of the r.h.s. b is chosen as either +1 or\n\
|
68
68
|
* -1. Default.\n\
|
69
69
|
*\n\
|
70
70
|
* N (input) INTEGER\n\
|
data/dev/defs/zstegr
CHANGED
@@ -98,7 +98,7 @@
|
|
98
98
|
* either an interval (VL,VU] or a range of indices IL:IU for the desired\n\
|
99
99
|
* eigenvalues.\n\
|
100
100
|
*\n\
|
101
|
-
* ZSTEGR is a
|
101
|
+
* ZSTEGR is a compatibility wrapper around the improved ZSTEMR routine.\n\
|
102
102
|
* See DSTEMR for further details.\n\
|
103
103
|
*\n\
|
104
104
|
* One important change is that the ABSTOL parameter no longer provides any\n\
|
data/ext/cgelsd.c
CHANGED
@@ -43,7 +43,7 @@ rblapack_cgelsd(int argc, VALUE *argv, VALUE self){
|
|
43
43
|
argc--;
|
44
44
|
rblapack_options = argv[argc];
|
45
45
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
46
|
-
printf("%s\n", "USAGE:\n s, rank, work, info, b = NumRu::Lapack.cgelsd( a, b, rcond, [:lwork => lwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, RWORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* CGELSD computes the minimum-norm solution to a real linear least\n* squares problem:\n* minimize 2-norm(| b - A*x |)\n* using the singular value decomposition (SVD) of A. A is an M-by-N\n* matrix which may be rank-deficient.\n*\n* Several right hand side vectors b and solution vectors x can be\n* handled in a single call; they are stored as the columns of the\n* M-by-NRHS right hand side matrix B and the N-by-NRHS solution\n* matrix X.\n*\n* The problem is solved in three steps:\n* (1) Reduce the coefficient matrix A to bidiagonal form with\n* Householder
|
46
|
+
printf("%s\n", "USAGE:\n s, rank, work, info, b = NumRu::Lapack.cgelsd( a, b, rcond, [:lwork => lwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, RWORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* CGELSD computes the minimum-norm solution to a real linear least\n* squares problem:\n* minimize 2-norm(| b - A*x |)\n* using the singular value decomposition (SVD) of A. A is an M-by-N\n* matrix which may be rank-deficient.\n*\n* Several right hand side vectors b and solution vectors x can be\n* handled in a single call; they are stored as the columns of the\n* M-by-NRHS right hand side matrix B and the N-by-NRHS solution\n* matrix X.\n*\n* The problem is solved in three steps:\n* (1) Reduce the coefficient matrix A to bidiagonal form with\n* Householder transformations, reducing the original problem\n* into a \"bidiagonal least squares problem\" (BLS)\n* (2) Solve the BLS using a divide and conquer approach.\n* (3) Apply back all the Householder transformations to solve\n* the original least squares problem.\n*\n* The effective rank of A is determined by treating as zero those\n* singular values which are less than RCOND times the largest singular\n* value.\n*\n* The divide and conquer algorithm makes very mild assumptions about\n* floating point arithmetic. It will work on machines with a guard\n* digit in add/subtract, or on those binary machines without guard\n* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or\n* Cray-2. It could conceivably fail on hexadecimal or decimal machines\n* without guard digits, but we know of none.\n*\n\n* Arguments\n* =========\n*\n* M (input) INTEGER\n* The number of rows of the matrix A. M >= 0.\n*\n* N (input) INTEGER\n* The number of columns of the matrix A. N >= 0.\n*\n* NRHS (input) INTEGER\n* The number of right hand sides, i.e., the number of columns\n* of the matrices B and X. NRHS >= 0.\n*\n* A (input/output) COMPLEX array, dimension (LDA,N)\n* On entry, the M-by-N matrix A.\n* On exit, A has been destroyed.\n*\n* LDA (input) INTEGER\n* The leading dimension of the array A. LDA >= max(1,M).\n*\n* B (input/output) COMPLEX array, dimension (LDB,NRHS)\n* On entry, the M-by-NRHS right hand side matrix B.\n* On exit, B is overwritten by the N-by-NRHS solution matrix X.\n* If m >= n and RANK = n, the residual sum-of-squares for\n* the solution in the i-th column is given by the sum of\n* squares of the modulus of elements n+1:m in that column.\n*\n* LDB (input) INTEGER\n* The leading dimension of the array B. LDB >= max(1,M,N).\n*\n* S (output) REAL array, dimension (min(M,N))\n* The singular values of A in decreasing order.\n* The condition number of A in the 2-norm = S(1)/S(min(m,n)).\n*\n* RCOND (input) REAL\n* RCOND is used to determine the effective rank of A.\n* Singular values S(i) <= RCOND*S(1) are treated as zero.\n* If RCOND < 0, machine precision is used instead.\n*\n* RANK (output) INTEGER\n* The effective rank of A, i.e., the number of singular values\n* which are greater than RCOND*S(1).\n*\n* WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))\n* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.\n*\n* LWORK (input) INTEGER\n* The dimension of the array WORK. LWORK must be at least 1.\n* The exact minimum amount of workspace needed depends on M,\n* N and NRHS. As long as LWORK is at least\n* 2 * N + N * NRHS\n* if M is greater than or equal to N or\n* 2 * M + M * NRHS\n* if M is less than N, the code will execute correctly.\n* For good performance, LWORK should generally be larger.\n*\n* If LWORK = -1, then a workspace query is assumed; the routine\n* only calculates the optimal size of the array WORK and the\n* minimum sizes of the arrays RWORK and IWORK, and returns\n* these values as the first entries of the WORK, RWORK and\n* IWORK arrays, and no error message related to LWORK is issued\n* by XERBLA.\n*\n* RWORK (workspace) REAL array, dimension (MAX(1,LRWORK))\n* LRWORK >=\n* 10*N + 2*N*SMLSIZ + 8*N*NLVL + 3*SMLSIZ*NRHS +\n* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )\n* if M is greater than or equal to N or\n* 10*M + 2*M*SMLSIZ + 8*M*NLVL + 3*SMLSIZ*NRHS +\n* MAX( (SMLSIZ+1)**2, N*(1+NRHS) + 2*NRHS )\n* if M is less than N, the code will execute correctly.\n* SMLSIZ is returned by ILAENV and is equal to the maximum\n* size of the subproblems at the bottom of the computation\n* tree (usually about 25), and\n* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )\n* On exit, if INFO = 0, RWORK(1) returns the minimum LRWORK.\n*\n* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))\n* LIWORK >= max(1, 3*MINMN*NLVL + 11*MINMN),\n* where MINMN = MIN( M,N ).\n* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n* < 0: if INFO = -i, the i-th argument had an illegal value.\n* > 0: the algorithm for computing the SVD failed to converge;\n* if INFO = i, i off-diagonal elements of an intermediate\n* bidiagonal form did not converge to zero.\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Ming Gu and Ren-Cang Li, Computer Science Division, University of\n* California at Berkeley, USA\n* Osni Marques, LBNL/NERSC, USA\n*\n* =====================================================================\n*\n\n");
|
47
47
|
return Qnil;
|
48
48
|
}
|
49
49
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/clarrv.c
CHANGED
@@ -68,7 +68,7 @@ rblapack_clarrv(int argc, VALUE *argv, VALUE self){
|
|
68
68
|
argc--;
|
69
69
|
rblapack_options = argv[argc];
|
70
70
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
71
|
-
printf("%s\n", "USAGE:\n z, isuppz, info, d, l, w, werr, wgap = NumRu::Lapack.clarrv( vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN, ISPLIT, M, DOL, DOU, MINRGP, RTOL1, RTOL2, W, WERR, WGAP, IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, WORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* CLARRV computes the eigenvectors of the tridiagonal matrix\n* T = L D L^T given L, D and APPROXIMATIONS to the eigenvalues of L D L^T.\n* The input eigenvalues should have been computed by SLARRE.\n*\n\n* Arguments\n* =========\n*\n* N (input) INTEGER\n* The order of the matrix. N >= 0.\n*\n* VL (input) REAL \n* VU (input) REAL \n* Lower and upper bounds of the interval that contains the desired\n* eigenvalues. VL < VU. Needed to compute gaps on the left or right\n* end of the extremal eigenvalues in the desired RANGE.\n*\n* D (input/output) REAL array, dimension (N)\n* On entry, the N diagonal elements of the diagonal matrix D.\n* On exit, D may be overwritten.\n*\n* L (input/output) REAL array, dimension (N)\n* On entry, the (N-1) subdiagonal elements of the unit\n* bidiagonal matrix L are in elements 1 to N-1 of L\n* (if the matrix is not split.) At the end of each block\n* is stored the corresponding shift as given by SLARRE.\n* On exit, L is overwritten.\n*\n* PIVMIN (in) DOUBLE PRECISION\n* The minimum pivot allowed in the Sturm sequence.\n*\n* ISPLIT (input) INTEGER array, dimension (N)\n* The splitting points, at which T breaks up into blocks.\n* The first block consists of rows/columns 1 to\n* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1\n* through ISPLIT( 2 ), etc.\n*\n* M (input) INTEGER\n* The total number of input eigenvalues. 0 <= M <= N.\n*\n* DOL (input) INTEGER\n* DOU (input) INTEGER\n* If the user wants to compute only selected eigenvectors from all\n* the eigenvalues supplied, he can specify an index range DOL:DOU.\n* Or else the setting DOL=1, DOU=M should be applied.\n* Note that DOL and DOU refer to the order in which the eigenvalues\n* are stored in W.\n* If the user wants to compute only selected eigenpairs, then\n* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the\n* computed eigenvectors. All other columns of Z are set to zero.\n*\n* MINRGP (input) REAL \n*\n* RTOL1 (input) REAL \n* RTOL2 (input) REAL \n* Parameters for bisection.\n* An interval [LEFT,RIGHT] has converged if\n* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )\n*\n* W (input/output) REAL array, dimension (N)\n* The first M elements of W contain the APPROXIMATE eigenvalues for\n* which eigenvectors are to be computed. The eigenvalues\n* should be grouped by split-off block and ordered from\n* smallest to largest within the block ( The output array\n* W from SLARRE is expected here ). Furthermore, they are with\n* respect to the shift of the corresponding root representation\n* for their block. On exit, W holds the eigenvalues of the\n* UNshifted matrix.\n*\n* WERR (input/output) REAL array, dimension (N)\n* The first M elements contain the semiwidth of the uncertainty\n* interval of the corresponding eigenvalue in W\n*\n* WGAP (input/output) REAL array, dimension (N)\n* The separation from the right neighbor eigenvalue in W.\n*\n* IBLOCK (input) INTEGER array, dimension (N)\n* The indices of the blocks (submatrices) associated with the\n* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue\n* W(i) belongs to the first block from the top, =2 if W(i)\n* belongs to the second block, etc.\n*\n* INDEXW (input) INTEGER array, dimension (N)\n* The indices of the eigenvalues within each block (submatrix);\n* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the\n* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.\n*\n* GERS (input) REAL array, dimension (2*N)\n* The N Gerschgorin intervals (the i-th Gerschgorin interval\n* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should\n* be computed from the original UNshifted matrix.\n*\n* Z (output) COMPLEX array, dimension (LDZ, max(1,M) )\n* If INFO = 0, the first M columns of Z contain the\n* orthonormal eigenvectors of the matrix T\n* corresponding to the input eigenvalues, with the i-th\n* column of Z holding the eigenvector associated with W(i).\n* Note: the user must ensure that at least max(1,M) columns are\n* supplied in the array Z.\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDZ >= 1, and if\n* JOBZ = 'V', LDZ >= max(1,N).\n*\n* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )\n* The support of the eigenvectors in Z, i.e., the indices\n* indicating the nonzero elements in Z. The I-th eigenvector\n* is nonzero only in elements ISUPPZ( 2*I-1 ) through\n* ISUPPZ( 2*I ).\n*\n* WORK (workspace) REAL array, dimension (12*N)\n*\n* IWORK (workspace) INTEGER array, dimension (7*N)\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n*\n* > 0: A problem
|
71
|
+
printf("%s\n", "USAGE:\n z, isuppz, info, d, l, w, werr, wgap = NumRu::Lapack.clarrv( vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN, ISPLIT, M, DOL, DOU, MINRGP, RTOL1, RTOL2, W, WERR, WGAP, IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, WORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* CLARRV computes the eigenvectors of the tridiagonal matrix\n* T = L D L^T given L, D and APPROXIMATIONS to the eigenvalues of L D L^T.\n* The input eigenvalues should have been computed by SLARRE.\n*\n\n* Arguments\n* =========\n*\n* N (input) INTEGER\n* The order of the matrix. N >= 0.\n*\n* VL (input) REAL \n* VU (input) REAL \n* Lower and upper bounds of the interval that contains the desired\n* eigenvalues. VL < VU. Needed to compute gaps on the left or right\n* end of the extremal eigenvalues in the desired RANGE.\n*\n* D (input/output) REAL array, dimension (N)\n* On entry, the N diagonal elements of the diagonal matrix D.\n* On exit, D may be overwritten.\n*\n* L (input/output) REAL array, dimension (N)\n* On entry, the (N-1) subdiagonal elements of the unit\n* bidiagonal matrix L are in elements 1 to N-1 of L\n* (if the matrix is not split.) At the end of each block\n* is stored the corresponding shift as given by SLARRE.\n* On exit, L is overwritten.\n*\n* PIVMIN (in) DOUBLE PRECISION\n* The minimum pivot allowed in the Sturm sequence.\n*\n* ISPLIT (input) INTEGER array, dimension (N)\n* The splitting points, at which T breaks up into blocks.\n* The first block consists of rows/columns 1 to\n* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1\n* through ISPLIT( 2 ), etc.\n*\n* M (input) INTEGER\n* The total number of input eigenvalues. 0 <= M <= N.\n*\n* DOL (input) INTEGER\n* DOU (input) INTEGER\n* If the user wants to compute only selected eigenvectors from all\n* the eigenvalues supplied, he can specify an index range DOL:DOU.\n* Or else the setting DOL=1, DOU=M should be applied.\n* Note that DOL and DOU refer to the order in which the eigenvalues\n* are stored in W.\n* If the user wants to compute only selected eigenpairs, then\n* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the\n* computed eigenvectors. All other columns of Z are set to zero.\n*\n* MINRGP (input) REAL \n*\n* RTOL1 (input) REAL \n* RTOL2 (input) REAL \n* Parameters for bisection.\n* An interval [LEFT,RIGHT] has converged if\n* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )\n*\n* W (input/output) REAL array, dimension (N)\n* The first M elements of W contain the APPROXIMATE eigenvalues for\n* which eigenvectors are to be computed. The eigenvalues\n* should be grouped by split-off block and ordered from\n* smallest to largest within the block ( The output array\n* W from SLARRE is expected here ). Furthermore, they are with\n* respect to the shift of the corresponding root representation\n* for their block. On exit, W holds the eigenvalues of the\n* UNshifted matrix.\n*\n* WERR (input/output) REAL array, dimension (N)\n* The first M elements contain the semiwidth of the uncertainty\n* interval of the corresponding eigenvalue in W\n*\n* WGAP (input/output) REAL array, dimension (N)\n* The separation from the right neighbor eigenvalue in W.\n*\n* IBLOCK (input) INTEGER array, dimension (N)\n* The indices of the blocks (submatrices) associated with the\n* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue\n* W(i) belongs to the first block from the top, =2 if W(i)\n* belongs to the second block, etc.\n*\n* INDEXW (input) INTEGER array, dimension (N)\n* The indices of the eigenvalues within each block (submatrix);\n* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the\n* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.\n*\n* GERS (input) REAL array, dimension (2*N)\n* The N Gerschgorin intervals (the i-th Gerschgorin interval\n* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should\n* be computed from the original UNshifted matrix.\n*\n* Z (output) COMPLEX array, dimension (LDZ, max(1,M) )\n* If INFO = 0, the first M columns of Z contain the\n* orthonormal eigenvectors of the matrix T\n* corresponding to the input eigenvalues, with the i-th\n* column of Z holding the eigenvector associated with W(i).\n* Note: the user must ensure that at least max(1,M) columns are\n* supplied in the array Z.\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDZ >= 1, and if\n* JOBZ = 'V', LDZ >= max(1,N).\n*\n* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )\n* The support of the eigenvectors in Z, i.e., the indices\n* indicating the nonzero elements in Z. The I-th eigenvector\n* is nonzero only in elements ISUPPZ( 2*I-1 ) through\n* ISUPPZ( 2*I ).\n*\n* WORK (workspace) REAL array, dimension (12*N)\n*\n* IWORK (workspace) INTEGER array, dimension (7*N)\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n*\n* > 0: A problem occurred in CLARRV.\n* < 0: One of the called subroutines signaled an internal problem.\n* Needs inspection of the corresponding parameter IINFO\n* for further information.\n*\n* =-1: Problem in SLARRB when refining a child's eigenvalues.\n* =-2: Problem in SLARRF when computing the RRR of a child.\n* When a child is inside a tight cluster, it can be difficult\n* to find an RRR. A partial remedy from the user's point of\n* view is to make the parameter MINRGP smaller and recompile.\n* However, as the orthogonality of the computed vectors is\n* proportional to 1/MINRGP, the user should be aware that\n* he might be trading in precision when he decreases MINRGP.\n* =-3: Problem in SLARRB when refining a single eigenvalue\n* after the Rayleigh correction was rejected.\n* = 5: The Rayleigh Quotient Iteration failed to converge to\n* full accuracy in MAXITR steps.\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Beresford Parlett, University of California, Berkeley, USA\n* Jim Demmel, University of California, Berkeley, USA\n* Inderjit Dhillon, University of Texas, Austin, USA\n* Osni Marques, LBNL/NERSC, USA\n* Christof Voemel, University of California, Berkeley, USA\n*\n* =====================================================================\n*\n\n");
|
72
72
|
return Qnil;
|
73
73
|
}
|
74
74
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/clatdf.c
CHANGED
@@ -30,7 +30,7 @@ rblapack_clatdf(int argc, VALUE *argv, VALUE self){
|
|
30
30
|
argc--;
|
31
31
|
rblapack_options = argv[argc];
|
32
32
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
33
|
-
printf("%s\n", "USAGE:\n rhs, rdsum, rdscal = NumRu::Lapack.clatdf( ijob, z, rhs, rdsum, rdscal, ipiv, jpiv, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, JPIV )\n\n* Purpose\n* =======\n*\n* CLATDF computes the contribution to the reciprocal Dif-estimate\n* by solving for x in Z * x = b, where b is chosen such that the norm\n* of x is as large as possible. It is assumed that LU decomposition\n* of Z has been computed by CGETC2. On entry RHS = f holds the\n* contribution from earlier solved sub-systems, and on return RHS = x.\n*\n* The factorization of Z returned by CGETC2 has the form\n* Z = P * L * U * Q, where P and Q are permutation matrices. L is lower\n* triangular with unit diagonal elements and U is upper triangular.\n*\n\n* Arguments\n* =========\n*\n* IJOB (input) INTEGER\n* IJOB = 2: First compute an approximative null-vector e\n* of Z using CGECON, e is normalized and solve for\n* Zx = +-e - f with the sign giving the greater value of\n* 2-norm(x). About 5 times as expensive as Default.\n* IJOB .ne. 2: Local look ahead strategy where\n* all entries of the r.h.s. b is
|
33
|
+
printf("%s\n", "USAGE:\n rhs, rdsum, rdscal = NumRu::Lapack.clatdf( ijob, z, rhs, rdsum, rdscal, ipiv, jpiv, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, JPIV )\n\n* Purpose\n* =======\n*\n* CLATDF computes the contribution to the reciprocal Dif-estimate\n* by solving for x in Z * x = b, where b is chosen such that the norm\n* of x is as large as possible. It is assumed that LU decomposition\n* of Z has been computed by CGETC2. On entry RHS = f holds the\n* contribution from earlier solved sub-systems, and on return RHS = x.\n*\n* The factorization of Z returned by CGETC2 has the form\n* Z = P * L * U * Q, where P and Q are permutation matrices. L is lower\n* triangular with unit diagonal elements and U is upper triangular.\n*\n\n* Arguments\n* =========\n*\n* IJOB (input) INTEGER\n* IJOB = 2: First compute an approximative null-vector e\n* of Z using CGECON, e is normalized and solve for\n* Zx = +-e - f with the sign giving the greater value of\n* 2-norm(x). About 5 times as expensive as Default.\n* IJOB .ne. 2: Local look ahead strategy where\n* all entries of the r.h.s. b is chosen as either +1 or\n* -1. Default.\n*\n* N (input) INTEGER\n* The number of columns of the matrix Z.\n*\n* Z (input) REAL array, dimension (LDZ, N)\n* On entry, the LU part of the factorization of the n-by-n\n* matrix Z computed by CGETC2: Z = P * L * U * Q\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDA >= max(1, N).\n*\n* RHS (input/output) REAL array, dimension (N).\n* On entry, RHS contains contributions from other subsystems.\n* On exit, RHS contains the solution of the subsystem with\n* entries according to the value of IJOB (see above).\n*\n* RDSUM (input/output) REAL\n* On entry, the sum of squares of computed contributions to\n* the Dif-estimate under computation by CTGSYL, where the\n* scaling factor RDSCAL (see below) has been factored out.\n* On exit, the corresponding sum of squares updated with the\n* contributions from the current sub-system.\n* If TRANS = 'T' RDSUM is not touched.\n* NOTE: RDSUM only makes sense when CTGSY2 is called by CTGSYL.\n*\n* RDSCAL (input/output) REAL\n* On entry, scaling factor used to prevent overflow in RDSUM.\n* On exit, RDSCAL is updated w.r.t. the current contributions\n* in RDSUM.\n* If TRANS = 'T', RDSCAL is not touched.\n* NOTE: RDSCAL only makes sense when CTGSY2 is called by\n* CTGSYL.\n*\n* IPIV (input) INTEGER array, dimension (N).\n* The pivot indices; for 1 <= i <= N, row i of the\n* matrix has been interchanged with row IPIV(i).\n*\n* JPIV (input) INTEGER array, dimension (N).\n* The pivot indices; for 1 <= j <= N, column j of the\n* matrix has been interchanged with column JPIV(j).\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Bo Kagstrom and Peter Poromaa, Department of Computing Science,\n* Umea University, S-901 87 Umea, Sweden.\n*\n* This routine is a further developed implementation of algorithm\n* BSOLVE in [1] using complete pivoting in the LU factorization.\n*\n* [1] Bo Kagstrom and Lars Westin,\n* Generalized Schur Methods with Condition Estimators for\n* Solving the Generalized Sylvester Equation, IEEE Transactions\n* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.\n*\n* [2] Peter Poromaa,\n* On Efficient and Robust Estimators for the Separation\n* between two Regular Matrix Pairs with Applications in\n* Condition Estimation. Report UMINF-95.05, Department of\n* Computing Science, Umea University, S-901 87 Umea, Sweden,\n* 1995.\n*\n* =====================================================================\n*\n\n");
|
34
34
|
return Qnil;
|
35
35
|
}
|
36
36
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/cstegr.c
CHANGED
@@ -54,7 +54,7 @@ rblapack_cstegr(int argc, VALUE *argv, VALUE self){
|
|
54
54
|
argc--;
|
55
55
|
rblapack_options = argv[argc];
|
56
56
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
57
|
-
printf("%s\n", "USAGE:\n m, w, z, isuppz, work, iwork, info, d, e = NumRu::Lapack.cstegr( jobz, range, d, e, vl, vu, il, iu, abstol, [:lwork => lwork, :liwork => liwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO )\n\n* Purpose\n* =======\n*\n* CSTEGR computes selected eigenvalues and, optionally, eigenvectors\n* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has\n* a well defined set of pairwise different real eigenvalues, the corresponding\n* real eigenvectors are pairwise orthogonal.\n*\n* The spectrum may be computed either completely or partially by specifying\n* either an interval (VL,VU] or a range of indices IL:IU for the desired\n* eigenvalues.\n*\n* CSTEGR is a
|
57
|
+
printf("%s\n", "USAGE:\n m, w, z, isuppz, work, iwork, info, d, e = NumRu::Lapack.cstegr( jobz, range, d, e, vl, vu, il, iu, abstol, [:lwork => lwork, :liwork => liwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE CSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO )\n\n* Purpose\n* =======\n*\n* CSTEGR computes selected eigenvalues and, optionally, eigenvectors\n* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has\n* a well defined set of pairwise different real eigenvalues, the corresponding\n* real eigenvectors are pairwise orthogonal.\n*\n* The spectrum may be computed either completely or partially by specifying\n* either an interval (VL,VU] or a range of indices IL:IU for the desired\n* eigenvalues.\n*\n* CSTEGR is a compatibility wrapper around the improved CSTEMR routine.\n* See SSTEMR for further details.\n*\n* One important change is that the ABSTOL parameter no longer provides any\n* benefit and hence is no longer used.\n*\n* Note : CSTEGR and CSTEMR work only on machines which follow\n* IEEE-754 floating-point standard in their handling of infinities and\n* NaNs. Normal execution may create these exceptiona values and hence\n* may abort due to a floating point exception in environments which\n* do not conform to the IEEE-754 standard.\n*\n\n* Arguments\n* =========\n*\n* JOBZ (input) CHARACTER*1\n* = 'N': Compute eigenvalues only;\n* = 'V': Compute eigenvalues and eigenvectors.\n*\n* RANGE (input) CHARACTER*1\n* = 'A': all eigenvalues will be found.\n* = 'V': all eigenvalues in the half-open interval (VL,VU]\n* will be found.\n* = 'I': the IL-th through IU-th eigenvalues will be found.\n*\n* N (input) INTEGER\n* The order of the matrix. N >= 0.\n*\n* D (input/output) REAL array, dimension (N)\n* On entry, the N diagonal elements of the tridiagonal matrix\n* T. On exit, D is overwritten.\n*\n* E (input/output) REAL array, dimension (N)\n* On entry, the (N-1) subdiagonal elements of the tridiagonal\n* matrix T in elements 1 to N-1 of E. E(N) need not be set on\n* input, but is used internally as workspace.\n* On exit, E is overwritten.\n*\n* VL (input) REAL\n* VU (input) REAL\n* If RANGE='V', the lower and upper bounds of the interval to\n* be searched for eigenvalues. VL < VU.\n* Not referenced if RANGE = 'A' or 'I'.\n*\n* IL (input) INTEGER\n* IU (input) INTEGER\n* If RANGE='I', the indices (in ascending order) of the\n* smallest and largest eigenvalues to be returned.\n* 1 <= IL <= IU <= N, if N > 0.\n* Not referenced if RANGE = 'A' or 'V'.\n*\n* ABSTOL (input) REAL\n* Unused. Was the absolute error tolerance for the\n* eigenvalues/eigenvectors in previous versions.\n*\n* M (output) INTEGER\n* The total number of eigenvalues found. 0 <= M <= N.\n* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.\n*\n* W (output) REAL array, dimension (N)\n* The first M elements contain the selected eigenvalues in\n* ascending order.\n*\n* Z (output) COMPLEX array, dimension (LDZ, max(1,M) )\n* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z\n* contain the orthonormal eigenvectors of the matrix T\n* corresponding to the selected eigenvalues, with the i-th\n* column of Z holding the eigenvector associated with W(i).\n* If JOBZ = 'N', then Z is not referenced.\n* Note: the user must ensure that at least max(1,M) columns are\n* supplied in the array Z; if RANGE = 'V', the exact value of M\n* is not known in advance and an upper bound must be used.\n* Supplying N columns is always safe.\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDZ >= 1, and if\n* JOBZ = 'V', then LDZ >= max(1,N).\n*\n* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )\n* The support of the eigenvectors in Z, i.e., the indices\n* indicating the nonzero elements in Z. The i-th computed eigenvector\n* is nonzero only in elements ISUPPZ( 2*i-1 ) through\n* ISUPPZ( 2*i ). This is relevant in the case when the matrix\n* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.\n*\n* WORK (workspace/output) REAL array, dimension (LWORK)\n* On exit, if INFO = 0, WORK(1) returns the optimal\n* (and minimal) LWORK.\n*\n* LWORK (input) INTEGER\n* The dimension of the array WORK. LWORK >= max(1,18*N)\n* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.\n* If LWORK = -1, then a workspace query is assumed; the routine\n* only calculates the optimal size of the WORK array, returns\n* this value as the first entry of the WORK array, and no error\n* message related to LWORK is issued by XERBLA.\n*\n* IWORK (workspace/output) INTEGER array, dimension (LIWORK)\n* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.\n*\n* LIWORK (input) INTEGER\n* The dimension of the array IWORK. LIWORK >= max(1,10*N)\n* if the eigenvectors are desired, and LIWORK >= max(1,8*N)\n* if only the eigenvalues are to be computed.\n* If LIWORK = -1, then a workspace query is assumed; the\n* routine only calculates the optimal size of the IWORK array,\n* returns this value as the first entry of the IWORK array, and\n* no error message related to LIWORK is issued by XERBLA.\n*\n* INFO (output) INTEGER\n* On exit, INFO\n* = 0: successful exit\n* < 0: if INFO = -i, the i-th argument had an illegal value\n* > 0: if INFO = 1X, internal error in SLARRE,\n* if INFO = 2X, internal error in CLARRV.\n* Here, the digit X = ABS( IINFO ) < 10, where IINFO is\n* the nonzero error code returned by SLARRE or\n* CLARRV, respectively.\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Inderjit Dhillon, IBM Almaden, USA\n* Osni Marques, LBNL/NERSC, USA\n* Christof Voemel, LBNL/NERSC, USA\n*\n* =====================================================================\n*\n* .. Local Scalars ..\n LOGICAL TRYRAC\n* ..\n* .. External Subroutines ..\n EXTERNAL CSTEMR\n* ..\n\n");
|
58
58
|
return Qnil;
|
59
59
|
}
|
60
60
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dgelsd.c
CHANGED
@@ -41,7 +41,7 @@ rblapack_dgelsd(int argc, VALUE *argv, VALUE self){
|
|
41
41
|
argc--;
|
42
42
|
rblapack_options = argv[argc];
|
43
43
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
44
|
-
printf("%s\n", "USAGE:\n s, rank, work, info, b = NumRu::Lapack.dgelsd( a, b, rcond, [:lwork => lwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* DGELSD computes the minimum-norm solution to a real linear least\n* squares problem:\n* minimize 2-norm(| b - A*x |)\n* using the singular value decomposition (SVD) of A. A is an M-by-N\n* matrix which may be rank-deficient.\n*\n* Several right hand side vectors b and solution vectors x can be\n* handled in a single call; they are stored as the columns of the\n* M-by-NRHS right hand side matrix B and the N-by-NRHS solution\n* matrix X.\n*\n* The problem is solved in three steps:\n* (1) Reduce the coefficient matrix A to bidiagonal form with\n* Householder transformations, reducing the original problem\n* into a \"bidiagonal least squares problem\" (BLS)\n* (2) Solve the BLS using a divide and conquer approach.\n* (3) Apply back all the Householder
|
44
|
+
printf("%s\n", "USAGE:\n s, rank, work, info, b = NumRu::Lapack.dgelsd( a, b, rcond, [:lwork => lwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DGELSD( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK, LWORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* DGELSD computes the minimum-norm solution to a real linear least\n* squares problem:\n* minimize 2-norm(| b - A*x |)\n* using the singular value decomposition (SVD) of A. A is an M-by-N\n* matrix which may be rank-deficient.\n*\n* Several right hand side vectors b and solution vectors x can be\n* handled in a single call; they are stored as the columns of the\n* M-by-NRHS right hand side matrix B and the N-by-NRHS solution\n* matrix X.\n*\n* The problem is solved in three steps:\n* (1) Reduce the coefficient matrix A to bidiagonal form with\n* Householder transformations, reducing the original problem\n* into a \"bidiagonal least squares problem\" (BLS)\n* (2) Solve the BLS using a divide and conquer approach.\n* (3) Apply back all the Householder transformations to solve\n* the original least squares problem.\n*\n* The effective rank of A is determined by treating as zero those\n* singular values which are less than RCOND times the largest singular\n* value.\n*\n* The divide and conquer algorithm makes very mild assumptions about\n* floating point arithmetic. It will work on machines with a guard\n* digit in add/subtract, or on those binary machines without guard\n* digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or\n* Cray-2. It could conceivably fail on hexadecimal or decimal machines\n* without guard digits, but we know of none.\n*\n\n* Arguments\n* =========\n*\n* M (input) INTEGER\n* The number of rows of A. M >= 0.\n*\n* N (input) INTEGER\n* The number of columns of A. N >= 0.\n*\n* NRHS (input) INTEGER\n* The number of right hand sides, i.e., the number of columns\n* of the matrices B and X. NRHS >= 0.\n*\n* A (input) DOUBLE PRECISION array, dimension (LDA,N)\n* On entry, the M-by-N matrix A.\n* On exit, A has been destroyed.\n*\n* LDA (input) INTEGER\n* The leading dimension of the array A. LDA >= max(1,M).\n*\n* B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS)\n* On entry, the M-by-NRHS right hand side matrix B.\n* On exit, B is overwritten by the N-by-NRHS solution\n* matrix X. If m >= n and RANK = n, the residual\n* sum-of-squares for the solution in the i-th column is given\n* by the sum of squares of elements n+1:m in that column.\n*\n* LDB (input) INTEGER\n* The leading dimension of the array B. LDB >= max(1,max(M,N)).\n*\n* S (output) DOUBLE PRECISION array, dimension (min(M,N))\n* The singular values of A in decreasing order.\n* The condition number of A in the 2-norm = S(1)/S(min(m,n)).\n*\n* RCOND (input) DOUBLE PRECISION\n* RCOND is used to determine the effective rank of A.\n* Singular values S(i) <= RCOND*S(1) are treated as zero.\n* If RCOND < 0, machine precision is used instead.\n*\n* RANK (output) INTEGER\n* The effective rank of A, i.e., the number of singular values\n* which are greater than RCOND*S(1).\n*\n* WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))\n* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.\n*\n* LWORK (input) INTEGER\n* The dimension of the array WORK. LWORK must be at least 1.\n* The exact minimum amount of workspace needed depends on M,\n* N and NRHS. As long as LWORK is at least\n* 12*N + 2*N*SMLSIZ + 8*N*NLVL + N*NRHS + (SMLSIZ+1)**2,\n* if M is greater than or equal to N or\n* 12*M + 2*M*SMLSIZ + 8*M*NLVL + M*NRHS + (SMLSIZ+1)**2,\n* if M is less than N, the code will execute correctly.\n* SMLSIZ is returned by ILAENV and is equal to the maximum\n* size of the subproblems at the bottom of the computation\n* tree (usually about 25), and\n* NLVL = MAX( 0, INT( LOG_2( MIN( M,N )/(SMLSIZ+1) ) ) + 1 )\n* For good performance, LWORK should generally be larger.\n*\n* If LWORK = -1, then a workspace query is assumed; the routine\n* only calculates the optimal size of the WORK array, returns\n* this value as the first entry of the WORK array, and no error\n* message related to LWORK is issued by XERBLA.\n*\n* IWORK (workspace) INTEGER array, dimension (MAX(1,LIWORK))\n* LIWORK >= max(1, 3 * MINMN * NLVL + 11 * MINMN),\n* where MINMN = MIN( M,N ).\n* On exit, if INFO = 0, IWORK(1) returns the minimum LIWORK.\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n* < 0: if INFO = -i, the i-th argument had an illegal value.\n* > 0: the algorithm for computing the SVD failed to converge;\n* if INFO = i, i off-diagonal elements of an intermediate\n* bidiagonal form did not converge to zero.\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Ming Gu and Ren-Cang Li, Computer Science Division, University of\n* California at Berkeley, USA\n* Osni Marques, LBNL/NERSC, USA\n*\n* =====================================================================\n*\n\n");
|
45
45
|
return Qnil;
|
46
46
|
}
|
47
47
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dlamrg.c
CHANGED
@@ -24,7 +24,7 @@ rblapack_dlamrg(int argc, VALUE *argv, VALUE self){
|
|
24
24
|
argc--;
|
25
25
|
rblapack_options = argv[argc];
|
26
26
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
27
|
-
printf("%s\n", "USAGE:\n index = NumRu::Lapack.dlamrg( n1, n2, a, dtrd1, dtrd2, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )\n\n* Purpose\n* =======\n*\n* DLAMRG will create a permutation list which will merge the elements\n* of A (which is composed of two independently sorted sets) into a\n* single set which is sorted in ascending order.\n*\n\n* Arguments\n* =========\n*\n* N1 (input) INTEGER\n* N2 (input) INTEGER\n* These
|
27
|
+
printf("%s\n", "USAGE:\n index = NumRu::Lapack.dlamrg( n1, n2, a, dtrd1, dtrd2, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLAMRG( N1, N2, A, DTRD1, DTRD2, INDEX )\n\n* Purpose\n* =======\n*\n* DLAMRG will create a permutation list which will merge the elements\n* of A (which is composed of two independently sorted sets) into a\n* single set which is sorted in ascending order.\n*\n\n* Arguments\n* =========\n*\n* N1 (input) INTEGER\n* N2 (input) INTEGER\n* These arguments contain the respective lengths of the two\n* sorted lists to be merged.\n*\n* A (input) DOUBLE PRECISION array, dimension (N1+N2)\n* The first N1 elements of A contain a list of numbers which\n* are sorted in either ascending or descending order. Likewise\n* for the final N2 elements.\n*\n* DTRD1 (input) INTEGER\n* DTRD2 (input) INTEGER\n* These are the strides to be taken through the array A.\n* Allowable strides are 1 and -1. They indicate whether a\n* subset of A is sorted in ascending (DTRDx = 1) or descending\n* (DTRDx = -1) order.\n*\n* INDEX (output) INTEGER array, dimension (N1+N2)\n* On exit this array will contain a permutation such that\n* if B( I ) = A( INDEX( I ) ) for I=1,N1+N2, then B will be\n* sorted in ascending order.\n*\n\n* =====================================================================\n*\n* .. Local Scalars ..\n INTEGER I, IND1, IND2, N1SV, N2SV\n* ..\n\n");
|
28
28
|
return Qnil;
|
29
29
|
}
|
30
30
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dlarre.c
CHANGED
@@ -65,7 +65,7 @@ rblapack_dlarre(int argc, VALUE *argv, VALUE self){
|
|
65
65
|
argc--;
|
66
66
|
rblapack_options = argv[argc];
|
67
67
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
68
|
-
printf("%s\n", "USAGE:\n nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers, pivmin, info, vl, vu, d, e, e2 = NumRu::Lapack.dlarre( range, vl, vu, il, iu, d, e, e2, rtol1, rtol2, spltol, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n 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 )\n\n* Purpose\n* =======\n*\n* To find the desired eigenvalues of a given real symmetric\n* tridiagonal matrix T, DLARRE sets any \"small\" off-diagonal\n* elements to zero, and for each unreduced block T_i, it finds\n* (a) a suitable shift at one end of the block's spectrum,\n* (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and\n* (c) eigenvalues of each L_i D_i L_i^T.\n* The representations and eigenvalues found are then used by\n* DSTEMR to compute the eigenvectors of T.\n* The accuracy varies depending on whether bisection is used to\n* find a few eigenvalues or the dqds algorithm (subroutine DLASQ2) to\n* conpute all and then discard any unwanted one.\n* As an added benefit, DLARRE also outputs the n\n* Gerschgorin intervals for the matrices L_i D_i L_i^T.\n*\n\n* Arguments\n* =========\n*\n* RANGE (input) CHARACTER*1\n* = 'A': (\"All\") all eigenvalues will be found.\n* = 'V': (\"Value\") all eigenvalues in the half-open interval\n* (VL, VU] will be found.\n* = 'I': (\"Index\") the IL-th through IU-th eigenvalues (of the\n* entire matrix) will be found.\n*\n* N (input) INTEGER\n* The order of the matrix. N > 0.\n*\n* VL (input/output) DOUBLE PRECISION\n* VU (input/output) DOUBLE PRECISION\n* If RANGE='V', the lower and upper bounds for the eigenvalues.\n* Eigenvalues less than or equal to VL, or greater than VU,\n* will not be returned. VL < VU.\n* If RANGE='I' or ='A', DLARRE computes bounds on the desired\n* part of the spectrum.\n*\n* IL (input) INTEGER\n* IU (input) INTEGER\n* If RANGE='I', the indices (in ascending order) of the\n* smallest and largest eigenvalues to be returned.\n* 1 <= IL <= IU <= N.\n*\n* D (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the N diagonal elements of the tridiagonal\n* matrix T.\n* On exit, the N diagonal elements of the diagonal\n* matrices D_i.\n*\n* E (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the first (N-1) entries contain the subdiagonal\n* elements of the tridiagonal matrix T; E(N) need not be set.\n* On exit, E contains the subdiagonal elements of the unit\n* bidiagonal matrices L_i. The entries E( ISPLIT( I ) ),\n* 1 <= I <= NSPLIT, contain the base points sigma_i on output.\n*\n* E2 (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the first (N-1) entries contain the SQUARES of the\n* subdiagonal elements of the tridiagonal matrix T;\n* E2(N) need not be set.\n* On exit, the entries E2( ISPLIT( I ) ),\n* 1 <= I <= NSPLIT, have been set to zero\n*\n* RTOL1 (input) DOUBLE PRECISION\n* RTOL2 (input) DOUBLE PRECISION\n* Parameters for bisection.\n* An interval [LEFT,RIGHT] has converged if\n* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )\n*\n* SPLTOL (input) DOUBLE PRECISION\n* The threshold for splitting.\n*\n* NSPLIT (output) INTEGER\n* The number of blocks T splits into. 1 <= NSPLIT <= N.\n*\n* ISPLIT (output) INTEGER array, dimension (N)\n* The splitting points, at which T breaks up into blocks.\n* The first block consists of rows/columns 1 to ISPLIT(1),\n* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),\n* etc., and the NSPLIT-th consists of rows/columns\n* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.\n*\n* M (output) INTEGER\n* The total number of eigenvalues (of all L_i D_i L_i^T)\n* found.\n*\n* W (output) DOUBLE PRECISION array, dimension (N)\n* The first M elements contain the eigenvalues. The\n* eigenvalues of each of the blocks, L_i D_i L_i^T, are\n* sorted in ascending order ( DLARRE may use the\n* remaining N-M elements as workspace).\n*\n* WERR (output) DOUBLE PRECISION array, dimension (N)\n* The error bound on the corresponding eigenvalue in W.\n*\n* WGAP (output) DOUBLE PRECISION array, dimension (N)\n* The separation from the right neighbor eigenvalue in W.\n* The gap is only with respect to the eigenvalues of the same block\n* as each block has its own representation tree.\n* Exception: at the right end of a block we store the left gap\n*\n* IBLOCK (output) INTEGER array, dimension (N)\n* The indices of the blocks (submatrices) associated with the\n* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue\n* W(i) belongs to the first block from the top, =2 if W(i)\n* belongs to the second block, etc.\n*\n* INDEXW (output) INTEGER array, dimension (N)\n* The indices of the eigenvalues within each block (submatrix);\n* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the\n* i-th eigenvalue W(i) is the 10-th eigenvalue in block 2\n*\n* GERS (output) DOUBLE PRECISION array, dimension (2*N)\n* The N Gerschgorin intervals (the i-th Gerschgorin interval\n* is (GERS(2*i-1), GERS(2*i)).\n*\n* PIVMIN (output) DOUBLE PRECISION\n* The minimum pivot in the Sturm sequence for T.\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (6*N)\n* Workspace.\n*\n* IWORK (workspace) INTEGER array, dimension (5*N)\n* Workspace.\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n* > 0: A problem
|
68
|
+
printf("%s\n", "USAGE:\n nsplit, isplit, m, w, werr, wgap, iblock, indexw, gers, pivmin, info, vl, vu, d, e, e2 = NumRu::Lapack.dlarre( range, vl, vu, il, iu, d, e, e2, rtol1, rtol2, spltol, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n 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 )\n\n* Purpose\n* =======\n*\n* To find the desired eigenvalues of a given real symmetric\n* tridiagonal matrix T, DLARRE sets any \"small\" off-diagonal\n* elements to zero, and for each unreduced block T_i, it finds\n* (a) a suitable shift at one end of the block's spectrum,\n* (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and\n* (c) eigenvalues of each L_i D_i L_i^T.\n* The representations and eigenvalues found are then used by\n* DSTEMR to compute the eigenvectors of T.\n* The accuracy varies depending on whether bisection is used to\n* find a few eigenvalues or the dqds algorithm (subroutine DLASQ2) to\n* conpute all and then discard any unwanted one.\n* As an added benefit, DLARRE also outputs the n\n* Gerschgorin intervals for the matrices L_i D_i L_i^T.\n*\n\n* Arguments\n* =========\n*\n* RANGE (input) CHARACTER*1\n* = 'A': (\"All\") all eigenvalues will be found.\n* = 'V': (\"Value\") all eigenvalues in the half-open interval\n* (VL, VU] will be found.\n* = 'I': (\"Index\") the IL-th through IU-th eigenvalues (of the\n* entire matrix) will be found.\n*\n* N (input) INTEGER\n* The order of the matrix. N > 0.\n*\n* VL (input/output) DOUBLE PRECISION\n* VU (input/output) DOUBLE PRECISION\n* If RANGE='V', the lower and upper bounds for the eigenvalues.\n* Eigenvalues less than or equal to VL, or greater than VU,\n* will not be returned. VL < VU.\n* If RANGE='I' or ='A', DLARRE computes bounds on the desired\n* part of the spectrum.\n*\n* IL (input) INTEGER\n* IU (input) INTEGER\n* If RANGE='I', the indices (in ascending order) of the\n* smallest and largest eigenvalues to be returned.\n* 1 <= IL <= IU <= N.\n*\n* D (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the N diagonal elements of the tridiagonal\n* matrix T.\n* On exit, the N diagonal elements of the diagonal\n* matrices D_i.\n*\n* E (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the first (N-1) entries contain the subdiagonal\n* elements of the tridiagonal matrix T; E(N) need not be set.\n* On exit, E contains the subdiagonal elements of the unit\n* bidiagonal matrices L_i. The entries E( ISPLIT( I ) ),\n* 1 <= I <= NSPLIT, contain the base points sigma_i on output.\n*\n* E2 (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the first (N-1) entries contain the SQUARES of the\n* subdiagonal elements of the tridiagonal matrix T;\n* E2(N) need not be set.\n* On exit, the entries E2( ISPLIT( I ) ),\n* 1 <= I <= NSPLIT, have been set to zero\n*\n* RTOL1 (input) DOUBLE PRECISION\n* RTOL2 (input) DOUBLE PRECISION\n* Parameters for bisection.\n* An interval [LEFT,RIGHT] has converged if\n* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )\n*\n* SPLTOL (input) DOUBLE PRECISION\n* The threshold for splitting.\n*\n* NSPLIT (output) INTEGER\n* The number of blocks T splits into. 1 <= NSPLIT <= N.\n*\n* ISPLIT (output) INTEGER array, dimension (N)\n* The splitting points, at which T breaks up into blocks.\n* The first block consists of rows/columns 1 to ISPLIT(1),\n* the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),\n* etc., and the NSPLIT-th consists of rows/columns\n* ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.\n*\n* M (output) INTEGER\n* The total number of eigenvalues (of all L_i D_i L_i^T)\n* found.\n*\n* W (output) DOUBLE PRECISION array, dimension (N)\n* The first M elements contain the eigenvalues. The\n* eigenvalues of each of the blocks, L_i D_i L_i^T, are\n* sorted in ascending order ( DLARRE may use the\n* remaining N-M elements as workspace).\n*\n* WERR (output) DOUBLE PRECISION array, dimension (N)\n* The error bound on the corresponding eigenvalue in W.\n*\n* WGAP (output) DOUBLE PRECISION array, dimension (N)\n* The separation from the right neighbor eigenvalue in W.\n* The gap is only with respect to the eigenvalues of the same block\n* as each block has its own representation tree.\n* Exception: at the right end of a block we store the left gap\n*\n* IBLOCK (output) INTEGER array, dimension (N)\n* The indices of the blocks (submatrices) associated with the\n* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue\n* W(i) belongs to the first block from the top, =2 if W(i)\n* belongs to the second block, etc.\n*\n* INDEXW (output) INTEGER array, dimension (N)\n* The indices of the eigenvalues within each block (submatrix);\n* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the\n* i-th eigenvalue W(i) is the 10-th eigenvalue in block 2\n*\n* GERS (output) DOUBLE PRECISION array, dimension (2*N)\n* The N Gerschgorin intervals (the i-th Gerschgorin interval\n* is (GERS(2*i-1), GERS(2*i)).\n*\n* PIVMIN (output) DOUBLE PRECISION\n* The minimum pivot in the Sturm sequence for T.\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (6*N)\n* Workspace.\n*\n* IWORK (workspace) INTEGER array, dimension (5*N)\n* Workspace.\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n* > 0: A problem occurred in DLARRE.\n* < 0: One of the called subroutines signaled an internal problem.\n* Needs inspection of the corresponding parameter IINFO\n* for further information.\n*\n* =-1: Problem in DLARRD.\n* = 2: No base representation could be found in MAXTRY iterations.\n* Increasing MAXTRY and recompilation might be a remedy.\n* =-3: Problem in DLARRB when computing the refined root\n* representation for DLASQ2.\n* =-4: Problem in DLARRB when preforming bisection on the\n* desired part of the spectrum.\n* =-5: Problem in DLASQ2.\n* =-6: Problem in DLASQ2.\n*\n\n* Further Details\n* The base representations are required to suffer very little\n* element growth and consequently define all their eigenvalues to\n* high relative accuracy.\n* ===============\n*\n* Based on contributions by\n* Beresford Parlett, University of California, Berkeley, USA\n* Jim Demmel, University of California, Berkeley, USA\n* Inderjit Dhillon, University of Texas, Austin, USA\n* Osni Marques, LBNL/NERSC, USA\n* Christof Voemel, University of California, Berkeley, USA\n*\n* =====================================================================\n*\n\n");
|
69
69
|
return Qnil;
|
70
70
|
}
|
71
71
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dlarrv.c
CHANGED
@@ -68,7 +68,7 @@ rblapack_dlarrv(int argc, VALUE *argv, VALUE self){
|
|
68
68
|
argc--;
|
69
69
|
rblapack_options = argv[argc];
|
70
70
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
71
|
-
printf("%s\n", "USAGE:\n z, isuppz, info, d, l, w, werr, wgap = NumRu::Lapack.dlarrv( vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN, ISPLIT, M, DOL, DOU, MINRGP, RTOL1, RTOL2, W, WERR, WGAP, IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, WORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* DLARRV computes the eigenvectors of the tridiagonal matrix\n* T = L D L^T given L, D and APPROXIMATIONS to the eigenvalues of L D L^T.\n* The input eigenvalues should have been computed by DLARRE.\n*\n\n* Arguments\n* =========\n*\n* N (input) INTEGER\n* The order of the matrix. N >= 0.\n*\n* VL (input) DOUBLE PRECISION\n* VU (input) DOUBLE PRECISION\n* Lower and upper bounds of the interval that contains the desired\n* eigenvalues. VL < VU. Needed to compute gaps on the left or right\n* end of the extremal eigenvalues in the desired RANGE.\n*\n* D (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the N diagonal elements of the diagonal matrix D.\n* On exit, D may be overwritten.\n*\n* L (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the (N-1) subdiagonal elements of the unit\n* bidiagonal matrix L are in elements 1 to N-1 of L\n* (if the matrix is not split.) At the end of each block\n* is stored the corresponding shift as given by DLARRE.\n* On exit, L is overwritten.\n*\n* PIVMIN (input) DOUBLE PRECISION\n* The minimum pivot allowed in the Sturm sequence.\n*\n* ISPLIT (input) INTEGER array, dimension (N)\n* The splitting points, at which T breaks up into blocks.\n* The first block consists of rows/columns 1 to\n* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1\n* through ISPLIT( 2 ), etc.\n*\n* M (input) INTEGER\n* The total number of input eigenvalues. 0 <= M <= N.\n*\n* DOL (input) INTEGER\n* DOU (input) INTEGER\n* If the user wants to compute only selected eigenvectors from all\n* the eigenvalues supplied, he can specify an index range DOL:DOU.\n* Or else the setting DOL=1, DOU=M should be applied.\n* Note that DOL and DOU refer to the order in which the eigenvalues\n* are stored in W.\n* If the user wants to compute only selected eigenpairs, then\n* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the\n* computed eigenvectors. All other columns of Z are set to zero.\n*\n* MINRGP (input) DOUBLE PRECISION\n*\n* RTOL1 (input) DOUBLE PRECISION\n* RTOL2 (input) DOUBLE PRECISION\n* Parameters for bisection.\n* An interval [LEFT,RIGHT] has converged if\n* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )\n*\n* W (input/output) DOUBLE PRECISION array, dimension (N)\n* The first M elements of W contain the APPROXIMATE eigenvalues for\n* which eigenvectors are to be computed. The eigenvalues\n* should be grouped by split-off block and ordered from\n* smallest to largest within the block ( The output array\n* W from DLARRE is expected here ). Furthermore, they are with\n* respect to the shift of the corresponding root representation\n* for their block. On exit, W holds the eigenvalues of the\n* UNshifted matrix.\n*\n* WERR (input/output) DOUBLE PRECISION array, dimension (N)\n* The first M elements contain the semiwidth of the uncertainty\n* interval of the corresponding eigenvalue in W\n*\n* WGAP (input/output) DOUBLE PRECISION array, dimension (N)\n* The separation from the right neighbor eigenvalue in W.\n*\n* IBLOCK (input) INTEGER array, dimension (N)\n* The indices of the blocks (submatrices) associated with the\n* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue\n* W(i) belongs to the first block from the top, =2 if W(i)\n* belongs to the second block, etc.\n*\n* INDEXW (input) INTEGER array, dimension (N)\n* The indices of the eigenvalues within each block (submatrix);\n* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the\n* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.\n*\n* GERS (input) DOUBLE PRECISION array, dimension (2*N)\n* The N Gerschgorin intervals (the i-th Gerschgorin interval\n* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should\n* be computed from the original UNshifted matrix.\n*\n* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )\n* If INFO = 0, the first M columns of Z contain the\n* orthonormal eigenvectors of the matrix T\n* corresponding to the input eigenvalues, with the i-th\n* column of Z holding the eigenvector associated with W(i).\n* Note: the user must ensure that at least max(1,M) columns are\n* supplied in the array Z.\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDZ >= 1, and if\n* JOBZ = 'V', LDZ >= max(1,N).\n*\n* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )\n* The support of the eigenvectors in Z, i.e., the indices\n* indicating the nonzero elements in Z. The I-th eigenvector\n* is nonzero only in elements ISUPPZ( 2*I-1 ) through\n* ISUPPZ( 2*I ).\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (12*N)\n*\n* IWORK (workspace) INTEGER array, dimension (7*N)\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n*\n* > 0: A problem
|
71
|
+
printf("%s\n", "USAGE:\n z, isuppz, info, d, l, w, werr, wgap = NumRu::Lapack.dlarrv( vl, vu, d, l, pivmin, isplit, m, dol, dou, minrgp, rtol1, rtol2, w, werr, wgap, iblock, indexw, gers, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN, ISPLIT, M, DOL, DOU, MINRGP, RTOL1, RTOL2, W, WERR, WGAP, IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, WORK, IWORK, INFO )\n\n* Purpose\n* =======\n*\n* DLARRV computes the eigenvectors of the tridiagonal matrix\n* T = L D L^T given L, D and APPROXIMATIONS to the eigenvalues of L D L^T.\n* The input eigenvalues should have been computed by DLARRE.\n*\n\n* Arguments\n* =========\n*\n* N (input) INTEGER\n* The order of the matrix. N >= 0.\n*\n* VL (input) DOUBLE PRECISION\n* VU (input) DOUBLE PRECISION\n* Lower and upper bounds of the interval that contains the desired\n* eigenvalues. VL < VU. Needed to compute gaps on the left or right\n* end of the extremal eigenvalues in the desired RANGE.\n*\n* D (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the N diagonal elements of the diagonal matrix D.\n* On exit, D may be overwritten.\n*\n* L (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the (N-1) subdiagonal elements of the unit\n* bidiagonal matrix L are in elements 1 to N-1 of L\n* (if the matrix is not split.) At the end of each block\n* is stored the corresponding shift as given by DLARRE.\n* On exit, L is overwritten.\n*\n* PIVMIN (input) DOUBLE PRECISION\n* The minimum pivot allowed in the Sturm sequence.\n*\n* ISPLIT (input) INTEGER array, dimension (N)\n* The splitting points, at which T breaks up into blocks.\n* The first block consists of rows/columns 1 to\n* ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1\n* through ISPLIT( 2 ), etc.\n*\n* M (input) INTEGER\n* The total number of input eigenvalues. 0 <= M <= N.\n*\n* DOL (input) INTEGER\n* DOU (input) INTEGER\n* If the user wants to compute only selected eigenvectors from all\n* the eigenvalues supplied, he can specify an index range DOL:DOU.\n* Or else the setting DOL=1, DOU=M should be applied.\n* Note that DOL and DOU refer to the order in which the eigenvalues\n* are stored in W.\n* If the user wants to compute only selected eigenpairs, then\n* the columns DOL-1 to DOU+1 of the eigenvector space Z contain the\n* computed eigenvectors. All other columns of Z are set to zero.\n*\n* MINRGP (input) DOUBLE PRECISION\n*\n* RTOL1 (input) DOUBLE PRECISION\n* RTOL2 (input) DOUBLE PRECISION\n* Parameters for bisection.\n* An interval [LEFT,RIGHT] has converged if\n* RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )\n*\n* W (input/output) DOUBLE PRECISION array, dimension (N)\n* The first M elements of W contain the APPROXIMATE eigenvalues for\n* which eigenvectors are to be computed. The eigenvalues\n* should be grouped by split-off block and ordered from\n* smallest to largest within the block ( The output array\n* W from DLARRE is expected here ). Furthermore, they are with\n* respect to the shift of the corresponding root representation\n* for their block. On exit, W holds the eigenvalues of the\n* UNshifted matrix.\n*\n* WERR (input/output) DOUBLE PRECISION array, dimension (N)\n* The first M elements contain the semiwidth of the uncertainty\n* interval of the corresponding eigenvalue in W\n*\n* WGAP (input/output) DOUBLE PRECISION array, dimension (N)\n* The separation from the right neighbor eigenvalue in W.\n*\n* IBLOCK (input) INTEGER array, dimension (N)\n* The indices of the blocks (submatrices) associated with the\n* corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue\n* W(i) belongs to the first block from the top, =2 if W(i)\n* belongs to the second block, etc.\n*\n* INDEXW (input) INTEGER array, dimension (N)\n* The indices of the eigenvalues within each block (submatrix);\n* for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the\n* i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.\n*\n* GERS (input) DOUBLE PRECISION array, dimension (2*N)\n* The N Gerschgorin intervals (the i-th Gerschgorin interval\n* is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should\n* be computed from the original UNshifted matrix.\n*\n* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )\n* If INFO = 0, the first M columns of Z contain the\n* orthonormal eigenvectors of the matrix T\n* corresponding to the input eigenvalues, with the i-th\n* column of Z holding the eigenvector associated with W(i).\n* Note: the user must ensure that at least max(1,M) columns are\n* supplied in the array Z.\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDZ >= 1, and if\n* JOBZ = 'V', LDZ >= max(1,N).\n*\n* ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )\n* The support of the eigenvectors in Z, i.e., the indices\n* indicating the nonzero elements in Z. The I-th eigenvector\n* is nonzero only in elements ISUPPZ( 2*I-1 ) through\n* ISUPPZ( 2*I ).\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (12*N)\n*\n* IWORK (workspace) INTEGER array, dimension (7*N)\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n*\n* > 0: A problem occurred in DLARRV.\n* < 0: One of the called subroutines signaled an internal problem.\n* Needs inspection of the corresponding parameter IINFO\n* for further information.\n*\n* =-1: Problem in DLARRB when refining a child's eigenvalues.\n* =-2: Problem in DLARRF when computing the RRR of a child.\n* When a child is inside a tight cluster, it can be difficult\n* to find an RRR. A partial remedy from the user's point of\n* view is to make the parameter MINRGP smaller and recompile.\n* However, as the orthogonality of the computed vectors is\n* proportional to 1/MINRGP, the user should be aware that\n* he might be trading in precision when he decreases MINRGP.\n* =-3: Problem in DLARRB when refining a single eigenvalue\n* after the Rayleigh correction was rejected.\n* = 5: The Rayleigh Quotient Iteration failed to converge to\n* full accuracy in MAXITR steps.\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Beresford Parlett, University of California, Berkeley, USA\n* Jim Demmel, University of California, Berkeley, USA\n* Inderjit Dhillon, University of Texas, Austin, USA\n* Osni Marques, LBNL/NERSC, USA\n* Christof Voemel, University of California, Berkeley, USA\n*\n* =====================================================================\n*\n\n");
|
72
72
|
return Qnil;
|
73
73
|
}
|
74
74
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dlasdq.c
CHANGED
@@ -47,7 +47,7 @@ rblapack_dlasdq(int argc, VALUE *argv, VALUE self){
|
|
47
47
|
argc--;
|
48
48
|
rblapack_options = argv[argc];
|
49
49
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
50
|
-
printf("%s\n", "USAGE:\n info, d, e, vt, u, c = NumRu::Lapack.dlasdq( uplo, sqre, nru, d, e, vt, u, c, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, LDU, C, LDC, WORK, INFO )\n\n* Purpose\n* =======\n*\n* DLASDQ computes the singular value decomposition (SVD) of a real\n* (upper or lower) bidiagonal matrix with diagonal D and offdiagonal\n* E, accumulating the transformations if desired. Letting B denote\n* the input bidiagonal matrix, the algorithm computes orthogonal\n* matrices Q and P such that B = Q * S * P' (P' denotes the transpose\n* of P). The singular values S are overwritten on D.\n*\n* The input matrix U is changed to U * Q if desired.\n* The input matrix VT is changed to P' * VT if desired.\n* The input matrix C is changed to Q' * C if desired.\n*\n* See \"Computing Small Singular Values of Bidiagonal Matrices With\n* Guaranteed High Relative Accuracy,\" by J. Demmel and W. Kahan,\n* LAPACK Working Note #3, for a detailed description of the algorithm.\n*\n\n* Arguments\n* =========\n*\n* UPLO (input) CHARACTER*1\n* On entry, UPLO specifies whether the input bidiagonal matrix\n* is upper or lower bidiagonal, and
|
50
|
+
printf("%s\n", "USAGE:\n info, d, e, vt, u, c = NumRu::Lapack.dlasdq( uplo, sqre, nru, d, e, vt, u, c, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLASDQ( UPLO, SQRE, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, LDU, C, LDC, WORK, INFO )\n\n* Purpose\n* =======\n*\n* DLASDQ computes the singular value decomposition (SVD) of a real\n* (upper or lower) bidiagonal matrix with diagonal D and offdiagonal\n* E, accumulating the transformations if desired. Letting B denote\n* the input bidiagonal matrix, the algorithm computes orthogonal\n* matrices Q and P such that B = Q * S * P' (P' denotes the transpose\n* of P). The singular values S are overwritten on D.\n*\n* The input matrix U is changed to U * Q if desired.\n* The input matrix VT is changed to P' * VT if desired.\n* The input matrix C is changed to Q' * C if desired.\n*\n* See \"Computing Small Singular Values of Bidiagonal Matrices With\n* Guaranteed High Relative Accuracy,\" by J. Demmel and W. Kahan,\n* LAPACK Working Note #3, for a detailed description of the algorithm.\n*\n\n* Arguments\n* =========\n*\n* UPLO (input) CHARACTER*1\n* On entry, UPLO specifies whether the input bidiagonal matrix\n* is upper or lower bidiagonal, and whether it is square are\n* not.\n* UPLO = 'U' or 'u' B is upper bidiagonal.\n* UPLO = 'L' or 'l' B is lower bidiagonal.\n*\n* SQRE (input) INTEGER\n* = 0: then the input matrix is N-by-N.\n* = 1: then the input matrix is N-by-(N+1) if UPLU = 'U' and\n* (N+1)-by-N if UPLU = 'L'.\n*\n* The bidiagonal matrix has\n* N = NL + NR + 1 rows and\n* M = N + SQRE >= N columns.\n*\n* N (input) INTEGER\n* On entry, N specifies the number of rows and columns\n* in the matrix. N must be at least 0.\n*\n* NCVT (input) INTEGER\n* On entry, NCVT specifies the number of columns of\n* the matrix VT. NCVT must be at least 0.\n*\n* NRU (input) INTEGER\n* On entry, NRU specifies the number of rows of\n* the matrix U. NRU must be at least 0.\n*\n* NCC (input) INTEGER\n* On entry, NCC specifies the number of columns of\n* the matrix C. NCC must be at least 0.\n*\n* D (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, D contains the diagonal entries of the\n* bidiagonal matrix whose SVD is desired. On normal exit,\n* D contains the singular values in ascending order.\n*\n* E (input/output) DOUBLE PRECISION array.\n* dimension is (N-1) if SQRE = 0 and N if SQRE = 1.\n* On entry, the entries of E contain the offdiagonal entries\n* of the bidiagonal matrix whose SVD is desired. On normal\n* exit, E will contain 0. If the algorithm does not converge,\n* D and E will contain the diagonal and superdiagonal entries\n* of a bidiagonal matrix orthogonally equivalent to the one\n* given as input.\n*\n* VT (input/output) DOUBLE PRECISION array, dimension (LDVT, NCVT)\n* On entry, contains a matrix which on exit has been\n* premultiplied by P', dimension N-by-NCVT if SQRE = 0\n* and (N+1)-by-NCVT if SQRE = 1 (not referenced if NCVT=0).\n*\n* LDVT (input) INTEGER\n* On entry, LDVT specifies the leading dimension of VT as\n* declared in the calling (sub) program. LDVT must be at\n* least 1. If NCVT is nonzero LDVT must also be at least N.\n*\n* U (input/output) DOUBLE PRECISION array, dimension (LDU, N)\n* On entry, contains a matrix which on exit has been\n* postmultiplied by Q, dimension NRU-by-N if SQRE = 0\n* and NRU-by-(N+1) if SQRE = 1 (not referenced if NRU=0).\n*\n* LDU (input) INTEGER\n* On entry, LDU specifies the leading dimension of U as\n* declared in the calling (sub) program. LDU must be at\n* least max( 1, NRU ) .\n*\n* C (input/output) DOUBLE PRECISION array, dimension (LDC, NCC)\n* On entry, contains an N-by-NCC matrix which on exit\n* has been premultiplied by Q' dimension N-by-NCC if SQRE = 0\n* and (N+1)-by-NCC if SQRE = 1 (not referenced if NCC=0).\n*\n* LDC (input) INTEGER\n* On entry, LDC specifies the leading dimension of C as\n* declared in the calling (sub) program. LDC must be at\n* least 1. If NCC is nonzero, LDC must also be at least N.\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (4*N)\n* Workspace. Only referenced if one of NCVT, NRU, or NCC is\n* nonzero, and if N is at least 2.\n*\n* INFO (output) INTEGER\n* On exit, a value of 0 indicates a successful exit.\n* If INFO < 0, argument number -INFO is illegal.\n* If INFO > 0, the algorithm did not converge, and INFO\n* specifies how many superdiagonals did not converge.\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Ming Gu and Huan Ren, Computer Science Division, University of\n* California at Berkeley, USA\n*\n* =====================================================================\n*\n\n");
|
51
51
|
return Qnil;
|
52
52
|
}
|
53
53
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dlat2s.c
CHANGED
@@ -23,7 +23,7 @@ rblapack_dlat2s(int argc, VALUE *argv, VALUE self){
|
|
23
23
|
argc--;
|
24
24
|
rblapack_options = argv[argc];
|
25
25
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
26
|
-
printf("%s\n", "USAGE:\n sa, info = NumRu::Lapack.dlat2s( uplo, a, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )\n\n* Purpose\n* =======\n*\n* DLAT2S converts a DOUBLE PRECISION triangular matrix, SA, to a SINGLE\n* PRECISION triangular matrix, A.\n*\n* RMAX is the overflow for the SINGLE PRECISION arithmetic\n* DLAS2S checks that all the entries of A are between -RMAX and\n* RMAX. If not the
|
26
|
+
printf("%s\n", "USAGE:\n sa, info = NumRu::Lapack.dlat2s( uplo, a, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLAT2S( UPLO, N, A, LDA, SA, LDSA, INFO )\n\n* Purpose\n* =======\n*\n* DLAT2S converts a DOUBLE PRECISION triangular matrix, SA, to a SINGLE\n* PRECISION triangular matrix, A.\n*\n* RMAX is the overflow for the SINGLE PRECISION arithmetic\n* DLAS2S checks that all the entries of A are between -RMAX and\n* RMAX. If not the conversion is aborted and a flag is raised.\n*\n* This is an auxiliary routine so there is no argument checking.\n*\n\n* Arguments\n* =========\n*\n* UPLO (input) CHARACTER*1\n* = 'U': A is upper triangular;\n* = 'L': A is lower triangular.\n*\n* N (input) INTEGER\n* The number of rows and columns of the matrix A. N >= 0.\n*\n* A (input) DOUBLE PRECISION array, dimension (LDA,N)\n* On entry, the N-by-N triangular coefficient matrix A.\n*\n* LDA (input) INTEGER\n* The leading dimension of the array A. LDA >= max(1,N).\n*\n* SA (output) REAL array, dimension (LDSA,N)\n* Only the UPLO part of SA is referenced. On exit, if INFO=0,\n* the N-by-N coefficient matrix SA; if INFO>0, the content of\n* the UPLO part of SA is unspecified.\n*\n* LDSA (input) INTEGER\n* The leading dimension of the array SA. LDSA >= max(1,M).\n*\n* INFO (output) INTEGER\n* = 0: successful exit.\n* = 1: an entry of the matrix A is greater than the SINGLE\n* PRECISION overflow threshold, in this case, the content\n* of the UPLO part of SA in exit is unspecified.\n*\n* =========\n*\n* .. Local Scalars ..\n INTEGER I, J\n DOUBLE PRECISION RMAX\n LOGICAL UPPER\n* ..\n* .. External Functions ..\n REAL SLAMCH\n LOGICAL LSAME\n EXTERNAL SLAMCH, LSAME\n* ..\n\n");
|
27
27
|
return Qnil;
|
28
28
|
}
|
29
29
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dlatdf.c
CHANGED
@@ -30,7 +30,7 @@ rblapack_dlatdf(int argc, VALUE *argv, VALUE self){
|
|
30
30
|
argc--;
|
31
31
|
rblapack_options = argv[argc];
|
32
32
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
33
|
-
printf("%s\n", "USAGE:\n rhs, rdsum, rdscal = NumRu::Lapack.dlatdf( ijob, z, rhs, rdsum, rdscal, ipiv, jpiv, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, JPIV )\n\n* Purpose\n* =======\n*\n* DLATDF uses the LU factorization of the n-by-n matrix Z computed by\n* DGETC2 and computes a contribution to the reciprocal Dif-estimate\n* by solving Z * x = b for x, and choosing the r.h.s. b such that\n* the norm of x is as large as possible. On entry RHS = b holds the\n* contribution from earlier solved sub-systems, and on return RHS = x.\n*\n* The factorization of Z returned by DGETC2 has the form Z = P*L*U*Q,\n* where P and Q are permutation matrices. L is lower triangular with\n* unit diagonal elements and U is upper triangular.\n*\n\n* Arguments\n* =========\n*\n* IJOB (input) INTEGER\n* IJOB = 2: First compute an approximative null-vector e\n* of Z using DGECON, e is normalized and solve for\n* Zx = +-e - f with the sign giving the greater value\n* of 2-norm(x). About 5 times as expensive as Default.\n* IJOB .ne. 2: Local look ahead strategy where all entries of\n* the r.h.s. b is
|
33
|
+
printf("%s\n", "USAGE:\n rhs, rdsum, rdscal = NumRu::Lapack.dlatdf( ijob, z, rhs, rdsum, rdscal, ipiv, jpiv, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, JPIV )\n\n* Purpose\n* =======\n*\n* DLATDF uses the LU factorization of the n-by-n matrix Z computed by\n* DGETC2 and computes a contribution to the reciprocal Dif-estimate\n* by solving Z * x = b for x, and choosing the r.h.s. b such that\n* the norm of x is as large as possible. On entry RHS = b holds the\n* contribution from earlier solved sub-systems, and on return RHS = x.\n*\n* The factorization of Z returned by DGETC2 has the form Z = P*L*U*Q,\n* where P and Q are permutation matrices. L is lower triangular with\n* unit diagonal elements and U is upper triangular.\n*\n\n* Arguments\n* =========\n*\n* IJOB (input) INTEGER\n* IJOB = 2: First compute an approximative null-vector e\n* of Z using DGECON, e is normalized and solve for\n* Zx = +-e - f with the sign giving the greater value\n* of 2-norm(x). About 5 times as expensive as Default.\n* IJOB .ne. 2: Local look ahead strategy where all entries of\n* the r.h.s. b is chosen as either +1 or -1 (Default).\n*\n* N (input) INTEGER\n* The number of columns of the matrix Z.\n*\n* Z (input) DOUBLE PRECISION array, dimension (LDZ, N)\n* On entry, the LU part of the factorization of the n-by-n\n* matrix Z computed by DGETC2: Z = P * L * U * Q\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDA >= max(1, N).\n*\n* RHS (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, RHS contains contributions from other subsystems.\n* On exit, RHS contains the solution of the subsystem with\n* entries acoording to the value of IJOB (see above).\n*\n* RDSUM (input/output) DOUBLE PRECISION\n* On entry, the sum of squares of computed contributions to\n* the Dif-estimate under computation by DTGSYL, where the\n* scaling factor RDSCAL (see below) has been factored out.\n* On exit, the corresponding sum of squares updated with the\n* contributions from the current sub-system.\n* If TRANS = 'T' RDSUM is not touched.\n* NOTE: RDSUM only makes sense when DTGSY2 is called by STGSYL.\n*\n* RDSCAL (input/output) DOUBLE PRECISION\n* On entry, scaling factor used to prevent overflow in RDSUM.\n* On exit, RDSCAL is updated w.r.t. the current contributions\n* in RDSUM.\n* If TRANS = 'T', RDSCAL is not touched.\n* NOTE: RDSCAL only makes sense when DTGSY2 is called by\n* DTGSYL.\n*\n* IPIV (input) INTEGER array, dimension (N).\n* The pivot indices; for 1 <= i <= N, row i of the\n* matrix has been interchanged with row IPIV(i).\n*\n* JPIV (input) INTEGER array, dimension (N).\n* The pivot indices; for 1 <= j <= N, column j of the\n* matrix has been interchanged with column JPIV(j).\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Bo Kagstrom and Peter Poromaa, Department of Computing Science,\n* Umea University, S-901 87 Umea, Sweden.\n*\n* This routine is a further developed implementation of algorithm\n* BSOLVE in [1] using complete pivoting in the LU factorization.\n*\n* [1] Bo Kagstrom and Lars Westin,\n* Generalized Schur Methods with Condition Estimators for\n* Solving the Generalized Sylvester Equation, IEEE Transactions\n* on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.\n*\n* [2] Peter Poromaa,\n* On Efficient and Robust Estimators for the Separation\n* between two Regular Matrix Pairs with Applications in\n* Condition Estimation. Report IMINF-95.05, Departement of\n* Computing Science, Umea University, S-901 87 Umea, Sweden, 1995.\n*\n* =====================================================================\n*\n\n");
|
34
34
|
return Qnil;
|
35
35
|
}
|
36
36
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dsgesv.c
CHANGED
@@ -33,7 +33,7 @@ rblapack_dsgesv(int argc, VALUE *argv, VALUE self){
|
|
33
33
|
argc--;
|
34
34
|
rblapack_options = argv[argc];
|
35
35
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
36
|
-
printf("%s\n", "USAGE:\n ipiv, x, iter, info, a = NumRu::Lapack.dsgesv( a, b, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DSGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK, SWORK, ITER, INFO )\n\n* Purpose\n* =======\n*\n* DSGESV computes the solution to a real system of linear equations\n* A * X = B,\n* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.\n*\n* DSGESV first attempts to factorize the matrix in SINGLE PRECISION\n* and use this factorization within an iterative refinement procedure\n* to produce a solution with DOUBLE PRECISION normwise backward error\n* quality (see below). If the approach fails the method switches to a\n* DOUBLE PRECISION factorization and solve.\n*\n* The iterative refinement is not going to be a winning strategy if\n* the ratio SINGLE PRECISION performance over DOUBLE PRECISION\n* performance is too small. A reasonable strategy should take the\n* number of right-hand sides and the size of the matrix into account.\n* This might be done with a call to ILAENV in the future. Up to now, we\n* always try iterative refinement.\n*\n* The iterative refinement process is stopped if\n* ITER > ITERMAX\n* or for all the RHS we have:\n* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX\n* where\n* o ITER is the number of the current iteration in the iterative\n* refinement process\n* o RNRM is the infinity-norm of the residual\n* o XNRM is the infinity-norm of the solution\n* o ANRM is the infinity-operator-norm of the matrix A\n* o EPS is the machine epsilon returned by DLAMCH('Epsilon')\n* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00\n* respectively.\n*\n\n* Arguments\n* =========\n*\n* N (input) INTEGER\n* The number of linear equations, i.e., the order of the\n* matrix A. N >= 0.\n*\n* NRHS (input) INTEGER\n* The number of right hand sides, i.e., the number of columns\n* of the matrix B. NRHS >= 0.\n*\n* A (input/output) DOUBLE PRECISION array,\n* dimension (LDA,N)\n* On entry, the N-by-N coefficient matrix A.\n* On exit, if iterative refinement has been successfully used\n* (INFO.EQ.0 and ITER.GE.0, see description below), then A is\n* unchanged, if double precision factorization has been used\n* (INFO.EQ.0 and ITER.LT.0, see description below), then the\n* array A contains the factors L and U from the factorization\n* A = P*L*U; the unit diagonal elements of L are not stored.\n*\n* LDA (input) INTEGER\n* The leading dimension of the array A. LDA >= max(1,N).\n*\n* IPIV (output) INTEGER array, dimension (N)\n* The pivot indices that define the permutation matrix P;\n* row i of the matrix was interchanged with row IPIV(i).\n* Corresponds either to the single precision factorization\n* (if INFO.EQ.0 and ITER.GE.0) or the double precision\n* factorization (if INFO.EQ.0 and ITER.LT.0).\n*\n* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)\n* The N-by-NRHS right hand side matrix B.\n*\n* LDB (input) INTEGER\n* The leading dimension of the array B. LDB >= max(1,N).\n*\n* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)\n* If INFO = 0, the N-by-NRHS solution matrix X.\n*\n* LDX (input) INTEGER\n* The leading dimension of the array X. LDX >= max(1,N).\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (N,NRHS)\n* This array is used to hold the residual vectors.\n*\n* SWORK (workspace) REAL array, dimension (N*(N+NRHS))\n* This array is used to use the single precision matrix and the\n* right-hand sides or solutions in single precision.\n*\n* ITER (output) INTEGER\n* < 0: iterative refinement has failed, double precision\n* factorization has been performed\n* -1 : the routine fell back to full precision for\n* implementation- or machine-specific reasons\n* -2 : narrowing the precision induced an overflow,\n* the routine fell back to full precision\n* -3 : failure of SGETRF\n* -31: stop the iterative refinement after the 30th\n* iterations\n* > 0: iterative refinement has been
|
36
|
+
printf("%s\n", "USAGE:\n ipiv, x, iter, info, a = NumRu::Lapack.dsgesv( a, b, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DSGESV( N, NRHS, A, LDA, IPIV, B, LDB, X, LDX, WORK, SWORK, ITER, INFO )\n\n* Purpose\n* =======\n*\n* DSGESV computes the solution to a real system of linear equations\n* A * X = B,\n* where A is an N-by-N matrix and X and B are N-by-NRHS matrices.\n*\n* DSGESV first attempts to factorize the matrix in SINGLE PRECISION\n* and use this factorization within an iterative refinement procedure\n* to produce a solution with DOUBLE PRECISION normwise backward error\n* quality (see below). If the approach fails the method switches to a\n* DOUBLE PRECISION factorization and solve.\n*\n* The iterative refinement is not going to be a winning strategy if\n* the ratio SINGLE PRECISION performance over DOUBLE PRECISION\n* performance is too small. A reasonable strategy should take the\n* number of right-hand sides and the size of the matrix into account.\n* This might be done with a call to ILAENV in the future. Up to now, we\n* always try iterative refinement.\n*\n* The iterative refinement process is stopped if\n* ITER > ITERMAX\n* or for all the RHS we have:\n* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX\n* where\n* o ITER is the number of the current iteration in the iterative\n* refinement process\n* o RNRM is the infinity-norm of the residual\n* o XNRM is the infinity-norm of the solution\n* o ANRM is the infinity-operator-norm of the matrix A\n* o EPS is the machine epsilon returned by DLAMCH('Epsilon')\n* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00\n* respectively.\n*\n\n* Arguments\n* =========\n*\n* N (input) INTEGER\n* The number of linear equations, i.e., the order of the\n* matrix A. N >= 0.\n*\n* NRHS (input) INTEGER\n* The number of right hand sides, i.e., the number of columns\n* of the matrix B. NRHS >= 0.\n*\n* A (input/output) DOUBLE PRECISION array,\n* dimension (LDA,N)\n* On entry, the N-by-N coefficient matrix A.\n* On exit, if iterative refinement has been successfully used\n* (INFO.EQ.0 and ITER.GE.0, see description below), then A is\n* unchanged, if double precision factorization has been used\n* (INFO.EQ.0 and ITER.LT.0, see description below), then the\n* array A contains the factors L and U from the factorization\n* A = P*L*U; the unit diagonal elements of L are not stored.\n*\n* LDA (input) INTEGER\n* The leading dimension of the array A. LDA >= max(1,N).\n*\n* IPIV (output) INTEGER array, dimension (N)\n* The pivot indices that define the permutation matrix P;\n* row i of the matrix was interchanged with row IPIV(i).\n* Corresponds either to the single precision factorization\n* (if INFO.EQ.0 and ITER.GE.0) or the double precision\n* factorization (if INFO.EQ.0 and ITER.LT.0).\n*\n* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)\n* The N-by-NRHS right hand side matrix B.\n*\n* LDB (input) INTEGER\n* The leading dimension of the array B. LDB >= max(1,N).\n*\n* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)\n* If INFO = 0, the N-by-NRHS solution matrix X.\n*\n* LDX (input) INTEGER\n* The leading dimension of the array X. LDX >= max(1,N).\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (N,NRHS)\n* This array is used to hold the residual vectors.\n*\n* SWORK (workspace) REAL array, dimension (N*(N+NRHS))\n* This array is used to use the single precision matrix and the\n* right-hand sides or solutions in single precision.\n*\n* ITER (output) INTEGER\n* < 0: iterative refinement has failed, double precision\n* factorization has been performed\n* -1 : the routine fell back to full precision for\n* implementation- or machine-specific reasons\n* -2 : narrowing the precision induced an overflow,\n* the routine fell back to full precision\n* -3 : failure of SGETRF\n* -31: stop the iterative refinement after the 30th\n* iterations\n* > 0: iterative refinement has been successfully used.\n* Returns the number of iterations\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n* < 0: if INFO = -i, the i-th argument had an illegal value\n* > 0: if INFO = i, U(i,i) computed in DOUBLE PRECISION is\n* exactly zero. The factorization has been completed,\n* but the factor U is exactly singular, so the solution\n* could not be computed.\n*\n* =========\n*\n\n");
|
37
37
|
return Qnil;
|
38
38
|
}
|
39
39
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dsposv.c
CHANGED
@@ -33,7 +33,7 @@ rblapack_dsposv(int argc, VALUE *argv, VALUE self){
|
|
33
33
|
argc--;
|
34
34
|
rblapack_options = argv[argc];
|
35
35
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
36
|
-
printf("%s\n", "USAGE:\n x, iter, info, a = NumRu::Lapack.dsposv( uplo, a, b, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DSPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK, SWORK, ITER, INFO )\n\n* Purpose\n* =======\n*\n* DSPOSV computes the solution to a real system of linear equations\n* A * X = B,\n* where A is an N-by-N symmetric positive definite matrix and X and B\n* are N-by-NRHS matrices.\n*\n* DSPOSV first attempts to factorize the matrix in SINGLE PRECISION\n* and use this factorization within an iterative refinement procedure\n* to produce a solution with DOUBLE PRECISION normwise backward error\n* quality (see below). If the approach fails the method switches to a\n* DOUBLE PRECISION factorization and solve.\n*\n* The iterative refinement is not going to be a winning strategy if\n* the ratio SINGLE PRECISION performance over DOUBLE PRECISION\n* performance is too small. A reasonable strategy should take the\n* number of right-hand sides and the size of the matrix into account.\n* This might be done with a call to ILAENV in the future. Up to now, we\n* always try iterative refinement.\n*\n* The iterative refinement process is stopped if\n* ITER > ITERMAX\n* or for all the RHS we have:\n* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX\n* where\n* o ITER is the number of the current iteration in the iterative\n* refinement process\n* o RNRM is the infinity-norm of the residual\n* o XNRM is the infinity-norm of the solution\n* o ANRM is the infinity-operator-norm of the matrix A\n* o EPS is the machine epsilon returned by DLAMCH('Epsilon')\n* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00\n* respectively.\n*\n\n* Arguments\n* =========\n*\n* UPLO (input) CHARACTER*1\n* = 'U': Upper triangle of A is stored;\n* = 'L': Lower triangle of A is stored.\n*\n* N (input) INTEGER\n* The number of linear equations, i.e., the order of the\n* matrix A. N >= 0.\n*\n* NRHS (input) INTEGER\n* The number of right hand sides, i.e., the number of columns\n* of the matrix B. NRHS >= 0.\n*\n* A (input/output) DOUBLE PRECISION array,\n* dimension (LDA,N)\n* On entry, the symmetric matrix A. If UPLO = 'U', the leading\n* N-by-N upper triangular part of A contains the upper\n* triangular part of the matrix A, and the strictly lower\n* triangular part of A is not referenced. If UPLO = 'L', the\n* leading N-by-N lower triangular part of A contains the lower\n* triangular part of the matrix A, and the strictly upper\n* triangular part of A is not referenced.\n* On exit, if iterative refinement has been successfully used\n* (INFO.EQ.0 and ITER.GE.0, see description below), then A is\n* unchanged, if double precision factorization has been used\n* (INFO.EQ.0 and ITER.LT.0, see description below), then the\n* array A contains the factor U or L from the Cholesky\n* factorization A = U**T*U or A = L*L**T.\n*\n*\n* LDA (input) INTEGER\n* The leading dimension of the array A. LDA >= max(1,N).\n*\n* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)\n* The N-by-NRHS right hand side matrix B.\n*\n* LDB (input) INTEGER\n* The leading dimension of the array B. LDB >= max(1,N).\n*\n* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)\n* If INFO = 0, the N-by-NRHS solution matrix X.\n*\n* LDX (input) INTEGER\n* The leading dimension of the array X. LDX >= max(1,N).\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (N,NRHS)\n* This array is used to hold the residual vectors.\n*\n* SWORK (workspace) REAL array, dimension (N*(N+NRHS))\n* This array is used to use the single precision matrix and the\n* right-hand sides or solutions in single precision.\n*\n* ITER (output) INTEGER\n* < 0: iterative refinement has failed, double precision\n* factorization has been performed\n* -1 : the routine fell back to full precision for\n* implementation- or machine-specific reasons\n* -2 : narrowing the precision induced an overflow,\n* the routine fell back to full precision\n* -3 : failure of SPOTRF\n* -31: stop the iterative refinement after the 30th\n* iterations\n* > 0: iterative refinement has been
|
36
|
+
printf("%s\n", "USAGE:\n x, iter, info, a = NumRu::Lapack.dsposv( uplo, a, b, [:usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DSPOSV( UPLO, N, NRHS, A, LDA, B, LDB, X, LDX, WORK, SWORK, ITER, INFO )\n\n* Purpose\n* =======\n*\n* DSPOSV computes the solution to a real system of linear equations\n* A * X = B,\n* where A is an N-by-N symmetric positive definite matrix and X and B\n* are N-by-NRHS matrices.\n*\n* DSPOSV first attempts to factorize the matrix in SINGLE PRECISION\n* and use this factorization within an iterative refinement procedure\n* to produce a solution with DOUBLE PRECISION normwise backward error\n* quality (see below). If the approach fails the method switches to a\n* DOUBLE PRECISION factorization and solve.\n*\n* The iterative refinement is not going to be a winning strategy if\n* the ratio SINGLE PRECISION performance over DOUBLE PRECISION\n* performance is too small. A reasonable strategy should take the\n* number of right-hand sides and the size of the matrix into account.\n* This might be done with a call to ILAENV in the future. Up to now, we\n* always try iterative refinement.\n*\n* The iterative refinement process is stopped if\n* ITER > ITERMAX\n* or for all the RHS we have:\n* RNRM < SQRT(N)*XNRM*ANRM*EPS*BWDMAX\n* where\n* o ITER is the number of the current iteration in the iterative\n* refinement process\n* o RNRM is the infinity-norm of the residual\n* o XNRM is the infinity-norm of the solution\n* o ANRM is the infinity-operator-norm of the matrix A\n* o EPS is the machine epsilon returned by DLAMCH('Epsilon')\n* The value ITERMAX and BWDMAX are fixed to 30 and 1.0D+00\n* respectively.\n*\n\n* Arguments\n* =========\n*\n* UPLO (input) CHARACTER*1\n* = 'U': Upper triangle of A is stored;\n* = 'L': Lower triangle of A is stored.\n*\n* N (input) INTEGER\n* The number of linear equations, i.e., the order of the\n* matrix A. N >= 0.\n*\n* NRHS (input) INTEGER\n* The number of right hand sides, i.e., the number of columns\n* of the matrix B. NRHS >= 0.\n*\n* A (input/output) DOUBLE PRECISION array,\n* dimension (LDA,N)\n* On entry, the symmetric matrix A. If UPLO = 'U', the leading\n* N-by-N upper triangular part of A contains the upper\n* triangular part of the matrix A, and the strictly lower\n* triangular part of A is not referenced. If UPLO = 'L', the\n* leading N-by-N lower triangular part of A contains the lower\n* triangular part of the matrix A, and the strictly upper\n* triangular part of A is not referenced.\n* On exit, if iterative refinement has been successfully used\n* (INFO.EQ.0 and ITER.GE.0, see description below), then A is\n* unchanged, if double precision factorization has been used\n* (INFO.EQ.0 and ITER.LT.0, see description below), then the\n* array A contains the factor U or L from the Cholesky\n* factorization A = U**T*U or A = L*L**T.\n*\n*\n* LDA (input) INTEGER\n* The leading dimension of the array A. LDA >= max(1,N).\n*\n* B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)\n* The N-by-NRHS right hand side matrix B.\n*\n* LDB (input) INTEGER\n* The leading dimension of the array B. LDB >= max(1,N).\n*\n* X (output) DOUBLE PRECISION array, dimension (LDX,NRHS)\n* If INFO = 0, the N-by-NRHS solution matrix X.\n*\n* LDX (input) INTEGER\n* The leading dimension of the array X. LDX >= max(1,N).\n*\n* WORK (workspace) DOUBLE PRECISION array, dimension (N,NRHS)\n* This array is used to hold the residual vectors.\n*\n* SWORK (workspace) REAL array, dimension (N*(N+NRHS))\n* This array is used to use the single precision matrix and the\n* right-hand sides or solutions in single precision.\n*\n* ITER (output) INTEGER\n* < 0: iterative refinement has failed, double precision\n* factorization has been performed\n* -1 : the routine fell back to full precision for\n* implementation- or machine-specific reasons\n* -2 : narrowing the precision induced an overflow,\n* the routine fell back to full precision\n* -3 : failure of SPOTRF\n* -31: stop the iterative refinement after the 30th\n* iterations\n* > 0: iterative refinement has been successfully used.\n* Returns the number of iterations\n*\n* INFO (output) INTEGER\n* = 0: successful exit\n* < 0: if INFO = -i, the i-th argument had an illegal value\n* > 0: if INFO = i, the leading minor of order i of (DOUBLE\n* PRECISION) A is not positive definite, so the\n* factorization could not be completed, and the solution\n* has not been computed.\n*\n* =========\n*\n\n");
|
37
37
|
return Qnil;
|
38
38
|
}
|
39
39
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|
data/ext/dstegr.c
CHANGED
@@ -54,7 +54,7 @@ rblapack_dstegr(int argc, VALUE *argv, VALUE self){
|
|
54
54
|
argc--;
|
55
55
|
rblapack_options = argv[argc];
|
56
56
|
if (rb_hash_aref(rblapack_options, sHelp) == Qtrue) {
|
57
|
-
printf("%s\n", "USAGE:\n m, w, z, isuppz, work, iwork, info, d, e = NumRu::Lapack.dstegr( jobz, range, d, e, vl, vu, il, iu, abstol, [:lwork => lwork, :liwork => liwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO )\n\n* Purpose\n* =======\n*\n* DSTEGR computes selected eigenvalues and, optionally, eigenvectors\n* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has\n* a well defined set of pairwise different real eigenvalues, the corresponding\n* real eigenvectors are pairwise orthogonal.\n*\n* The spectrum may be computed either completely or partially by specifying\n* either an interval (VL,VU] or a range of indices IL:IU for the desired\n* eigenvalues.\n*\n* DSTEGR is a
|
57
|
+
printf("%s\n", "USAGE:\n m, w, z, isuppz, work, iwork, info, d, e = NumRu::Lapack.dstegr( jobz, range, d, e, vl, vu, il, iu, abstol, [:lwork => lwork, :liwork => liwork, :usage => usage, :help => help])\n\n\nFORTRAN MANUAL\n SUBROUTINE DSTEGR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK, LIWORK, INFO )\n\n* Purpose\n* =======\n*\n* DSTEGR computes selected eigenvalues and, optionally, eigenvectors\n* of a real symmetric tridiagonal matrix T. Any such unreduced matrix has\n* a well defined set of pairwise different real eigenvalues, the corresponding\n* real eigenvectors are pairwise orthogonal.\n*\n* The spectrum may be computed either completely or partially by specifying\n* either an interval (VL,VU] or a range of indices IL:IU for the desired\n* eigenvalues.\n*\n* DSTEGR is a compatibility wrapper around the improved DSTEMR routine.\n* See DSTEMR for further details.\n*\n* One important change is that the ABSTOL parameter no longer provides any\n* benefit and hence is no longer used.\n*\n* Note : DSTEGR and DSTEMR work only on machines which follow\n* IEEE-754 floating-point standard in their handling of infinities and\n* NaNs. Normal execution may create these exceptiona values and hence\n* may abort due to a floating point exception in environments which\n* do not conform to the IEEE-754 standard.\n*\n\n* Arguments\n* =========\n*\n* JOBZ (input) CHARACTER*1\n* = 'N': Compute eigenvalues only;\n* = 'V': Compute eigenvalues and eigenvectors.\n*\n* RANGE (input) CHARACTER*1\n* = 'A': all eigenvalues will be found.\n* = 'V': all eigenvalues in the half-open interval (VL,VU]\n* will be found.\n* = 'I': the IL-th through IU-th eigenvalues will be found.\n*\n* N (input) INTEGER\n* The order of the matrix. N >= 0.\n*\n* D (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the N diagonal elements of the tridiagonal matrix\n* T. On exit, D is overwritten.\n*\n* E (input/output) DOUBLE PRECISION array, dimension (N)\n* On entry, the (N-1) subdiagonal elements of the tridiagonal\n* matrix T in elements 1 to N-1 of E. E(N) need not be set on\n* input, but is used internally as workspace.\n* On exit, E is overwritten.\n*\n* VL (input) DOUBLE PRECISION\n* VU (input) DOUBLE PRECISION\n* If RANGE='V', the lower and upper bounds of the interval to\n* be searched for eigenvalues. VL < VU.\n* Not referenced if RANGE = 'A' or 'I'.\n*\n* IL (input) INTEGER\n* IU (input) INTEGER\n* If RANGE='I', the indices (in ascending order) of the\n* smallest and largest eigenvalues to be returned.\n* 1 <= IL <= IU <= N, if N > 0.\n* Not referenced if RANGE = 'A' or 'V'.\n*\n* ABSTOL (input) DOUBLE PRECISION\n* Unused. Was the absolute error tolerance for the\n* eigenvalues/eigenvectors in previous versions.\n*\n* M (output) INTEGER\n* The total number of eigenvalues found. 0 <= M <= N.\n* If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.\n*\n* W (output) DOUBLE PRECISION array, dimension (N)\n* The first M elements contain the selected eigenvalues in\n* ascending order.\n*\n* Z (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )\n* If JOBZ = 'V', and if INFO = 0, then the first M columns of Z\n* contain the orthonormal eigenvectors of the matrix T\n* corresponding to the selected eigenvalues, with the i-th\n* column of Z holding the eigenvector associated with W(i).\n* If JOBZ = 'N', then Z is not referenced.\n* Note: the user must ensure that at least max(1,M) columns are\n* supplied in the array Z; if RANGE = 'V', the exact value of M\n* is not known in advance and an upper bound must be used.\n* Supplying N columns is always safe.\n*\n* LDZ (input) INTEGER\n* The leading dimension of the array Z. LDZ >= 1, and if\n* JOBZ = 'V', then LDZ >= max(1,N).\n*\n* ISUPPZ (output) INTEGER ARRAY, dimension ( 2*max(1,M) )\n* The support of the eigenvectors in Z, i.e., the indices\n* indicating the nonzero elements in Z. The i-th computed eigenvector\n* is nonzero only in elements ISUPPZ( 2*i-1 ) through\n* ISUPPZ( 2*i ). This is relevant in the case when the matrix\n* is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.\n*\n* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)\n* On exit, if INFO = 0, WORK(1) returns the optimal\n* (and minimal) LWORK.\n*\n* LWORK (input) INTEGER\n* The dimension of the array WORK. LWORK >= max(1,18*N)\n* if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.\n* If LWORK = -1, then a workspace query is assumed; the routine\n* only calculates the optimal size of the WORK array, returns\n* this value as the first entry of the WORK array, and no error\n* message related to LWORK is issued by XERBLA.\n*\n* IWORK (workspace/output) INTEGER array, dimension (LIWORK)\n* On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.\n*\n* LIWORK (input) INTEGER\n* The dimension of the array IWORK. LIWORK >= max(1,10*N)\n* if the eigenvectors are desired, and LIWORK >= max(1,8*N)\n* if only the eigenvalues are to be computed.\n* If LIWORK = -1, then a workspace query is assumed; the\n* routine only calculates the optimal size of the IWORK array,\n* returns this value as the first entry of the IWORK array, and\n* no error message related to LIWORK is issued by XERBLA.\n*\n* INFO (output) INTEGER\n* On exit, INFO\n* = 0: successful exit\n* < 0: if INFO = -i, the i-th argument had an illegal value\n* > 0: if INFO = 1X, internal error in DLARRE,\n* if INFO = 2X, internal error in DLARRV.\n* Here, the digit X = ABS( IINFO ) < 10, where IINFO is\n* the nonzero error code returned by DLARRE or\n* DLARRV, respectively.\n*\n\n* Further Details\n* ===============\n*\n* Based on contributions by\n* Inderjit Dhillon, IBM Almaden, USA\n* Osni Marques, LBNL/NERSC, USA\n* Christof Voemel, LBNL/NERSC, USA\n*\n* =====================================================================\n*\n* .. Local Scalars ..\n LOGICAL TRYRAC\n* ..\n* .. External Subroutines ..\n EXTERNAL DSTEMR\n* ..\n\n");
|
58
58
|
return Qnil;
|
59
59
|
}
|
60
60
|
if (rb_hash_aref(rblapack_options, sUsage) == Qtrue) {
|