diff options
Diffstat (limited to 'lib/Numeric/LinearAlgebra/LAPACK')
-rw-r--r-- | lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c index 1c35376..51972eb 100644 --- a/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c +++ b/lib/Numeric/LinearAlgebra/LAPACK/lapack-aux.c | |||
@@ -111,7 +111,7 @@ int svd_l_R(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { | |||
111 | integer n = ac; | 111 | integer n = ac; |
112 | integer q = MIN(m,n); | 112 | integer q = MIN(m,n); |
113 | REQUIRES(sn==q,BAD_SIZE); | 113 | REQUIRES(sn==q,BAD_SIZE); |
114 | REQUIRES(up==NULL || ur==m && (uc==m || uc==q),BAD_SIZE); | 114 | REQUIRES(up==NULL || (ur==m && (uc==m || uc==q)),BAD_SIZE); |
115 | char* jobu = "A"; | 115 | char* jobu = "A"; |
116 | if (up==NULL) { | 116 | if (up==NULL) { |
117 | jobu = "N"; | 117 | jobu = "N"; |
@@ -120,7 +120,7 @@ int svd_l_R(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { | |||
120 | jobu = "S"; | 120 | jobu = "S"; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | REQUIRES(vp==NULL || vc==n && (vr==n || vr==q),BAD_SIZE); | 123 | REQUIRES(vp==NULL || (vc==n && (vr==n || vr==q)),BAD_SIZE); |
124 | char* jobvt = "A"; | 124 | char* jobvt = "A"; |
125 | integer ldvt = n; | 125 | integer ldvt = n; |
126 | if (vp==NULL) { | 126 | if (vp==NULL) { |
@@ -174,10 +174,10 @@ int svd_l_Rdd(KDMAT(a),DMAT(u), DVEC(s),DMAT(v)) { | |||
174 | integer n = ac; | 174 | integer n = ac; |
175 | integer q = MIN(m,n); | 175 | integer q = MIN(m,n); |
176 | REQUIRES(sn==q,BAD_SIZE); | 176 | REQUIRES(sn==q,BAD_SIZE); |
177 | REQUIRES(up == NULL && vp == NULL | 177 | REQUIRES((up == NULL && vp == NULL) |
178 | || ur==m && vc==n | 178 | || (ur==m && vc==n |
179 | && (uc == q && vr == q | 179 | && ((uc == q && vr == q) |
180 | || uc == m && vc==n),BAD_SIZE); | 180 | || (uc == m && vc==n))),BAD_SIZE); |
181 | char* jobz = "A"; | 181 | char* jobz = "A"; |
182 | integer ldvt = n; | 182 | integer ldvt = n; |
183 | if (up==NULL) { | 183 | if (up==NULL) { |
@@ -224,7 +224,7 @@ int svd_l_C(KCMAT(a),CMAT(u), DVEC(s),CMAT(v)) { | |||
224 | integer n = ac; | 224 | integer n = ac; |
225 | integer q = MIN(m,n); | 225 | integer q = MIN(m,n); |
226 | REQUIRES(sn==q,BAD_SIZE); | 226 | REQUIRES(sn==q,BAD_SIZE); |
227 | REQUIRES(up==NULL || ur==m && (uc==m || uc==q),BAD_SIZE); | 227 | REQUIRES(up==NULL || (ur==m && (uc==m || uc==q)),BAD_SIZE); |
228 | char* jobu = "A"; | 228 | char* jobu = "A"; |
229 | if (up==NULL) { | 229 | if (up==NULL) { |
230 | jobu = "N"; | 230 | jobu = "N"; |
@@ -233,7 +233,7 @@ int svd_l_C(KCMAT(a),CMAT(u), DVEC(s),CMAT(v)) { | |||
233 | jobu = "S"; | 233 | jobu = "S"; |
234 | } | 234 | } |
235 | } | 235 | } |
236 | REQUIRES(vp==NULL || vc==n && (vr==n || vr==q),BAD_SIZE); | 236 | REQUIRES(vp==NULL || (vc==n && (vr==n || vr==q)),BAD_SIZE); |
237 | char* jobvt = "A"; | 237 | char* jobvt = "A"; |
238 | integer ldvt = n; | 238 | integer ldvt = n; |
239 | if (vp==NULL) { | 239 | if (vp==NULL) { |
@@ -291,10 +291,10 @@ int svd_l_Cdd(KCMAT(a),CMAT(u), DVEC(s),CMAT(v)) { | |||
291 | integer n = ac; | 291 | integer n = ac; |
292 | integer q = MIN(m,n); | 292 | integer q = MIN(m,n); |
293 | REQUIRES(sn==q,BAD_SIZE); | 293 | REQUIRES(sn==q,BAD_SIZE); |
294 | REQUIRES(up == NULL && vp == NULL | 294 | REQUIRES((up == NULL && vp == NULL) |
295 | || ur==m && vc==n | 295 | || (ur==m && vc==n |
296 | && (uc == q && vr == q | 296 | && ((uc == q && vr == q) |
297 | || uc == m && vc==n),BAD_SIZE); | 297 | || (uc == m && vc==n))),BAD_SIZE); |
298 | char* jobz = "A"; | 298 | char* jobz = "A"; |
299 | integer ldvt = n; | 299 | integer ldvt = n; |
300 | if (up==NULL) { | 300 | if (up==NULL) { |
@@ -349,9 +349,9 @@ int svd_l_Cdd(KCMAT(a),CMAT(u), DVEC(s),CMAT(v)) { | |||
349 | int eig_l_C(KCMAT(a), CMAT(u), CVEC(s),CMAT(v)) { | 349 | int eig_l_C(KCMAT(a), CMAT(u), CVEC(s),CMAT(v)) { |
350 | integer n = ar; | 350 | integer n = ar; |
351 | REQUIRES(ac==n && sn==n, BAD_SIZE); | 351 | REQUIRES(ac==n && sn==n, BAD_SIZE); |
352 | REQUIRES(up==NULL || ur==n && uc==n, BAD_SIZE); | 352 | REQUIRES(up==NULL || (ur==n && uc==n), BAD_SIZE); |
353 | char jobvl = up==NULL?'N':'V'; | 353 | char jobvl = up==NULL?'N':'V'; |
354 | REQUIRES(vp==NULL || vr==n && vc==n, BAD_SIZE); | 354 | REQUIRES(vp==NULL || (vr==n && vc==n), BAD_SIZE); |
355 | char jobvr = vp==NULL?'N':'V'; | 355 | char jobvr = vp==NULL?'N':'V'; |
356 | DEBUGMSG("eig_l_C"); | 356 | DEBUGMSG("eig_l_C"); |
357 | doublecomplex *B = (doublecomplex*)malloc(n*n*sizeof(doublecomplex)); | 357 | doublecomplex *B = (doublecomplex*)malloc(n*n*sizeof(doublecomplex)); |
@@ -404,9 +404,9 @@ int eig_l_C(KCMAT(a), CMAT(u), CVEC(s),CMAT(v)) { | |||
404 | int eig_l_R(KDMAT(a),DMAT(u), CVEC(s),DMAT(v)) { | 404 | int eig_l_R(KDMAT(a),DMAT(u), CVEC(s),DMAT(v)) { |
405 | integer n = ar; | 405 | integer n = ar; |
406 | REQUIRES(ac==n && sn==n, BAD_SIZE); | 406 | REQUIRES(ac==n && sn==n, BAD_SIZE); |
407 | REQUIRES(up==NULL || ur==n && uc==n, BAD_SIZE); | 407 | REQUIRES(up==NULL || (ur==n && uc==n), BAD_SIZE); |
408 | char jobvl = up==NULL?'N':'V'; | 408 | char jobvl = up==NULL?'N':'V'; |
409 | REQUIRES(vp==NULL || vr==n && vc==n, BAD_SIZE); | 409 | REQUIRES(vp==NULL || (vr==n && vc==n), BAD_SIZE); |
410 | char jobvr = vp==NULL?'N':'V'; | 410 | char jobvr = vp==NULL?'N':'V'; |
411 | DEBUGMSG("eig_l_R"); | 411 | DEBUGMSG("eig_l_R"); |
412 | double *B = (double*)malloc(n*n*sizeof(double)); | 412 | double *B = (double*)malloc(n*n*sizeof(double)); |
@@ -989,7 +989,7 @@ int schur_l_R(KDMAT(a), DMAT(u), DMAT(s)) { | |||
989 | integer n = ac; | 989 | integer n = ac; |
990 | REQUIRES(m>=1 && n==m && ur==n && uc==n && sr==n && sc==n, BAD_SIZE); | 990 | REQUIRES(m>=1 && n==m && ur==n && uc==n && sr==n && sc==n, BAD_SIZE); |
991 | DEBUGMSG("schur_l_R"); | 991 | DEBUGMSG("schur_l_R"); |
992 | int k; | 992 | //int k; |
993 | //printf("---------------------------\n"); | 993 | //printf("---------------------------\n"); |
994 | //printf("%p: ",ap); for(k=0;k<n*n;k++) printf("%f ",ap[k]); printf("\n"); | 994 | //printf("%p: ",ap); for(k=0;k<n*n;k++) printf("%f ",ap[k]); printf("\n"); |
995 | //printf("%p: ",up); for(k=0;k<n*n;k++) printf("%f ",up[k]); printf("\n"); | 995 | //printf("%p: ",up); for(k=0;k<n*n;k++) printf("%f ",up[k]); printf("\n"); |