00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SELDON_FILE_LAPACK_LINEAREQUATIONS_CXX
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 namespace Seldon
00064 {
00065
00066
00068
00069
00070
00071
00072
00073
00074 template <class Prop0, class Allocator0,
00075 class Allocator1>
00076 void GetLU(Matrix<float, Prop0, ColMajor, Allocator0>& A,
00077 Vector<int, VectFull, Allocator1>& P,
00078 LapackInfo& info = lapack_info)
00079 {
00080 int m = A.GetM();
00081 int n = A.GetN();
00082 #ifdef SELDON_CHECK_BOUNDS
00083 if ((m <= 0)||(n <= 0))
00084 throw WrongDim("GetLU", "Provide a non-empty matrix");
00085 #endif
00086
00087 P.Reallocate(min(m, n));
00088 sgetrf_(&m, &n, A.GetData(), &m,
00089 P.GetData(), &info.GetInfoRef());
00090
00091 #ifdef SELDON_LAPACK_CHECK_INFO
00092 if (info.GetInfo() != 0)
00093 throw LapackError(info.GetInfo(), "GetLU",
00094 "An error occured during the factorization.");
00095 #endif
00096
00097 }
00098
00099
00100 template <class Prop0, class Allocator0,
00101 class Allocator1>
00102 void GetLU(Matrix<double, Prop0, ColMajor, Allocator0>& A,
00103 Vector<int, VectFull, Allocator1>& P,
00104 LapackInfo& info = lapack_info)
00105 {
00106 int m = A.GetM();
00107 int n = A.GetN();
00108
00109 #ifdef SELDON_CHECK_BOUNDS
00110 if ((m <= 0)||(n <= 0))
00111 throw WrongDim("GetLU", "Provide a non-empty matrix");
00112 #endif
00113
00114 P.Reallocate(min(m, n));
00115 dgetrf_(&m, &n, A.GetData(), &m,
00116 P.GetData(), &info.GetInfoRef());
00117
00118 #ifdef SELDON_LAPACK_CHECK_INFO
00119 if (info.GetInfo() != 0)
00120 throw LapackError(info.GetInfo(), "GetLU",
00121 "An error occured during the factorization.");
00122 #endif
00123
00124 }
00125
00126
00127 template <class Prop0, class Allocator0,
00128 class Allocator1>
00129 void GetLU(Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
00130 Vector<int, VectFull, Allocator1>& P,
00131 LapackInfo& info = lapack_info)
00132 {
00133 int m = A.GetM();
00134 int n = A.GetN();
00135
00136 #ifdef SELDON_CHECK_BOUNDS
00137 if ((m <= 0)||(n <= 0))
00138 throw WrongDim("GetLU", "Provide a non-empty matrix");
00139 #endif
00140
00141 P.Reallocate(min(m, n));
00142 cgetrf_(&m, &n, A.GetDataVoid(), &m,
00143 P.GetData(), &info.GetInfoRef());
00144
00145 #ifdef SELDON_LAPACK_CHECK_INFO
00146 if (info.GetInfo() != 0)
00147 throw LapackError(info.GetInfo(), "GetLU",
00148 "An error occured during the factorization.");
00149 #endif
00150
00151 }
00152
00153
00154 template <class Prop0, class Allocator0,
00155 class Allocator1>
00156 void GetLU(Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
00157 Vector<int, VectFull, Allocator1>& P,
00158 LapackInfo& info = lapack_info)
00159 {
00160 int m = A.GetM();
00161 int n = A.GetN();
00162
00163 #ifdef SELDON_CHECK_BOUNDS
00164 if ((m <= 0)||(n <= 0))
00165 throw WrongDim("GetLU", "Provide a non-empty matrix");
00166 #endif
00167
00168 P.Reallocate(min(m, n));
00169 zgetrf_(&m, &n, A.GetDataVoid(), &m,
00170 P.GetData(), &info.GetInfoRef());
00171
00172 #ifdef SELDON_LAPACK_CHECK_INFO
00173 if (info.GetInfo() != 0)
00174 throw LapackError(info.GetInfo(), "GetLU",
00175 "An error occured during the factorization.");
00176 #endif
00177
00178 }
00179
00180
00181
00182
00183
00184 template <class Prop0, class Allocator0,
00185 class Allocator1>
00186 void GetLU(Matrix<float, Prop0, RowMajor, Allocator0>& A,
00187 Vector<int, VectFull, Allocator1>& P,
00188 LapackInfo& info = lapack_info)
00189 {
00190 int m = A.GetM();
00191 int n = A.GetN();
00192
00193 #ifdef SELDON_CHECK_BOUNDS
00194 if ((m <= 0)||(n <= 0))
00195 throw WrongDim("GetLU", "Provide a non-empty matrix");
00196 #endif
00197
00198 P.Reallocate(min(m, n));
00199 sgetrf_(&m, &n, A.GetData(), &m,
00200 P.GetData(), &info.GetInfoRef());
00201
00202 #ifdef SELDON_LAPACK_CHECK_INFO
00203 if (info.GetInfo() != 0)
00204 throw LapackError(info.GetInfo(), "GetLU",
00205 "An error occured during the factorization.");
00206 #endif
00207
00208 }
00209
00210
00211 template <class Prop0, class Allocator0,
00212 class Allocator1>
00213 void GetLU(Matrix<double, Prop0, RowMajor, Allocator0>& A,
00214 Vector<int, VectFull, Allocator1>& P,
00215 LapackInfo& info = lapack_info)
00216 {
00217 int m = A.GetM();
00218 int n = A.GetN();
00219
00220 #ifdef SELDON_CHECK_BOUNDS
00221 if ((m <= 0)||(n <= 0))
00222 throw WrongDim("GetLU", "Provide a non-empty matrix");
00223 #endif
00224
00225 P.Reallocate(min(m, n));
00226 dgetrf_(&m, &n, A.GetData(), &m,
00227 P.GetData(), &info.GetInfoRef());
00228
00229 #ifdef SELDON_LAPACK_CHECK_INFO
00230 if (info.GetInfo() != 0)
00231 throw LapackError(info.GetInfo(), "GetLU",
00232 "An error occured during the factorization.");
00233 #endif
00234
00235 }
00236
00237
00238 template <class Prop0, class Allocator0,
00239 class Allocator1>
00240 void GetLU(Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
00241 Vector<int, VectFull, Allocator1>& P,
00242 LapackInfo& info = lapack_info)
00243 {
00244 int m = A.GetM();
00245 int n = A.GetN();
00246
00247 #ifdef SELDON_CHECK_BOUNDS
00248 if ((m <= 0)||(n <= 0))
00249 throw WrongDim("GetLU", "Provide a non-empty matrix");
00250 #endif
00251
00252 P.Reallocate(min(m, n));
00253 cgetrf_(&m, &n, A.GetDataVoid(), &m,
00254 P.GetData(), &info.GetInfoRef());
00255
00256 #ifdef SELDON_LAPACK_CHECK_INFO
00257 if (info.GetInfo() != 0)
00258 throw LapackError(info.GetInfo(), "GetLU",
00259 "An error occured during the factorization.");
00260 #endif
00261
00262 }
00263
00264
00265 template <class Prop0, class Allocator0,
00266 class Allocator1>
00267 void GetLU(Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
00268 Vector<int, VectFull, Allocator1>& P,
00269 LapackInfo& info = lapack_info)
00270 {
00271 int m = A.GetM();
00272 int n = A.GetN();
00273
00274 #ifdef SELDON_CHECK_BOUNDS
00275 if ((m <= 0)||(n <= 0))
00276 throw WrongDim("GetLU", "Provide a non-empty matrix");
00277 #endif
00278
00279 P.Reallocate(min(m, n));
00280 zgetrf_(&m, &n, A.GetDataVoid(), &m,
00281 P.GetData(), &info.GetInfoRef());
00282
00283 #ifdef SELDON_LAPACK_CHECK_INFO
00284 if (info.GetInfo() != 0)
00285 throw LapackError(info.GetInfo(), "GetLU",
00286 "An error occured during the factorization.");
00287 #endif
00288
00289 }
00290
00291
00292
00293
00294
00295 template <class Prop0, class Allocator0,
00296 class Allocator1>
00297 void GetLU(Matrix<float, Prop0, ColSym, Allocator0>& A,
00298 Vector<int, VectFull, Allocator1>& P,
00299 LapackInfo& info = lapack_info)
00300 {
00301 int m = A.GetM();
00302
00303 #ifdef SELDON_CHECK_BOUNDS
00304 if (m <= 0)
00305 throw WrongDim("GetLU", "Provide a non-empty matrix");
00306 #endif
00307
00308 int lwork = m;
00309 char uplo('U');
00310 Vector<float,VectFull,Allocator0> work(lwork);
00311 P.Reallocate(m);
00312 ssytrf_(&uplo, &m, A.GetData(), &m,
00313 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
00314
00315 #ifdef SELDON_LAPACK_CHECK_INFO
00316 if (info.GetInfo() != 0)
00317 throw LapackError(info.GetInfo(), "GetLU",
00318 "An error occured during the factorization.");
00319 #endif
00320
00321 }
00322
00323
00324 template <class Prop0, class Allocator0,
00325 class Allocator1>
00326 void GetLU(Matrix<double, Prop0, ColSym, Allocator0>& A,
00327 Vector<int, VectFull, Allocator1>& P,
00328 LapackInfo& info = lapack_info)
00329 {
00330 int m = A.GetM();
00331 int lwork = m;
00332
00333 #ifdef SELDON_CHECK_BOUNDS
00334 if (m <= 0)
00335 throw WrongDim("GetLU", "Provide a non-empty matrix");
00336 #endif
00337
00338 char uplo('U');
00339 Vector<double,VectFull,Allocator0> work(lwork);
00340 P.Reallocate(m);
00341 dsytrf_(&uplo, &m, A.GetData(), &m,
00342 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
00343
00344 #ifdef SELDON_LAPACK_CHECK_INFO
00345 if (info.GetInfo() != 0)
00346 throw LapackError(info.GetInfo(), "GetLU",
00347 "An error occured during the factorization.");
00348 #endif
00349
00350 }
00351
00352
00353 template <class Prop0, class Allocator0,
00354 class Allocator1>
00355 void GetLU(Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
00356 Vector<int, VectFull, Allocator1>& P,
00357 LapackInfo& info = lapack_info)
00358 {
00359 int m = A.GetM();
00360 int lwork = m;
00361
00362 #ifdef SELDON_CHECK_BOUNDS
00363 if (m <= 0)
00364 throw WrongDim("GetLU", "Provide a non-empty matrix");
00365 #endif
00366
00367 char uplo('U');
00368 Vector<complex<float>,VectFull,Allocator0> work(lwork);
00369 P.Reallocate(m);
00370 csytrf_(&uplo, &m, A.GetDataVoid(), &m,
00371 P.GetData(), work.GetDataVoid(),
00372 &lwork, &info.GetInfoRef());
00373
00374 #ifdef SELDON_LAPACK_CHECK_INFO
00375 if (info.GetInfo() != 0)
00376 throw LapackError(info.GetInfo(), "GetLU",
00377 "An error occured during the factorization.");
00378 #endif
00379
00380 }
00381
00382
00383 template <class Prop0, class Allocator0,
00384 class Allocator1>
00385 void GetLU(Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
00386 Vector<int, VectFull, Allocator1>& P,
00387 LapackInfo& info = lapack_info)
00388 {
00389 int m = A.GetM();
00390 int lwork = m;
00391
00392 #ifdef SELDON_CHECK_BOUNDS
00393 if (m <= 0)
00394 throw WrongDim("GetLU", "Provide a non-empty matrix");
00395 #endif
00396
00397 char uplo('U');
00398 Vector<complex<double>,VectFull,Allocator0> work(lwork);
00399 P.Reallocate(m);
00400 zsytrf_(&uplo, &m, A.GetDataVoid(), &m,
00401 P.GetData(), work.GetDataVoid(),
00402 &lwork, &info.GetInfoRef());
00403
00404 #ifdef SELDON_LAPACK_CHECK_INFO
00405 if (info.GetInfo() != 0)
00406 throw LapackError(info.GetInfo(), "GetLU",
00407 "An error occured during the factorization.");
00408 #endif
00409
00410 }
00411
00412
00413
00414
00415
00416 template <class Prop0, class Allocator0,
00417 class Allocator1>
00418 void GetLU(Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
00419 Vector<int, VectFull, Allocator1>& P,
00420 LapackInfo& info = lapack_info)
00421 {
00422 int m = A.GetM();
00423
00424 #ifdef SELDON_CHECK_BOUNDS
00425 if (m <= 0)
00426 throw WrongDim("GetLU", "Provide a non-empty matrix");
00427 #endif
00428
00429 char uplo('U');
00430 P.Reallocate(m);
00431 ssptrf_(&uplo, &m, A.GetData(),
00432 P.GetData(), &info.GetInfoRef());
00433
00434 #ifdef SELDON_LAPACK_CHECK_INFO
00435 if (info.GetInfo() != 0)
00436 throw LapackError(info.GetInfo(), "GetLU",
00437 "An error occured during the factorization.");
00438 #endif
00439
00440 }
00441
00442
00443 template <class Prop0, class Allocator0,
00444 class Allocator1>
00445 void GetLU(Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
00446 Vector<int, VectFull, Allocator1>& P,
00447 LapackInfo& info = lapack_info)
00448 {
00449 int m = A.GetM();
00450
00451 #ifdef SELDON_CHECK_BOUNDS
00452 if (m <= 0)
00453 throw WrongDim("GetLU", "Provide a non-empty matrix");
00454 #endif
00455
00456 char uplo('U');
00457 P.Reallocate(m);
00458 dsptrf_(&uplo, &m, A.GetData(),
00459 P.GetData(), &info.GetInfoRef());
00460
00461 #ifdef SELDON_LAPACK_CHECK_INFO
00462 if (info.GetInfo() != 0)
00463 throw LapackError(info.GetInfo(), "GetLU",
00464 "An error occured during the factorization.");
00465 #endif
00466
00467 }
00468
00469
00470 template <class Prop0, class Allocator0,
00471 class Allocator1>
00472 void GetLU(Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A,
00473 Vector<int, VectFull, Allocator1>& P,
00474 LapackInfo& info = lapack_info)
00475 {
00476 int m = A.GetM();
00477
00478 #ifdef SELDON_CHECK_BOUNDS
00479 if (m <= 0)
00480 throw WrongDim("GetLU", "Provide a non-empty matrix");
00481 #endif
00482
00483 char uplo('U');
00484 P.Reallocate(m);
00485 csptrf_(&uplo, &m, A.GetDataVoid(),
00486 P.GetData(), &info.GetInfoRef());
00487
00488 #ifdef SELDON_LAPACK_CHECK_INFO
00489 if (info.GetInfo() != 0)
00490 throw LapackError(info.GetInfo(), "GetLU",
00491 "An error occured during the factorization.");
00492 #endif
00493
00494 }
00495
00496
00497 template <class Prop0, class Allocator0,
00498 class Allocator1>
00499 void GetLU(Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A,
00500 Vector<int, VectFull, Allocator1>& P,
00501 LapackInfo& info = lapack_info)
00502 {
00503 int m = A.GetM();
00504
00505 #ifdef SELDON_CHECK_BOUNDS
00506 if (m <= 0)
00507 throw WrongDim("GetLU", "Provide a non-empty matrix");
00508 #endif
00509
00510 char uplo('U');
00511 P.Reallocate(m);
00512 zsptrf_(&uplo, &m, A.GetDataVoid(),
00513 P.GetData(), &info.GetInfoRef());
00514
00515 #ifdef SELDON_LAPACK_CHECK_INFO
00516 if (info.GetInfo() != 0)
00517 throw LapackError(info.GetInfo(), "GetLU",
00518 "An error occured during the factorization.");
00519 #endif
00520
00521 }
00522
00523
00524
00525
00526
00527 template <class Prop0, class Allocator0,
00528 class Allocator1>
00529 void GetLU(SeldonUplo Uplo,
00530 Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
00531 Vector<int, VectFull, Allocator1>& P,
00532 LapackInfo& info = lapack_info)
00533 {
00534 int m = A.GetM();
00535
00536 #ifdef SELDON_CHECK_BOUNDS
00537 if (m <= 0)
00538 throw WrongDim("GetLU", "Provide a non-empty matrix");
00539 #endif
00540
00541 char uplo(Uplo);
00542 P.Reallocate(m);
00543 ssptrf_(&uplo, &m, A.GetData(),
00544 P.GetData(), &info.GetInfoRef());
00545
00546 #ifdef SELDON_LAPACK_CHECK_INFO
00547 if (info.GetInfo() != 0)
00548 throw LapackError(info.GetInfo(), "GetLU",
00549 "An error occured during the factorization.");
00550 #endif
00551
00552 }
00553
00554
00555 template <class Prop0, class Allocator0,
00556 class Allocator1>
00557 void GetLU(SeldonUplo Uplo,
00558 Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
00559 Vector<int, VectFull, Allocator1>& P,
00560 LapackInfo& info = lapack_info)
00561 {
00562 int m = A.GetM();
00563
00564 #ifdef SELDON_CHECK_BOUNDS
00565 if (m <= 0)
00566 throw WrongDim("GetLU", "Provide a non-empty matrix");
00567 #endif
00568
00569 char uplo(Uplo);
00570 P.Reallocate(m);
00571 dsptrf_(&uplo, &m, A.GetData(),
00572 P.GetData(), &info.GetInfoRef());
00573
00574 #ifdef SELDON_LAPACK_CHECK_INFO
00575 if (info.GetInfo() != 0)
00576 throw LapackError(info.GetInfo(), "GetLU",
00577 "An error occured during the factorization.");
00578 #endif
00579
00580 }
00581
00582
00583 template <class Prop0, class Allocator0,
00584 class Allocator1>
00585 void GetLU(SeldonUplo Uplo,
00586 Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A,
00587 Vector<int, VectFull, Allocator1>& P,
00588 LapackInfo& info = lapack_info)
00589 {
00590 int m = A.GetM();
00591
00592 #ifdef SELDON_CHECK_BOUNDS
00593 if (m <= 0)
00594 throw WrongDim("GetLU", "Provide a non-empty matrix");
00595 #endif
00596
00597 char uplo(Uplo);
00598 P.Reallocate(m);
00599 csptrf_(&uplo, &m, A.GetDataVoid(),
00600 P.GetData(), &info.GetInfoRef());
00601
00602 #ifdef SELDON_LAPACK_CHECK_INFO
00603 if (info.GetInfo() != 0)
00604 throw LapackError(info.GetInfo(), "GetLU",
00605 "An error occured during the factorization.");
00606 #endif
00607
00608 }
00609
00610
00611 template <class Prop0, class Allocator0,
00612 class Allocator1>
00613 void GetLU(SeldonUplo Uplo,
00614 Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A,
00615 Vector<int, VectFull, Allocator1>& P,
00616 LapackInfo& info = lapack_info)
00617 {
00618 int m = A.GetM();
00619
00620 #ifdef SELDON_CHECK_BOUNDS
00621 if (m <= 0)
00622 throw WrongDim("GetLU", "Provide a non-empty matrix");
00623 #endif
00624
00625 char uplo(Uplo);
00626 P.Reallocate(m);
00627 zsptrf_(&uplo, &m, A.GetDataVoid(),
00628 P.GetData(), &info.GetInfoRef());
00629
00630 #ifdef SELDON_LAPACK_CHECK_INFO
00631 if (info.GetInfo() != 0)
00632 throw LapackError(info.GetInfo(), "GetLU",
00633 "An error occured during the factorization.");
00634 #endif
00635
00636 }
00637
00638
00639
00640
00641
00642 template <class Prop0, class Allocator0,
00643 class Allocator1>
00644 void GetLU(Matrix<float, Prop0, RowSym, Allocator0>& A,
00645 Vector<int, VectFull, Allocator1>& P,
00646 LapackInfo& info = lapack_info)
00647 {
00648 int m = A.GetM();
00649
00650 #ifdef SELDON_CHECK_BOUNDS
00651 if (m <= 0)
00652 throw WrongDim("GetLU", "Provide a non-empty matrix");
00653 #endif
00654
00655 int lwork = m;
00656 char uplo('L');
00657 Vector<float, VectFull, Allocator0> work(lwork);
00658 P.Reallocate(m);
00659 ssytrf_(&uplo, &m, A.GetData(), &m,
00660 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
00661
00662 #ifdef SELDON_LAPACK_CHECK_INFO
00663 if (info.GetInfo() != 0)
00664 throw LapackError(info.GetInfo(), "GetLU",
00665 "An error occured during the factorization.");
00666 #endif
00667
00668 }
00669
00670
00671 template <class Prop0, class Allocator0,
00672 class Allocator1>
00673 void GetLU(Matrix<double, Prop0, RowSym, Allocator0>& A,
00674 Vector<int, VectFull, Allocator1>& P,
00675 LapackInfo& info = lapack_info)
00676 {
00677 int m = A.GetM();
00678
00679 #ifdef SELDON_CHECK_BOUNDS
00680 if (m <= 0)
00681 throw WrongDim("GetLU", "Provide a non-empty matrix");
00682 #endif
00683
00684 int lwork = m;
00685 char uplo('L');
00686 Vector<double, VectFull, Allocator0> work(lwork);
00687 P.Reallocate(m);
00688 dsytrf_(&uplo, &m, A.GetData(), &m,
00689 P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
00690
00691 #ifdef SELDON_LAPACK_CHECK_INFO
00692 if (info.GetInfo() != 0)
00693 throw LapackError(info.GetInfo(), "GetLU",
00694 "An error occured during the factorization.");
00695 #endif
00696
00697 }
00698
00699
00700 template <class Prop0, class Allocator0,
00701 class Allocator1>
00702 void GetLU(Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
00703 Vector<int, VectFull, Allocator1>& P,
00704 LapackInfo& info = lapack_info)
00705 {
00706 int m = A.GetM();
00707
00708 #ifdef SELDON_CHECK_BOUNDS
00709 if (m <= 0)
00710 throw WrongDim("GetLU", "Provide a non-empty matrix");
00711 #endif
00712
00713 int lwork = m;
00714 char uplo('L');
00715 Vector<complex<float>, VectFull, Allocator0> work(lwork);
00716 P.Reallocate(m);
00717 csytrf_(&uplo, &m, A.GetDataVoid(), &m,
00718 P.GetData(), work.GetDataVoid(),
00719 &lwork, &info.GetInfoRef());
00720
00721 #ifdef SELDON_LAPACK_CHECK_INFO
00722 if (info.GetInfo() != 0)
00723 throw LapackError(info.GetInfo(), "GetLU",
00724 "An error occured during the factorization.");
00725 #endif
00726
00727 }
00728
00729
00730 template <class Prop0, class Allocator0,
00731 class Allocator1>
00732 void GetLU(Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
00733 Vector<int, VectFull, Allocator1>& P,
00734 LapackInfo& info = lapack_info)
00735 {
00736 int m = A.GetM();
00737
00738 #ifdef SELDON_CHECK_BOUNDS
00739 if (m <= 0)
00740 throw WrongDim("GetLU", "Provide a non-empty matrix");
00741 #endif
00742
00743 int lwork = m;
00744 char uplo('L');
00745 Vector<complex<double>, VectFull, Allocator0> work(lwork);
00746 P.Reallocate(m);
00747 zsytrf_(&uplo, &m, A.GetDataVoid(), &m,
00748 P.GetData(), work.GetDataVoid(),
00749 &lwork, &info.GetInfoRef());
00750
00751 #ifdef SELDON_LAPACK_CHECK_INFO
00752 if (info.GetInfo() != 0)
00753 throw LapackError(info.GetInfo(), "GetLU",
00754 "An error occured during the factorization.");
00755 #endif
00756
00757 }
00758
00759
00760
00761
00762
00763 template <class Prop0, class Allocator0,
00764 class Allocator1>
00765 void GetLU(Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
00766 Vector<int, VectFull, Allocator1>& P,
00767 LapackInfo& info = lapack_info)
00768 {
00769 int m = A.GetM();
00770
00771 #ifdef SELDON_CHECK_BOUNDS
00772 if (m <= 0)
00773 throw WrongDim("GetLU", "Provide a non-empty matrix");
00774 #endif
00775
00776 char uplo('L');
00777 P.Reallocate(m);
00778 ssptrf_(&uplo, &m, A.GetData(),
00779 P.GetData(), &info.GetInfoRef());
00780
00781 #ifdef SELDON_LAPACK_CHECK_INFO
00782 if (info.GetInfo() != 0)
00783 throw LapackError(info.GetInfo(), "GetLU",
00784 "An error occured during the factorization.");
00785 #endif
00786
00787 }
00788
00789
00790 template <class Prop0, class Allocator0,
00791 class Allocator1>
00792 void GetLU(Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
00793 Vector<int, VectFull, Allocator1>& P,
00794 LapackInfo& info = lapack_info)
00795 {
00796 int m = A.GetM();
00797
00798 #ifdef SELDON_CHECK_BOUNDS
00799 if (m <= 0)
00800 throw WrongDim("GetLU", "Provide a non-empty matrix");
00801 #endif
00802
00803 char uplo('L');
00804 P.Reallocate(m);
00805 dsptrf_(&uplo, &m, A.GetData(),
00806 P.GetData(), &info.GetInfoRef());
00807
00808 #ifdef SELDON_LAPACK_CHECK_INFO
00809 if (info.GetInfo() != 0)
00810 throw LapackError(info.GetInfo(), "GetLU",
00811 "An error occured during the factorization.");
00812 #endif
00813
00814 }
00815
00816
00817 template <class Prop0, class Allocator0,
00818 class Allocator1>
00819 void GetLU(Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A,
00820 Vector<int, VectFull, Allocator1>& P,
00821 LapackInfo& info = lapack_info)
00822 {
00823 int m = A.GetM();
00824
00825 #ifdef SELDON_CHECK_BOUNDS
00826 if (m <= 0)
00827 throw WrongDim("GetLU", "Provide a non-empty matrix");
00828 #endif
00829
00830 char uplo('L');
00831 P.Reallocate(m);
00832 csptrf_(&uplo, &m, A.GetDataVoid(),
00833 P.GetData(), &info.GetInfoRef());
00834
00835 #ifdef SELDON_LAPACK_CHECK_INFO
00836 if (info.GetInfo() != 0)
00837 throw LapackError(info.GetInfo(), "GetLU",
00838 "An error occured during the factorization.");
00839 #endif
00840
00841 }
00842
00843
00844 template <class Prop0, class Allocator0,
00845 class Allocator1>
00846 void GetLU(Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A,
00847 Vector<int, VectFull, Allocator1>& P,
00848 LapackInfo& info = lapack_info)
00849 {
00850 int m = A.GetM();
00851
00852 #ifdef SELDON_CHECK_BOUNDS
00853 if (m <= 0)
00854 throw WrongDim("GetLU", "Provide a non-empty matrix");
00855 #endif
00856
00857 char uplo('L');
00858 P.Reallocate(m);
00859 zsptrf_(&uplo, &m, A.GetDataVoid(),
00860 P.GetData(), &info.GetInfoRef());
00861
00862 #ifdef SELDON_LAPACK_CHECK_INFO
00863 if (info.GetInfo() != 0)
00864 throw LapackError(info.GetInfo(), "GetLU",
00865 "An error occured during the factorization.");
00866 #endif
00867
00868 }
00869
00870
00871
00872
00873
00874 template <class Prop0, class Allocator0,
00875 class Allocator1>
00876 void GetLU(SeldonUplo Uplo,
00877 Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
00878 Vector<int, VectFull, Allocator1>& P,
00879 LapackInfo& info = lapack_info)
00880 {
00881 int m = A.GetM();
00882
00883 #ifdef SELDON_CHECK_BOUNDS
00884 if (m <= 0)
00885 throw WrongDim("GetLU", "Provide a non-empty matrix");
00886 #endif
00887
00888 char uplo(Uplo.RevChar());
00889 P.Reallocate(m);
00890 ssptrf_(&uplo, &m, A.GetData(),
00891 P.GetData(), &info.GetInfoRef());
00892
00893 #ifdef SELDON_LAPACK_CHECK_INFO
00894 if (info.GetInfo() != 0)
00895 throw LapackError(info.GetInfo(), "GetLU",
00896 "An error occured during the factorization.");
00897 #endif
00898
00899 }
00900
00901
00902 template <class Prop0, class Allocator0,
00903 class Allocator1>
00904 void GetLU(SeldonUplo Uplo,
00905 Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
00906 Vector<int, VectFull, Allocator1>& P,
00907 LapackInfo& info = lapack_info)
00908 {
00909 int m = A.GetM();
00910
00911 #ifdef SELDON_CHECK_BOUNDS
00912 if (m <= 0)
00913 throw WrongDim("GetLU", "Provide a non-empty matrix");
00914 #endif
00915
00916 char uplo(Uplo.RevChar());
00917 P.Reallocate(m);
00918 dsptrf_(&uplo, &m, A.GetData(),
00919 P.GetData(), &info.GetInfoRef());
00920
00921 #ifdef SELDON_LAPACK_CHECK_INFO
00922 if (info.GetInfo() != 0)
00923 throw LapackError(info.GetInfo(), "GetLU",
00924 "An error occured during the factorization.");
00925 #endif
00926
00927 }
00928
00929
00930 template <class Prop0, class Allocator0,
00931 class Allocator1>
00932 void GetLU(SeldonUplo Uplo,
00933 Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A,
00934 Vector<int, VectFull, Allocator1>& P,
00935 LapackInfo& info = lapack_info)
00936 {
00937 int m = A.GetM();
00938
00939 #ifdef SELDON_CHECK_BOUNDS
00940 if (m <= 0)
00941 throw WrongDim("GetLU", "Provide a non-empty matrix");
00942 #endif
00943
00944 char uplo(Uplo.RevChar());
00945 P.Reallocate(m);
00946 csptrf_(&uplo, &m, A.GetDataVoid(),
00947 P.GetData(), &info.GetInfoRef());
00948
00949 #ifdef SELDON_LAPACK_CHECK_INFO
00950 if (info.GetInfo() != 0)
00951 throw LapackError(info.GetInfo(), "GetLU",
00952 "An error occured during the factorization.");
00953 #endif
00954
00955 }
00956
00957
00958 template <class Prop0, class Allocator0,
00959 class Allocator1>
00960 void GetLU(SeldonUplo Uplo,
00961 Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A,
00962 Vector<int, VectFull, Allocator1>& P,
00963 LapackInfo& info = lapack_info)
00964 {
00965 int m = A.GetM();
00966
00967 #ifdef SELDON_CHECK_BOUNDS
00968 if (m <= 0)
00969 throw WrongDim("GetLU", "Provide a non-empty matrix");
00970 #endif
00971
00972 char uplo(Uplo.RevChar());
00973 P.Reallocate(m);
00974 zsptrf_(&uplo, &m, A.GetDataVoid(),
00975 P.GetData(), &info.GetInfoRef());
00976
00977 #ifdef SELDON_LAPACK_CHECK_INFO
00978 if (info.GetInfo() != 0)
00979 throw LapackError(info.GetInfo(), "GetLU",
00980 "An error occured during the factorization.");
00981 #endif
00982
00983 }
00984
00985
00986
00987
00988
00989 template <class Prop0, class Allocator0,
00990 class Allocator1>
00991 void GetLU(Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
00992 Vector<int, VectFull, Allocator1>& P,
00993 LapackInfo& info = lapack_info)
00994 {
00995 int m = A.GetM();
00996
00997 #ifdef SELDON_CHECK_BOUNDS
00998 if (m <= 0)
00999 throw WrongDim("GetLU", "Provide a non-empty matrix");
01000 #endif
01001
01002 int lwork = m;
01003 char uplo('U');
01004 Vector<complex<float>, VectFull, Allocator0> work(lwork);
01005 P.Reallocate(m);
01006 chetrf_(&uplo, &m, A.GetDataVoid(), &m,
01007 P.GetData(), work.GetDataVoid(),
01008 &lwork, &info.GetInfoRef());
01009
01010 #ifdef SELDON_LAPACK_CHECK_INFO
01011 if (info.GetInfo() != 0)
01012 throw LapackError(info.GetInfo(), "GetLU",
01013 "An error occured during the factorization.");
01014 #endif
01015
01016 }
01017
01018
01019 template <class Prop0, class Allocator0,
01020 class Allocator1>
01021 void GetLU(Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
01022 Vector<int, VectFull, Allocator1>& P,
01023 LapackInfo& info = lapack_info)
01024 {
01025 int m = A.GetM();
01026
01027 #ifdef SELDON_CHECK_BOUNDS
01028 if (m <= 0)
01029 throw WrongDim("GetLU", "Provide a non-empty matrix");
01030 #endif
01031
01032 int lwork = m;
01033 char uplo('U');
01034 Vector<complex<double>, VectFull, Allocator0> work(lwork);
01035 P.Reallocate(m);
01036 zhetrf_(&uplo, &m, A.GetDataVoid(), &m,
01037 P.GetData(), work.GetDataVoid(),
01038 &lwork, &info.GetInfoRef());
01039
01040 #ifdef SELDON_LAPACK_CHECK_INFO
01041 if (info.GetInfo() != 0)
01042 throw LapackError(info.GetInfo(), "GetLU",
01043 "An error occured during the factorization.");
01044 #endif
01045
01046 }
01047
01048
01049
01050
01051
01052 template <class Prop0, class Allocator0,
01053 class Allocator1>
01054 void GetLU(Matrix<complex<float>, Prop0, ColHermPacked, Allocator0>& A,
01055 Vector<int, VectFull, Allocator1>& P,
01056 LapackInfo& info = lapack_info)
01057 {
01058 int m = A.GetM();
01059
01060 #ifdef SELDON_CHECK_BOUNDS
01061 if (m <= 0)
01062 throw WrongDim("GetLU", "Provide a non-empty matrix");
01063 #endif
01064
01065 char uplo('U');
01066 P.Reallocate(m);
01067 chptrf_(&uplo, &m, A.GetDataVoid(),
01068 P.GetData(), &info.GetInfoRef());
01069
01070 #ifdef SELDON_LAPACK_CHECK_INFO
01071 if (info.GetInfo() != 0)
01072 throw LapackError(info.GetInfo(), "GetLU",
01073 "An error occured during the factorization.");
01074 #endif
01075
01076 }
01077
01078
01079 template <class Prop0, class Allocator0,
01080 class Allocator1>
01081 void GetLU(Matrix<complex<double>, Prop0, ColHermPacked, Allocator0>& A,
01082 Vector<int, VectFull, Allocator1>& P,
01083 LapackInfo& info = lapack_info)
01084 {
01085 int m = A.GetM();
01086
01087 #ifdef SELDON_CHECK_DIMENSIONS
01088 if (m <= 0)
01089 throw WrongDim("GetLU", "Provide a non-empty matrix");
01090 #endif
01091
01092 char uplo('U');
01093 P.Reallocate(m);
01094 zhptrf_(&uplo, &m, A.GetDataVoid(),
01095 P.GetData(), &info.GetInfoRef());
01096
01097 #ifdef SELDON_LAPACK_CHECK_INFO
01098 if (info.GetInfo() != 0)
01099 throw LapackError(info.GetInfo(), "GetLU",
01100 "An error occured during the factorization.");
01101 #endif
01102
01103 }
01104
01105
01106
01107
01108
01109 template <class Prop0, class Allocator0,
01110 class Allocator1>
01111 void GetLU(Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
01112 Vector<int, VectFull, Allocator1>& P,
01113 LapackInfo& info = lapack_info)
01114 {
01115 int m = A.GetM();
01116
01117 #ifdef SELDON_CHECK_DIMENSIONS
01118 if (m <= 0)
01119 throw WrongDim("GetLU", "Provide a non-empty matrix");
01120 #endif
01121
01122 int lwork = m;
01123 char uplo('L');
01124 Vector<complex<float>, VectFull, Allocator0> work(lwork);
01125 P.Reallocate(m);
01126 chetrf_(&uplo, &m, A.GetDataVoid(), &m,
01127 P.GetData(), work.GetDataVoid(),
01128 &lwork, &info.GetInfoRef());
01129
01130 #ifdef SELDON_LAPACK_CHECK_INFO
01131 if (info.GetInfo() != 0)
01132 throw LapackError(info.GetInfo(), "GetLU",
01133 "An error occured during the factorization.");
01134 #endif
01135
01136 }
01137
01138
01139 template <class Prop0, class Allocator0,
01140 class Allocator1>
01141 void GetLU(Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
01142 Vector<int, VectFull, Allocator1>& P,
01143 LapackInfo& info = lapack_info)
01144 {
01145 int m = A.GetM();
01146
01147 #ifdef SELDON_CHECK_DIMENSIONS
01148 if (m <= 0)
01149 throw WrongDim("GetLU", "Provide a non-empty matrix");
01150 #endif
01151
01152 int lwork = m;
01153 char uplo('L');
01154 Vector<complex<double>, VectFull, Allocator0> work(lwork);
01155 P.Reallocate(m);
01156 zhetrf_(&uplo, &m, A.GetDataVoid(), &m,
01157 P.GetData(), work.GetDataVoid(),
01158 &lwork, &info.GetInfoRef());
01159
01160 #ifdef SELDON_LAPACK_CHECK_INFO
01161 if (info.GetInfo() != 0)
01162 throw LapackError(info.GetInfo(), "GetLU",
01163 "An error occured during the factorization.");
01164 #endif
01165
01166 }
01167
01168
01169
01170
01171
01172 template <class Prop0, class Allocator0,
01173 class Allocator1>
01174 void GetLU(Matrix<complex<float>, Prop0, RowHermPacked, Allocator0>& A,
01175 Vector<int, VectFull, Allocator1>& P,
01176 LapackInfo& info = lapack_info)
01177 {
01178 int m = A.GetM();
01179
01180 #ifdef SELDON_CHECK_DIMENSIONS
01181 if (m <= 0)
01182 throw WrongDim("GetLU", "Provide a non-empty matrix");
01183 #endif
01184
01185 char uplo('L');
01186 P.Reallocate(m);
01187 chptrf_(&uplo, &m, A.GetDataVoid(),
01188 P.GetData(), &info.GetInfoRef());
01189
01190 #ifdef SELDON_LAPACK_CHECK_INFO
01191 if (info.GetInfo() != 0)
01192 throw LapackError(info.GetInfo(), "GetLU",
01193 "An error occured during the factorization.");
01194 #endif
01195
01196 }
01197
01198
01199 template <class Prop0, class Allocator0,
01200 class Allocator1>
01201 void GetLU(Matrix<complex<double>, Prop0, RowHermPacked, Allocator0>& A,
01202 Vector<int, VectFull, Allocator1>& P,
01203 LapackInfo& info = lapack_info)
01204 {
01205 int m = A.GetM();
01206
01207 #ifdef SELDON_CHECK_DIMENSIONS
01208 if (m <= 0)
01209 throw WrongDim("GetLU", "Provide a non-empty matrix");
01210 #endif
01211
01212 char uplo('L');
01213 P.Reallocate(m);
01214 zhptrf_(&uplo, &m, A.GetDataVoid(),
01215 P.GetData(), &info.GetInfoRef());
01216
01217 #ifdef SELDON_LAPACK_CHECK_INFO
01218 if (info.GetInfo() != 0)
01219 throw LapackError(info.GetInfo(), "GetLU",
01220 "An error occured during the factorization.");
01221 #endif
01222
01223 }
01224
01225
01226
01228
01229
01230
01232
01233
01234
01235
01236
01237
01238 template <class Prop0, class Allocator0,
01239 class Allocator1,class Allocator2>
01240 void SolveLU(const Matrix<float, Prop0, ColMajor, Allocator0>& A,
01241 const Vector<int, VectFull, Allocator1>& P,
01242 Vector<float, VectFull, Allocator2>& b,
01243 LapackInfo& info = lapack_info)
01244 {
01245
01246 #ifdef SELDON_CHECK_DIMENSIONS
01247 CheckDim(A, b, "SolveLU(A, pivot, X)");
01248 #endif
01249
01250 int m = A.GetM();
01251 int nrhs = 1;
01252 char trans('N');
01253 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
01254 b.GetData(), &m, &info.GetInfoRef() );
01255 }
01256
01257
01258 template <class Prop0, class Allocator0,
01259 class Allocator1, class Allocator2>
01260 void SolveLU(const Matrix<double, Prop0, ColMajor, Allocator0>& A,
01261 const Vector<int, VectFull, Allocator1>& P,
01262 Vector<double, VectFull, Allocator2>& b,
01263 LapackInfo& info = lapack_info)
01264 {
01265
01266 #ifdef SELDON_CHECK_DIMENSIONS
01267 CheckDim(A, b, "SolveLU(A, pivot, X)");
01268 #endif
01269
01270 int m = A.GetM();
01271 int nrhs = 1;
01272 char trans('N');
01273 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m,P.GetData(),
01274 b.GetData(), &m, &info.GetInfoRef() );
01275 }
01276
01277
01278 template <class Prop0, class Allocator0,
01279 class Allocator1, class Allocator2>
01280 void SolveLU(const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
01281 const Vector<int, VectFull, Allocator1>& P,
01282 Vector<complex<float>, VectFull, Allocator2>& b,
01283 LapackInfo& info = lapack_info)
01284 {
01285
01286 #ifdef SELDON_CHECK_DIMENSIONS
01287 CheckDim(A, b, "SolveLU(A, pivot, X)");
01288 #endif
01289
01290 int m = A.GetM();
01291 int nrhs = 1;
01292 char trans('N');
01293 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m,
01294 P.GetData(), b.GetDataVoid(),
01295 &m, &info.GetInfoRef() );
01296 }
01297
01298
01299 template <class Prop0, class Allocator0,
01300 class Allocator1, class Allocator2>
01301 void SolveLU(const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
01302 const Vector<int, VectFull, Allocator1>& P,
01303 Vector<complex<double>, VectFull, Allocator2>& b,
01304 LapackInfo& info = lapack_info)
01305 {
01306
01307 #ifdef SELDON_CHECK_DIMENSIONS
01308 CheckDim(A, b, "SolveLU(A, pivot, X)");
01309 #endif
01310
01311 int m = A.GetM();
01312 int nrhs = 1;
01313 char trans('N');
01314 zgetrs_(&trans, &m, &nrhs, A.GetData(), &m,
01315 P.GetData(), b.GetDataVoid(),
01316 &m, &info.GetInfoRef() );
01317 }
01318
01319
01320
01321
01322
01323 template <class Prop0, class Allocator0,
01324 class Allocator1,class Allocator2>
01325 void SolveLU(const SeldonTranspose& TransA,
01326 const Matrix<float, Prop0, ColMajor, Allocator0>& A,
01327 const Vector<int, VectFull, Allocator1>& P,
01328 Vector<float, VectFull, Allocator2>& b,
01329 LapackInfo& info = lapack_info)
01330 {
01331
01332 #ifdef SELDON_CHECK_DIMENSIONS
01333 CheckDim(A, b, "SolveLU(A, pivot, X)");
01334 #endif
01335
01336 int m = A.GetM();
01337 int nrhs = 1;
01338 char trans = TransA.Char();
01339 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
01340 b.GetData(), &m, &info.GetInfoRef());
01341 }
01342
01343 template <class Prop0, class Allocator0,
01344 class Allocator1,class Allocator2>
01345 void SolveLU(const SeldonTranspose& TransA,
01346 const Matrix<double, Prop0, ColMajor, Allocator0>& A,
01347 const Vector<int, VectFull, Allocator1>& P,
01348 Vector<double, VectFull, Allocator2>& b,
01349 LapackInfo& info = lapack_info)
01350 {
01351
01352 #ifdef SELDON_CHECK_DIMENSIONS
01353 CheckDim(A, b, "SolveLU(A, pivot, X)");
01354 #endif
01355
01356 int m = A.GetM();
01357 int nrhs = 1;
01358 char trans = TransA.Char();
01359 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
01360 b.GetData(), &m, &info.GetInfoRef());
01361 }
01362
01363 template <class Prop0, class Allocator0,
01364 class Allocator1,class Allocator2>
01365 void SolveLU(const SeldonTranspose& TransA,
01366 const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
01367 const Vector<int, VectFull, Allocator1>& P,
01368 Vector<complex<float>, VectFull, Allocator2>& b,
01369 LapackInfo& info = lapack_info)
01370 {
01371
01372 #ifdef SELDON_CHECK_DIMENSIONS
01373 CheckDim(A, b, "SolveLU(A, pivot, X)");
01374 #endif
01375
01376 int m = A.GetM();
01377 int nrhs = 1;
01378 char trans = TransA.Char();
01379 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
01380 b.GetDataVoid(), &m, &info.GetInfoRef());
01381 }
01382
01383 template <class Prop0, class Allocator0,
01384 class Allocator1,class Allocator2>
01385 void SolveLU(const SeldonTranspose& TransA,
01386 const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
01387 const Vector<int, VectFull, Allocator1>& P,
01388 Vector<complex<double>, VectFull, Allocator2>& b,
01389 LapackInfo& info = lapack_info)
01390 {
01391
01392 #ifdef SELDON_CHECK_DIMENSIONS
01393 CheckDim(A, b, "SolveLU(A, pivot, X)");
01394 #endif
01395
01396 int m = A.GetM();
01397 int nrhs = 1;
01398 char trans = TransA.Char();
01399 zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
01400 b.GetDataVoid(), &m, &info.GetInfoRef());
01401 }
01402
01403
01404
01405
01406 template <class Prop0, class Allocator0,
01407 class Allocator1,class Allocator2>
01408 void SolveLU(const Matrix<float, Prop0, RowMajor, Allocator0>& A,
01409 const Vector<int, VectFull, Allocator1>& P,
01410 Vector<float, VectFull, Allocator2>& b,
01411 LapackInfo& info = lapack_info)
01412 {
01413
01414 #ifdef SELDON_CHECK_DIMENSIONS
01415 CheckDim(A, b, "SolveLU(A, pivot, X)");
01416 #endif
01417
01418 int m = A.GetM();
01419 int nrhs = 1;
01420 char trans('T');
01421 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m,
01422 P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
01423 }
01424
01425
01426 template <class Prop0, class Allocator0,
01427 class Allocator1,class Allocator2>
01428 void SolveLU(const Matrix<double, Prop0, RowMajor, Allocator0>& A,
01429 const Vector<int, VectFull, Allocator1>& P,
01430 Vector<double, VectFull, Allocator2>& b,
01431 LapackInfo& info = lapack_info)
01432 {
01433
01434 #ifdef SELDON_CHECK_DIMENSIONS
01435 CheckDim(A, b, "SolveLU(A, pivot, X)");
01436 #endif
01437
01438 int m = A.GetM();
01439 int nrhs = 1;
01440 char trans('T');
01441 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m,
01442 P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
01443 }
01444
01445
01446 template <class Prop0, class Allocator0,
01447 class Allocator1,class Allocator2>
01448 void SolveLU(const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
01449 const Vector<int, VectFull, Allocator1>& P,
01450 Vector<complex<float>, VectFull, Allocator2>& b,
01451 LapackInfo& info = lapack_info)
01452 {
01453
01454 #ifdef SELDON_CHECK_DIMENSIONS
01455 CheckDim(A, b, "SolveLU(A, pivot, X)");
01456 #endif
01457
01458 int m = A.GetM();
01459 int nrhs = 1;
01460 char trans('T');
01461 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m,
01462 P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
01463 }
01464
01465
01466 template <class Prop0, class Allocator0,
01467 class Allocator1,class Allocator2>
01468 void SolveLU(const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
01469 const Vector<int, VectFull, Allocator1>& P,
01470 Vector<complex<double>, VectFull, Allocator2>& b,
01471 LapackInfo& info = lapack_info)
01472 {
01473
01474 #ifdef SELDON_CHECK_DIMENSIONS
01475 CheckDim(A, b, "SolveLU(A, pivot, X)");
01476 #endif
01477
01478 int m = A.GetM();
01479 int nrhs = 1;
01480 char trans('T');
01481 zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m,
01482 P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
01483 }
01484
01485
01486
01487
01488
01489 template <class Prop0, class Allocator0,
01490 class Allocator1,class Allocator2>
01491 void SolveLU(const SeldonTranspose& TransA,
01492 const Matrix<float, Prop0, RowMajor, Allocator0>& A,
01493 const Vector<int, VectFull, Allocator1>& P,
01494 Vector<float, VectFull, Allocator2>& b,
01495 LapackInfo& info = lapack_info)
01496 {
01497
01498 #ifdef SELDON_CHECK_DIMENSIONS
01499 CheckDim(A, b, "SolveLU(A, pivot, X)");
01500 #endif
01501
01502 int m = A.GetM();
01503 int nrhs = 1;
01504 char trans = TransA.RevChar();
01505 sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
01506 b.GetData(), &m, &info.GetInfoRef());
01507 }
01508
01509 template <class Prop0, class Allocator0,
01510 class Allocator1,class Allocator2>
01511 void SolveLU(const SeldonTranspose& TransA,
01512 const Matrix<double, Prop0, RowMajor, Allocator0>& A,
01513 const Vector<int, VectFull, Allocator1>& P,
01514 Vector<double, VectFull, Allocator2>& b,
01515 LapackInfo& info = lapack_info)
01516 {
01517
01518 #ifdef SELDON_CHECK_DIMENSIONS
01519 CheckDim(A, b, "SolveLU(A, pivot, X)");
01520 #endif
01521
01522 int m = A.GetM();
01523 int nrhs = 1;
01524 char trans = TransA.RevChar();
01525 dgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
01526 b.GetData(), &m, &info.GetInfoRef());
01527 }
01528
01529 template <class Prop0, class Allocator0,
01530 class Allocator1,class Allocator2>
01531 void SolveLU(const SeldonTranspose& TransA,
01532 const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
01533 const Vector<int, VectFull, Allocator1>& P,
01534 Vector<complex<float>, VectFull, Allocator2>& b,
01535 LapackInfo& info = lapack_info)
01536 {
01537
01538 #ifdef SELDON_CHECK_DIMENSIONS
01539 CheckDim(A, b, "SolveLU(A, pivot, X)");
01540 #endif
01541
01542 int m = A.GetM();
01543 int nrhs = 1;
01544 char trans = TransA.RevChar();
01545 if (TransA.ConjTrans())
01546 Conjugate(b);
01547
01548 cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
01549 b.GetDataVoid(), &m, &info.GetInfoRef());
01550
01551 if (TransA.ConjTrans())
01552 Conjugate(b);
01553 }
01554
01555 template <class Prop0, class Allocator0,
01556 class Allocator1,class Allocator2>
01557 void SolveLU(const SeldonTranspose& TransA,
01558 const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
01559 const Vector<int, VectFull, Allocator1>& P,
01560 Vector<complex<double>, VectFull, Allocator2>& b,
01561 LapackInfo& info = lapack_info)
01562 {
01563
01564 #ifdef SELDON_CHECK_DIMENSIONS
01565 CheckDim(A, b, "SolveLU(A, pivot, X)");
01566 #endif
01567
01568 int m = A.GetM();
01569 int nrhs = 1;
01570 char trans = TransA.RevChar();
01571 if (TransA.ConjTrans())
01572 Conjugate(b);
01573
01574 zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
01575 b.GetDataVoid(), &m, &info.GetInfoRef());
01576
01577 if (TransA.ConjTrans())
01578 Conjugate(b);
01579 }
01580
01581
01582
01583
01584
01585 template <class Prop0, class Allocator0,
01586 class Allocator1, class Allocator2>
01587 void SolveLU(const Matrix<float, Prop0, ColSym, Allocator0>& A,
01588 const Vector<int, VectFull, Allocator1>& P,
01589 Vector<float, VectFull, Allocator2>& b,
01590 LapackInfo& info = lapack_info)
01591 {
01592
01593 #ifdef SELDON_CHECK_DIMENSIONS
01594 CheckDim(A, b, "SolveLU(A, pivot, X)");
01595 #endif
01596
01597 int m = A.GetM(); int nrhs = 1;
01598 char uplo('U');
01599 ssytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
01600 P.GetData(), b.GetData(), &m, &info.GetInfoRef());
01601 }
01602
01603
01604 template <class Prop0, class Allocator0,
01605 class Allocator1, class Allocator2>
01606 void SolveLU(const Matrix<double, Prop0, ColSym, Allocator0>& A,
01607 const Vector<int, VectFull, Allocator1>& P,
01608 Vector<double, VectFull, Allocator2>& b,
01609 LapackInfo& info = lapack_info)
01610 {
01611
01612 #ifdef SELDON_CHECK_DIMENSIONS
01613 CheckDim(A, b, "SolveLU(A, pivot, X)");
01614 #endif
01615
01616 int m = A.GetM(); int nrhs = 1;
01617 char uplo('U');
01618 dsytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
01619 P.GetData(), b.GetData(), &m, &info.GetInfoRef());
01620 }
01621
01622
01623 template <class Prop0, class Allocator0,
01624 class Allocator1, class Allocator2>
01625 void SolveLU(const Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
01626 const Vector<int, VectFull, Allocator1>& P,
01627 Vector<complex<float>, VectFull, Allocator2>& b,
01628 LapackInfo& info = lapack_info)
01629 {
01630
01631 #ifdef SELDON_CHECK_DIMENSIONS
01632 CheckDim(A, b, "SolveLU(A, pivot, X)");
01633 #endif
01634
01635 int m = A.GetM(); int nrhs = 1;
01636 char uplo('U');
01637 csytrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
01638 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01639 }
01640
01641
01642 template <class Prop0, class Allocator0,
01643 class Allocator1, class Allocator2>
01644 void SolveLU(const Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
01645 const Vector<int, VectFull, Allocator1>& P,
01646 Vector<complex<double>, VectFull, Allocator2>& b,
01647 LapackInfo& info = lapack_info)
01648 {
01649
01650 #ifdef SELDON_CHECK_DIMENSIONS
01651 CheckDim(A, b, "SolveLU(A, pivot, X)");
01652 #endif
01653
01654 int m = A.GetM(); int nrhs = 1;
01655 char uplo('U');
01656 zsytrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
01657 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01658 }
01659
01660
01661
01662
01663
01664 template <class Prop0, class Allocator0,
01665 class Allocator1, class Allocator2>
01666 void SolveLU(const Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
01667 const Vector<int, VectFull, Allocator1>& P,
01668 Vector<float, VectFull, Allocator2>& b,
01669 LapackInfo& info = lapack_info)
01670 {
01671
01672 #ifdef SELDON_CHECK_DIMENSIONS
01673 CheckDim(A, b, "SolveLU(A, pivot, X)");
01674 #endif
01675
01676 int m = A.GetM();
01677 int nrhs = 1;
01678 char uplo('U');
01679 ssptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
01680 b.GetData(), &m, &info.GetInfoRef() );
01681 }
01682
01683
01684 template <class Prop0, class Allocator0,
01685 class Allocator1, class Allocator2>
01686 void SolveLU(const Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
01687 const Vector<int, VectFull, Allocator1>& P,
01688 Vector<double, VectFull, Allocator2>& b,
01689 LapackInfo& info = lapack_info)
01690 {
01691
01692 #ifdef SELDON_CHECK_DIMENSIONS
01693 CheckDim(A, b, "SolveLU(A, pivot, X)");
01694 #endif
01695
01696 int m = A.GetM();
01697 int nrhs = 1;
01698 char uplo('U');
01699 dsptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
01700 b.GetData(), &m, &info.GetInfoRef() );
01701 }
01702
01703
01704 template <class Prop0, class Allocator0,
01705 class Allocator1,class Allocator2>
01706 void SolveLU(const Matrix<complex<float>, Prop0, ColSymPacked,
01707 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
01708 Vector<complex<float>, VectFull, Allocator2>& b,
01709 LapackInfo& info = lapack_info)
01710 {
01711
01712 #ifdef SELDON_CHECK_DIMENSIONS
01713 CheckDim(A, b, "SolveLU(A, pivot, X)");
01714 #endif
01715
01716 int m = A.GetM();
01717 int nrhs = 1;
01718 char uplo('U');
01719 csptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
01720 b.GetData(), &m, &info.GetInfoRef() );
01721 }
01722
01723
01724 template <class Prop0, class Allocator0,
01725 class Allocator1, class Allocator2>
01726 void SolveLU(const Matrix<complex<double>, Prop0, ColSymPacked,
01727 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
01728 Vector<complex<double>, VectFull, Allocator2>& b,
01729 LapackInfo& info = lapack_info)
01730 {
01731
01732 #ifdef SELDON_CHECK_DIMENSIONS
01733 CheckDim(A, b, "SolveLU(A, pivot, X)");
01734 #endif
01735
01736 int m = A.GetM();
01737 int nrhs = 1;
01738 char uplo('U');
01739 zsptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
01740 b.GetData(), &m, &info.GetInfoRef() );
01741 }
01742
01743
01744
01745
01746
01747 template <class Prop0, class Allocator0,
01748 class Allocator1, class Allocator2>
01749 void SolveLU(const Matrix<float, Prop0, RowSym, Allocator0>& A,
01750 const Vector<int, VectFull, Allocator1>& P,
01751 Vector<float, VectFull, Allocator2>& b,
01752 LapackInfo& info = lapack_info)
01753 {
01754
01755 #ifdef SELDON_CHECK_DIMENSIONS
01756 CheckDim(A, b, "SolveLU(A, pivot, X)");
01757 #endif
01758
01759 int m = A.GetM(); int nrhs = 1;
01760 char uplo('L');
01761 ssytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
01762 P.GetData(), b.GetData(), &m, &info.GetInfoRef());
01763 }
01764
01765
01766 template <class Prop0, class Allocator0,
01767 class Allocator1, class Allocator2>
01768 void SolveLU(const Matrix<double, Prop0, RowSym, Allocator0>& A,
01769 const Vector<int, VectFull, Allocator1>& P,
01770 Vector<double, VectFull, Allocator2>& b,
01771 LapackInfo& info = lapack_info)
01772 {
01773
01774 #ifdef SELDON_CHECK_DIMENSIONS
01775 CheckDim(A, b, "SolveLU(A, pivot, X)");
01776 #endif
01777
01778 int m = A.GetM(); int nrhs = 1;
01779 char uplo('L');
01780 dsytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
01781 P.GetData(), b.GetData(), &m, &info.GetInfoRef());
01782 }
01783
01784
01785 template <class Prop0, class Allocator0,
01786 class Allocator1, class Allocator2>
01787 void SolveLU(const Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
01788 const Vector<int, VectFull, Allocator1>& P,
01789 Vector<complex<float>, VectFull, Allocator2>& b,
01790 LapackInfo& info = lapack_info)
01791 {
01792
01793 #ifdef SELDON_CHECK_DIMENSIONS
01794 CheckDim(A, b, "SolveLU(A, pivot, X)");
01795 #endif
01796
01797 int m = A.GetM(); int nrhs = 1;
01798 char uplo('L');
01799 csytrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
01800 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01801 }
01802
01803
01804 template <class Prop0, class Allocator0,
01805 class Allocator1, class Allocator2>
01806 void SolveLU(const Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
01807 const Vector<int, VectFull, Allocator1>& P,
01808 Vector<complex<double>, VectFull, Allocator2>& b,
01809 LapackInfo& info = lapack_info)
01810 {
01811
01812 #ifdef SELDON_CHECK_DIMENSIONS
01813 CheckDim(A, b, "SolveLU(A, pivot, X)");
01814 #endif
01815
01816 int m = A.GetM(); int nrhs = 1;
01817 char uplo('L');
01818 zsytrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
01819 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01820 }
01821
01822
01823
01824
01825
01826 template <class Prop0, class Allocator0,
01827 class Allocator1, class Allocator2>
01828 void SolveLU(const Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
01829 const Vector<int, VectFull, Allocator1>& P,
01830 Vector<float, VectFull, Allocator2>& b,
01831 LapackInfo& info = lapack_info)
01832 {
01833
01834 #ifdef SELDON_CHECK_DIMENSIONS
01835 CheckDim(A, b, "SolveLU(A, pivot, X)");
01836 #endif
01837
01838 int m = A.GetM();
01839 int nrhs = 1;
01840 char uplo('L');
01841 ssptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
01842 b.GetData(), &m, &info.GetInfoRef() );
01843 }
01844
01845
01846 template <class Prop0, class Allocator0,
01847 class Allocator1, class Allocator2>
01848 void SolveLU(const Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
01849 const Vector<int, VectFull, Allocator1>& P,
01850 Vector<double, VectFull, Allocator2>& b,
01851 LapackInfo& info = lapack_info)
01852 {
01853
01854 #ifdef SELDON_CHECK_DIMENSIONS
01855 CheckDim(A, b, "SolveLU(A, pivot, X)");
01856 #endif
01857
01858 int m = A.GetM();
01859 int nrhs = 1;
01860 char uplo('L');
01861 dsptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
01862 b.GetData(), &m, &info.GetInfoRef() );
01863 }
01864
01865
01866 template <class Prop0, class Allocator0,
01867 class Allocator1, class Allocator2>
01868 void SolveLU(const Matrix<complex<float>, Prop0, RowSymPacked,
01869 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
01870 Vector<complex<float>, VectFull, Allocator2>& b,
01871 LapackInfo& info = lapack_info)
01872 {
01873
01874 #ifdef SELDON_CHECK_DIMENSIONS
01875 CheckDim(A, b, "SolveLU(A, pivot, X)");
01876 #endif
01877
01878 int m = A.GetM();
01879 int nrhs = 1;
01880 char uplo('L');
01881 csptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
01882 b.GetData(), &m, &info.GetInfoRef() );
01883 }
01884
01885
01886 template <class Prop0, class Allocator0,
01887 class Allocator1, class Allocator2>
01888 void SolveLU(const Matrix<complex<double>, Prop0, RowSymPacked,
01889 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
01890 Vector<complex<double>, VectFull, Allocator2>& b,
01891 LapackInfo& info = lapack_info)
01892 {
01893
01894 #ifdef SELDON_CHECK_DIMENSIONS
01895 CheckDim(A, b, "SolveLU(A, pivot, X)");
01896 #endif
01897
01898 int m = A.GetM();
01899 int nrhs = 1;
01900 char uplo('L');
01901 zsptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
01902 b.GetData(), &m, &info.GetInfoRef() );
01903 }
01904
01905
01906
01907
01908
01909 template <class Prop0, class Allocator0,
01910 class Allocator1, class Allocator2>
01911 void SolveLU(const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
01912 const Vector<int, VectFull, Allocator1>& P,
01913 Vector<complex<float>, VectFull, Allocator2>& b,
01914 LapackInfo& info = lapack_info)
01915 {
01916
01917 #ifdef SELDON_CHECK_DIMENSIONS
01918 CheckDim(A, b, "SolveLU(A, pivot, X)");
01919 #endif
01920
01921 int m = A.GetM(); int nrhs = 1;
01922 char uplo('U');
01923 chetrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
01924 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01925 }
01926
01927
01928 template <class Prop0, class Allocator0,
01929 class Allocator1, class Allocator2>
01930 void SolveLU(const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
01931 const Vector<int, VectFull, Allocator1>& P,
01932 Vector<complex<double>, VectFull, Allocator2>& b,
01933 LapackInfo& info = lapack_info)
01934 {
01935
01936 #ifdef SELDON_CHECK_DIMENSIONS
01937 CheckDim(A, b, "SolveLU(A, pivot, X)");
01938 #endif
01939
01940 int m = A.GetM(); int nrhs = 1;
01941 char uplo('U');
01942 zhetrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
01943 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01944 }
01945
01946
01947
01948
01949
01950 template <class Prop0, class Allocator0,
01951 class Allocator1, class Allocator2>
01952 void SolveLU(const Matrix<complex<float>, Prop0, ColHermPacked,
01953 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
01954 Vector<complex<float>, VectFull, Allocator2>& b,
01955 LapackInfo& info = lapack_info)
01956 {
01957
01958 #ifdef SELDON_CHECK_DIMENSIONS
01959 CheckDim(A, b, "SolveLU(A, pivot, X)");
01960 #endif
01961
01962 int m = A.GetM(); int nrhs = 1;
01963 char uplo('U');
01964 chptrs_(&uplo, &m, & nrhs, A.GetDataVoid(),
01965 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01966 }
01967
01968
01969 template <class Prop0, class Allocator0,
01970 class Allocator1, class Allocator2>
01971 void SolveLU(const Matrix<complex<double>, Prop0, ColHermPacked,
01972 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
01973 Vector<complex<double>, VectFull, Allocator2>& b,
01974 LapackInfo& info = lapack_info)
01975 {
01976
01977 #ifdef SELDON_CHECK_DIMENSIONS
01978 CheckDim(A, b, "SolveLU(A, pivot, X)");
01979 #endif
01980
01981 int m = A.GetM(); int nrhs = 1;
01982 char uplo('U');
01983 zhptrs_(&uplo, &m, &nrhs, A.GetDataVoid(),
01984 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
01985 }
01986
01987
01988
01989
01990
01991 template <class Prop0, class Allocator0,
01992 class Allocator1, class Allocator2>
01993 void SolveLU(const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
01994 const Vector<int, VectFull, Allocator1>& P,
01995 Vector<complex<float>, VectFull, Allocator2>& b,
01996 LapackInfo& info = lapack_info)
01997 {
01998
01999 #ifdef SELDON_CHECK_DIMENSIONS
02000 CheckDim(A, b, "SolveLU(A, pivot, X)");
02001 #endif
02002
02003 int m = A.GetM(); int nrhs = 1;
02004 char uplo('L');
02005 Conjugate(b);
02006 chetrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
02007 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
02008 Conjugate(b);
02009 }
02010
02011
02012 template <class Prop0, class Allocator0,
02013 class Allocator1, class Allocator2>
02014 void SolveLU(const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
02015 const Vector<int, VectFull, Allocator1>& P,
02016 Vector<complex<double>, VectFull, Allocator2>& b,
02017 LapackInfo& info = lapack_info)
02018 {
02019
02020 #ifdef SELDON_CHECK_DIMENSIONS
02021 CheckDim(A, b, "SolveLU(A, pivot, X)");
02022 #endif
02023
02024 int m = A.GetM(); int nrhs = 1;
02025 char uplo('L');
02026 Conjugate(b);
02027 zhetrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
02028 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
02029 Conjugate(b);
02030 }
02031
02032
02033
02034
02035
02036 template <class Prop0, class Allocator0,
02037 class Allocator1, class Allocator2>
02038 void SolveLU(const Matrix<complex<float>, Prop0, RowHermPacked,
02039 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
02040 Vector<complex<float>, VectFull, Allocator2>& b,
02041 LapackInfo& info = lapack_info)
02042 {
02043
02044 #ifdef SELDON_CHECK_DIMENSIONS
02045 CheckDim(A, b, "SolveLU(A, pivot, X)");
02046 #endif
02047
02048 int m = A.GetM(); int nrhs = 1;
02049 char uplo('L');
02050 Conjugate(b);
02051 chptrs_(&uplo, &m, & nrhs, A.GetDataVoid(),
02052 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
02053 Conjugate(b);
02054 }
02055
02056
02057 template <class Prop0, class Allocator0,
02058 class Allocator1, class Allocator2>
02059 void SolveLU(const Matrix<complex<double>, Prop0, RowHermPacked,
02060 Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
02061 Vector<complex<double>, VectFull, Allocator2>& b,
02062 LapackInfo& info = lapack_info)
02063 {
02064
02065 #ifdef SELDON_CHECK_DIMENSIONS
02066 CheckDim(A, b, "SolveLU(A, pivot, X)");
02067 #endif
02068
02069 int m = A.GetM(); int nrhs = 1;
02070 char uplo('L');
02071 Conjugate(b);
02072 zhptrs_(&uplo, &m, &nrhs, A.GetDataVoid(),
02073 P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
02074 Conjugate(b);
02075 }
02076
02077
02078
02079
02080
02081 template <class Prop0, class Allocator0, class Allocator2>
02082 void SolveLU(const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
02083 Vector<float, VectFull, Allocator2>& b,
02084 LapackInfo& info = lapack_info)
02085 {
02086
02087 #ifdef SELDON_CHECK_DIMENSIONS
02088 CheckDim(A, b, "SolveLU(A, X)");
02089 #endif
02090
02091 int m = A.GetM(); int nrhs = 1;
02092 char uplo('U'); char trans('N'); char diag('N');
02093 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02094 b.GetData(), &m, &info.GetInfoRef());
02095 }
02096
02097
02098 template <class Prop0, class Allocator0, class Allocator2>
02099 void SolveLU(const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
02100 Vector<double, VectFull, Allocator2>& b,
02101 LapackInfo& info = lapack_info)
02102 {
02103
02104 #ifdef SELDON_CHECK_DIMENSIONS
02105 CheckDim(A, b, "SolveLU(A, X)");
02106 #endif
02107
02108 int m = A.GetM(); int nrhs = 1;
02109 char uplo('U'); char trans('N'); char diag('N');
02110 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02111 b.GetData(), &m, &info.GetInfoRef());
02112 }
02113
02114
02115 template <class Prop0, class Allocator0, class Allocator2>
02116 void SolveLU(const Matrix<complex<float>, Prop0, ColUpTriang,
02117 Allocator0>& A,
02118 Vector<complex<float>, VectFull, Allocator2>& b,
02119 LapackInfo& info = lapack_info)
02120 {
02121
02122 #ifdef SELDON_CHECK_DIMENSIONS
02123 CheckDim(A, b, "SolveLU(A, X)");
02124 #endif
02125
02126 int m = A.GetM(); int nrhs = 1;
02127 char uplo('U'); char trans('N'); char diag('N');
02128 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02129 b.GetDataVoid(), &m, &info.GetInfoRef());
02130 }
02131
02132
02133 template <class Prop0, class Allocator0, class Allocator2>
02134 void SolveLU(const Matrix<complex<double>, Prop0, ColUpTriang,
02135 Allocator0>& A,
02136 Vector<complex<double>, VectFull, Allocator2>& b,
02137 LapackInfo& info = lapack_info)
02138 {
02139
02140 #ifdef SELDON_CHECK_DIMENSIONS
02141 CheckDim(A, b, "SolveLU(A, X)");
02142 #endif
02143
02144 int m = A.GetM(); int nrhs = 1;
02145 char uplo('U'); char trans('N'); char diag('N');
02146 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02147 b.GetDataVoid(), &m, &info.GetInfoRef());
02148
02149 }
02150
02151
02152
02153
02154
02155 template <class Prop0, class Allocator0, class Allocator2>
02156 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02157 const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
02158 Vector<float, VectFull, Allocator2>& b,
02159 LapackInfo& info = lapack_info)
02160 {
02161
02162 #ifdef SELDON_CHECK_DIMENSIONS
02163 CheckDim(A, b, "SolveLU(A, X)");
02164 #endif
02165
02166 int m = A.GetM(); int nrhs = 1;
02167 char uplo('U');
02168 char trans = TransA.Char(); char diag = DiagA.Char();
02169 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02170 b.GetData(), &m, &info.GetInfoRef());
02171 }
02172
02173
02174 template <class Prop0, class Allocator0, class Allocator2>
02175 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02176 const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
02177 Vector<double, VectFull, Allocator2>& b,
02178 LapackInfo& info = lapack_info)
02179 {
02180
02181 #ifdef SELDON_CHECK_DIMENSIONS
02182 CheckDim(A, b, "SolveLU(A, X)");
02183 #endif
02184
02185 int m = A.GetM(); int nrhs = 1;
02186 char uplo('U');
02187 char trans = TransA.Char(); char diag = DiagA.Char();
02188 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02189 b.GetData(), &m, &info.GetInfoRef());
02190 }
02191
02192
02193 template <class Prop0, class Allocator0, class Allocator2>
02194 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02195 const Matrix<complex<float>, Prop0, ColUpTriang,
02196 Allocator0>& A,
02197 Vector<complex<float>, VectFull, Allocator2>& b,
02198 LapackInfo& info = lapack_info)
02199 {
02200
02201 #ifdef SELDON_CHECK_DIMENSIONS
02202 CheckDim(A, b, "SolveLU(A, X)");
02203 #endif
02204
02205 int m = A.GetM(); int nrhs = 1;
02206 char uplo('U');
02207 char trans = TransA.Char(); char diag = DiagA.Char();
02208 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02209 b.GetDataVoid(), &m, &info.GetInfoRef());
02210 }
02211
02212
02213 template <class Prop0, class Allocator0, class Allocator2>
02214 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02215 const Matrix<complex<double>, Prop0, ColUpTriang,
02216 Allocator0>& A,
02217 Vector<complex<double>, VectFull, Allocator2>& b,
02218 LapackInfo& info = lapack_info)
02219 {
02220
02221 #ifdef SELDON_CHECK_DIMENSIONS
02222 CheckDim(A, b, "SolveLU(A, X)");
02223 #endif
02224
02225 int m = A.GetM(); int nrhs = 1;
02226 char uplo('U');
02227 char trans = TransA.Char(); char diag = DiagA.Char();
02228 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02229 b.GetDataVoid(), &m, &info.GetInfoRef());
02230
02231 }
02232
02233
02234
02235
02236
02237 template <class Prop0, class Allocator0, class Allocator2>
02238 void SolveLU(const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
02239 Vector<float, VectFull, Allocator2>& b,
02240 LapackInfo& info = lapack_info)
02241 {
02242
02243 #ifdef SELDON_CHECK_DIMENSIONS
02244 CheckDim(A, b, "SolveLU(A, X)");
02245 #endif
02246
02247 int m = A.GetM(); int nrhs = 1;
02248 char uplo('L'); char trans('N'); char diag('N');
02249 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02250 b.GetData(), &m, &info.GetInfoRef());
02251 }
02252
02253
02254 template <class Prop0, class Allocator0, class Allocator2>
02255 void SolveLU(const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
02256 Vector<double, VectFull, Allocator2>& b,
02257 LapackInfo& info = lapack_info)
02258 {
02259
02260 #ifdef SELDON_CHECK_DIMENSIONS
02261 CheckDim(A, b, "SolveLU(A, X)");
02262 #endif
02263
02264 int m = A.GetM(); int nrhs = 1;
02265 char uplo('L'); char trans('N'); char diag('N');
02266 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02267 b.GetData(), &m, &info.GetInfoRef());
02268
02269 }
02270
02271
02272 template <class Prop0, class Allocator0, class Allocator2>
02273 void SolveLU(const Matrix<complex<float>, Prop0, ColLoTriang,
02274 Allocator0>& A,
02275 Vector<complex<float>, VectFull, Allocator2>& b,
02276 LapackInfo& info = lapack_info)
02277 {
02278
02279 #ifdef SELDON_CHECK_DIMENSIONS
02280 CheckDim(A, b, "SolveLU(A, X)");
02281 #endif
02282
02283 int m = A.GetM(); int nrhs = 1;
02284 char uplo('L'); char trans('N'); char diag('N');
02285 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02286 b.GetDataVoid(), &m, &info.GetInfoRef());
02287 }
02288
02289
02290 template <class Prop0, class Allocator0, class Allocator2>
02291 void SolveLU(const Matrix<complex<double>, Prop0, ColLoTriang,
02292 Allocator0>& A,
02293 Vector<complex<double>, VectFull, Allocator2>& b,
02294 LapackInfo& info = lapack_info)
02295 {
02296
02297 #ifdef SELDON_CHECK_DIMENSIONS
02298 CheckDim(A, b, "SolveLU(A, X)");
02299 #endif
02300
02301 int m = A.GetM(); int nrhs = 1;
02302 char uplo('L'); char trans('N'); char diag('N');
02303 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02304 b.GetDataVoid(), &m, &info.GetInfoRef());
02305
02306 }
02307
02308
02309
02310
02311
02312 template <class Prop0, class Allocator0, class Allocator2>
02313 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02314 const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
02315 Vector<float, VectFull, Allocator2>& b,
02316 LapackInfo& info = lapack_info)
02317 {
02318
02319 #ifdef SELDON_CHECK_DIMENSIONS
02320 CheckDim(A, b, "SolveLU(A, X)");
02321 #endif
02322
02323 int m = A.GetM(); int nrhs = 1;
02324 char uplo('L');
02325 char trans = TransA.Char(); char diag = DiagA.Char();
02326 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02327 b.GetData(), &m, &info.GetInfoRef());
02328 }
02329
02330
02331 template <class Prop0, class Allocator0, class Allocator2>
02332 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02333 const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
02334 Vector<double, VectFull, Allocator2>& b,
02335 LapackInfo& info = lapack_info)
02336 {
02337
02338 #ifdef SELDON_CHECK_DIMENSIONS
02339 CheckDim(A, b, "SolveLU(A, X)");
02340 #endif
02341
02342 int m = A.GetM(); int nrhs = 1;
02343 char uplo('L');
02344 char trans = TransA.Char(); char diag = DiagA.Char();
02345 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02346 b.GetData(), &m, &info.GetInfoRef());
02347
02348 }
02349
02350
02351 template <class Prop0, class Allocator0, class Allocator2>
02352 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02353 const Matrix<complex<float>, Prop0, ColLoTriang,
02354 Allocator0>& A,
02355 Vector<complex<float>, VectFull, Allocator2>& b,
02356 LapackInfo& info = lapack_info)
02357 {
02358
02359 #ifdef SELDON_CHECK_DIMENSIONS
02360 CheckDim(A, b, "SolveLU(A, X)");
02361 #endif
02362
02363 int m = A.GetM(); int nrhs = 1;
02364 char uplo('L');
02365 char trans = TransA.Char(); char diag = DiagA.Char();
02366 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02367 b.GetDataVoid(), &m, &info.GetInfoRef());
02368 }
02369
02370
02371 template <class Prop0, class Allocator0, class Allocator2>
02372 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02373 const Matrix<complex<double>, Prop0, ColLoTriang,
02374 Allocator0>& A,
02375 Vector<complex<double>, VectFull, Allocator2>& b,
02376 LapackInfo& info = lapack_info)
02377 {
02378
02379 #ifdef SELDON_CHECK_DIMENSIONS
02380 CheckDim(A, b, "SolveLU(A, X)");
02381 #endif
02382
02383 int m = A.GetM(); int nrhs = 1;
02384 char uplo('L');
02385 char trans = TransA.Char(); char diag = DiagA.Char();
02386 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02387 b.GetDataVoid(), &m, &info.GetInfoRef());
02388
02389 }
02390
02391
02392
02393
02394
02395 template <class Prop0, class Allocator0, class Allocator2>
02396 void SolveLU(const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
02397 Vector<float, VectFull, Allocator2>& b,
02398 LapackInfo& info = lapack_info)
02399 {
02400
02401 #ifdef SELDON_CHECK_DIMENSIONS
02402 CheckDim(A, b, "SolveLU(A, X)");
02403 #endif
02404
02405 int m = A.GetM(); int nrhs = 1;
02406 char uplo('U'); char trans('N'); char diag('N');
02407 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02408 b.GetData(), &m, &info.GetInfoRef());
02409 }
02410
02411
02412 template <class Prop0, class Allocator0, class Allocator2>
02413 void SolveLU(const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
02414 Vector<double, VectFull, Allocator2>& b,
02415 LapackInfo& info = lapack_info)
02416 {
02417
02418 #ifdef SELDON_CHECK_DIMENSIONS
02419 CheckDim(A, b, "SolveLU(A, X)");
02420 #endif
02421
02422 int m = A.GetM(); int nrhs = 1;
02423 char uplo('U'); char trans('N'); char diag('N');
02424 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02425 b.GetData(), &m, &info.GetInfoRef());
02426
02427 }
02428
02429
02430 template <class Prop0, class Allocator0, class Allocator2>
02431 void SolveLU(const Matrix<complex<float>, Prop0, ColUpTriangPacked,
02432 Allocator0>& A,
02433 Vector<complex<float>, VectFull, Allocator2>& b,
02434 LapackInfo& info = lapack_info)
02435 {
02436
02437 #ifdef SELDON_CHECK_DIMENSIONS
02438 CheckDim(A, b, "SolveLU(A, X)");
02439 #endif
02440
02441 int m = A.GetM(); int nrhs = 1;
02442 char uplo('U'); char trans('N'); char diag('N');
02443 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02444 b.GetDataVoid(), &m, &info.GetInfoRef());
02445 }
02446
02447
02448 template <class Prop0, class Allocator0, class Allocator2>
02449 void SolveLU(const Matrix<complex<double>, Prop0, ColUpTriangPacked,
02450 Allocator0>& A,
02451 Vector<complex<double>, VectFull, Allocator2>& b,
02452 LapackInfo& info = lapack_info)
02453 {
02454
02455 #ifdef SELDON_CHECK_DIMENSIONS
02456 CheckDim(A, b, "SolveLU(A, X)");
02457 #endif
02458
02459 int m = A.GetM(); int nrhs = 1;
02460 char uplo('U'); char trans('N'); char diag('N');
02461 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02462 b.GetDataVoid(), &m, &info.GetInfoRef());
02463
02464 }
02465
02466
02467
02468
02469
02470 template <class Prop0, class Allocator0, class Allocator2>
02471 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02472 const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
02473 Vector<float, VectFull, Allocator2>& b,
02474 LapackInfo& info = lapack_info)
02475 {
02476
02477 #ifdef SELDON_CHECK_DIMENSIONS
02478 CheckDim(A, b, "SolveLU(A, X)");
02479 #endif
02480
02481 int m = A.GetM(); int nrhs = 1;
02482 char uplo('U');
02483 char trans = TransA.Char(); char diag = DiagA.Char();
02484 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02485 b.GetData(), &m, &info.GetInfoRef());
02486 }
02487
02488
02489 template <class Prop0, class Allocator0, class Allocator2>
02490 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02491 const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
02492 Vector<double, VectFull, Allocator2>& b,
02493 LapackInfo& info = lapack_info)
02494 {
02495
02496 #ifdef SELDON_CHECK_DIMENSIONS
02497 CheckDim(A, b, "SolveLU(A, X)");
02498 #endif
02499
02500 int m = A.GetM(); int nrhs = 1;
02501 char uplo('U');
02502 char trans = TransA.Char(); char diag = DiagA.Char();
02503 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02504 b.GetData(), &m, &info.GetInfoRef());
02505
02506 }
02507
02508
02509 template <class Prop0, class Allocator0, class Allocator2>
02510 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02511 const Matrix<complex<float>, Prop0, ColUpTriangPacked,
02512 Allocator0>& A,
02513 Vector<complex<float>, VectFull, Allocator2>& b,
02514 LapackInfo& info = lapack_info)
02515 {
02516
02517 #ifdef SELDON_CHECK_DIMENSIONS
02518 CheckDim(A, b, "SolveLU(A, X)");
02519 #endif
02520
02521 int m = A.GetM(); int nrhs = 1;
02522 char uplo('U');
02523 char trans = TransA.Char(); char diag = DiagA.Char();
02524 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02525 b.GetDataVoid(), &m, &info.GetInfoRef());
02526 }
02527
02528
02529 template <class Prop0, class Allocator0, class Allocator2>
02530 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02531 const Matrix<complex<double>, Prop0, ColUpTriangPacked,
02532 Allocator0>& A,
02533 Vector<complex<double>, VectFull, Allocator2>& b,
02534 LapackInfo& info = lapack_info)
02535 {
02536
02537 #ifdef SELDON_CHECK_DIMENSIONS
02538 CheckDim(A, b, "SolveLU(A, X)");
02539 #endif
02540
02541 int m = A.GetM(); int nrhs = 1;
02542 char uplo('U');
02543 char trans = TransA.Char(); char diag = DiagA.Char();
02544 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02545 b.GetDataVoid(), &m, &info.GetInfoRef());
02546
02547 }
02548
02549
02550
02551
02552
02553 template <class Prop0, class Allocator0, class Allocator2>
02554 void SolveLU(const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
02555 Vector<float, VectFull, Allocator2>& b,
02556 LapackInfo& info = lapack_info)
02557 {
02558
02559 #ifdef SELDON_CHECK_DIMENSIONS
02560 CheckDim(A, b, "SolveLU(A, X)");
02561 #endif
02562
02563 int m = A.GetM(); int nrhs = 1;
02564 char uplo('L'); char trans('N'); char diag('N');
02565 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02566 b.GetData(), &m, &info.GetInfoRef());
02567 }
02568
02569
02570 template <class Prop0, class Allocator0, class Allocator2>
02571 void SolveLU(const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
02572 Vector<double, VectFull, Allocator2>& b,
02573 LapackInfo& info = lapack_info)
02574 {
02575
02576 #ifdef SELDON_CHECK_DIMENSIONS
02577 CheckDim(A, b, "SolveLU(A, X)");
02578 #endif
02579
02580 int m = A.GetM(); int nrhs = 1;
02581 char uplo('L'); char trans('N'); char diag('N');
02582 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02583 b.GetData(), &m, &info.GetInfoRef());
02584
02585 }
02586
02587
02588 template <class Prop0, class Allocator0, class Allocator2>
02589 void SolveLU(const Matrix<complex<float>, Prop0, ColLoTriangPacked,
02590 Allocator0>& A,
02591 Vector<complex<float>, VectFull, Allocator2>& b,
02592 LapackInfo& info = lapack_info)
02593 {
02594
02595 #ifdef SELDON_CHECK_DIMENSIONS
02596 CheckDim(A, b, "SolveLU(A, X)");
02597 #endif
02598
02599 int m = A.GetM(); int nrhs = 1;
02600 char uplo('L'); char trans('N'); char diag('N');
02601 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02602 b.GetDataVoid(), &m, &info.GetInfoRef());
02603 }
02604
02605
02606 template <class Prop0, class Allocator0, class Allocator2>
02607 void SolveLU(const Matrix<complex<double>, Prop0, ColLoTriangPacked,
02608 Allocator0>& A,
02609 Vector<complex<double>, VectFull, Allocator2>& b,
02610 LapackInfo& info = lapack_info)
02611 {
02612
02613 #ifdef SELDON_CHECK_DIMENSIONS
02614 CheckDim(A, b, "SolveLU(A, X)");
02615 #endif
02616
02617 int m = A.GetM(); int nrhs = 1;
02618 char uplo('L'); char trans('N'); char diag('N');
02619 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02620 b.GetDataVoid(), &m, &info.GetInfoRef());
02621
02622 }
02623
02624
02625
02626
02627
02628 template <class Prop0, class Allocator0, class Allocator2>
02629 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02630 const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
02631 Vector<float, VectFull, Allocator2>& b,
02632 LapackInfo& info = lapack_info)
02633 {
02634
02635 #ifdef SELDON_CHECK_DIMENSIONS
02636 CheckDim(A, b, "SolveLU(A, X)");
02637 #endif
02638
02639 int m = A.GetM(); int nrhs = 1;
02640 char uplo('L');
02641 char trans = TransA.Char(); char diag = DiagA.Char();
02642 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02643 b.GetData(), &m, &info.GetInfoRef());
02644 }
02645
02646
02647 template <class Prop0, class Allocator0, class Allocator2>
02648 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02649 const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
02650 Vector<double, VectFull, Allocator2>& b,
02651 LapackInfo& info = lapack_info)
02652 {
02653
02654 #ifdef SELDON_CHECK_DIMENSIONS
02655 CheckDim(A, b, "SolveLU(A, X)");
02656 #endif
02657
02658 int m = A.GetM(); int nrhs = 1;
02659 char uplo('L');
02660 char trans = TransA.Char(); char diag = DiagA.Char();
02661 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
02662 b.GetData(), &m, &info.GetInfoRef());
02663
02664 }
02665
02666
02667 template <class Prop0, class Allocator0, class Allocator2>
02668 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02669 const Matrix<complex<float>, Prop0, ColLoTriangPacked,
02670 Allocator0>& A,
02671 Vector<complex<float>, VectFull, Allocator2>& b,
02672 LapackInfo& info = lapack_info)
02673 {
02674
02675 #ifdef SELDON_CHECK_DIMENSIONS
02676 CheckDim(A, b, "SolveLU(A, X)");
02677 #endif
02678
02679 int m = A.GetM(); int nrhs = 1;
02680 char uplo('L');
02681 char trans = TransA.Char(); char diag = DiagA.Char();
02682 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02683 b.GetDataVoid(), &m, &info.GetInfoRef());
02684 }
02685
02686
02687 template <class Prop0, class Allocator0, class Allocator2>
02688 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02689 const Matrix<complex<double>, Prop0, ColLoTriangPacked,
02690 Allocator0>& A,
02691 Vector<complex<double>, VectFull, Allocator2>& b,
02692 LapackInfo& info = lapack_info)
02693 {
02694
02695 #ifdef SELDON_CHECK_DIMENSIONS
02696 CheckDim(A, b, "SolveLU(A, X)");
02697 #endif
02698
02699 int m = A.GetM(); int nrhs = 1;
02700 char uplo('L');
02701 char trans = TransA.Char(); char diag = DiagA.Char();
02702 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
02703 b.GetDataVoid(), &m, &info.GetInfoRef());
02704
02705 }
02706
02707
02708
02709
02710
02711 template <class Prop0, class Allocator0, class Allocator2>
02712 void SolveLU(const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
02713 Vector<float, VectFull, Allocator2>& b,
02714 LapackInfo& info = lapack_info)
02715 {
02716
02717 #ifdef SELDON_CHECK_DIMENSIONS
02718 CheckDim(A, b, "SolveLU(A, X)");
02719 #endif
02720
02721 int m = A.GetM(); int nrhs = 1;
02722 char uplo('L'); char trans('T'); char diag('N');
02723 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02724 b.GetData(), &m, &info.GetInfoRef());
02725 }
02726
02727
02728 template <class Prop0, class Allocator0, class Allocator2>
02729 void SolveLU(const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
02730 Vector<double, VectFull, Allocator2>& b,
02731 LapackInfo& info = lapack_info)
02732 {
02733
02734 #ifdef SELDON_CHECK_DIMENSIONS
02735 CheckDim(A, b, "SolveLU(A, X)");
02736 #endif
02737
02738 int m = A.GetM(); int nrhs = 1;
02739 char uplo('L'); char trans('T'); char diag('N');
02740 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02741 b.GetData(), &m, &info.GetInfoRef());
02742
02743 }
02744
02745
02746 template <class Prop0, class Allocator0, class Allocator2>
02747 void
02748 SolveLU(const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
02749 Vector<complex<float>, VectFull, Allocator2>& b,
02750 LapackInfo& info = lapack_info)
02751 {
02752
02753 #ifdef SELDON_CHECK_DIMENSIONS
02754 CheckDim(A, b, "SolveLU(A, X)");
02755 #endif
02756
02757 int m = A.GetM(); int nrhs = 1;
02758 char uplo('L'); char trans('T'); char diag('N');
02759 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02760 b.GetDataVoid(), &m, &info.GetInfoRef());
02761 }
02762
02763
02764 template <class Prop0, class Allocator0, class Allocator2>
02765 void
02766 SolveLU(const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
02767 Vector<complex<double>, VectFull, Allocator2>& b,
02768 LapackInfo& info = lapack_info)
02769 {
02770
02771 #ifdef SELDON_CHECK_DIMENSIONS
02772 CheckDim(A, b, "SolveLU(A, X)");
02773 #endif
02774
02775 int m = A.GetM(); int nrhs = 1;
02776 char uplo('L'); char trans('T'); char diag('N');
02777 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02778 b.GetDataVoid(), &m, &info.GetInfoRef());
02779
02780 }
02781
02782
02783
02784
02785
02786 template <class Prop0, class Allocator0, class Allocator2>
02787 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02788 const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
02789 Vector<float, VectFull, Allocator2>& b,
02790 LapackInfo& info = lapack_info)
02791 {
02792
02793 #ifdef SELDON_CHECK_DIMENSIONS
02794 CheckDim(A, b, "SolveLU(A, X)");
02795 #endif
02796
02797 int m = A.GetM(); int nrhs = 1;
02798 char uplo('L');
02799 char trans = TransA.RevChar(); char diag = DiagA.Char();
02800 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02801 b.GetData(), &m, &info.GetInfoRef());
02802 }
02803
02804
02805 template <class Prop0, class Allocator0, class Allocator2>
02806 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02807 const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
02808 Vector<double, VectFull, Allocator2>& b,
02809 LapackInfo& info = lapack_info)
02810 {
02811
02812 #ifdef SELDON_CHECK_DIMENSIONS
02813 CheckDim(A, b, "SolveLU(A, X)");
02814 #endif
02815
02816 int m = A.GetM(); int nrhs = 1;
02817 char uplo('L');
02818 char trans = TransA.RevChar(); char diag = DiagA.Char();
02819 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02820 b.GetData(), &m, &info.GetInfoRef());
02821
02822 }
02823
02824
02825 template <class Prop0, class Allocator0, class Allocator2>
02826 void
02827 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02828 const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
02829 Vector<complex<float>, VectFull, Allocator2>& b,
02830 LapackInfo& info = lapack_info)
02831 {
02832
02833 #ifdef SELDON_CHECK_DIMENSIONS
02834 CheckDim(A, b, "SolveLU(A, X)");
02835 #endif
02836
02837 int m = A.GetM(); int nrhs = 1;
02838 char uplo('L');
02839 char trans = TransA.RevChar(); char diag = DiagA.Char();
02840 if (TransA.ConjTrans())
02841 Conjugate(b);
02842 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02843 b.GetDataVoid(), &m, &info.GetInfoRef());
02844 if (TransA.ConjTrans())
02845 Conjugate(b);
02846 }
02847
02848
02849 template <class Prop0, class Allocator0, class Allocator2>
02850 void
02851 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02852 const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
02853 Vector<complex<double>, VectFull, Allocator2>& b,
02854 LapackInfo& info = lapack_info)
02855 {
02856
02857 #ifdef SELDON_CHECK_DIMENSIONS
02858 CheckDim(A, b, "SolveLU(A, X)");
02859 #endif
02860
02861 int m = A.GetM(); int nrhs = 1;
02862 char uplo('L');
02863 char trans = TransA.RevChar(); char diag = DiagA.Char();
02864 if (TransA.ConjTrans())
02865 Conjugate(b);
02866 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02867 b.GetDataVoid(), &m, &info.GetInfoRef());
02868 if (TransA.ConjTrans())
02869 Conjugate(b);
02870
02871 }
02872
02873
02874
02875
02876
02877 template <class Prop0, class Allocator0, class Allocator2>
02878 void SolveLU(const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
02879 Vector<float, VectFull, Allocator2>& b,
02880 LapackInfo& info = lapack_info)
02881 {
02882
02883 #ifdef SELDON_CHECK_DIMENSIONS
02884 CheckDim(A, b, "SolveLU(A, X)");
02885 #endif
02886
02887 int m = A.GetM(); int nrhs = 1;
02888 char uplo('U'); char trans('T'); char diag('N');
02889 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02890 b.GetData(), &m, &info.GetInfoRef());
02891 }
02892
02893
02894 template <class Prop0, class Allocator0, class Allocator2>
02895 void SolveLU(const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
02896 Vector<double, VectFull, Allocator2>& b,
02897 LapackInfo& info = lapack_info)
02898 {
02899
02900 #ifdef SELDON_CHECK_DIMENSIONS
02901 CheckDim(A, b, "SolveLU(A, X)");
02902 #endif
02903
02904 int m = A.GetM(); int nrhs = 1;
02905 char uplo('U'); char trans('T'); char diag('N');
02906 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02907 b.GetData(), &m, &info.GetInfoRef());
02908
02909 }
02910
02911
02912 template <class Prop0, class Allocator0, class Allocator2>
02913 void
02914 SolveLU(const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
02915 Vector<complex<float>, VectFull, Allocator2>& b,
02916 LapackInfo& info = lapack_info)
02917 {
02918
02919 #ifdef SELDON_CHECK_DIMENSIONS
02920 CheckDim(A, b, "SolveLU(A, X)");
02921 #endif
02922
02923 int m = A.GetM(); int nrhs = 1;
02924 char uplo('U'); char trans('T'); char diag('N');
02925 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02926 b.GetDataVoid(), &m, &info.GetInfoRef());
02927 }
02928
02929
02930 template <class Prop0, class Allocator0, class Allocator2>
02931 void
02932 SolveLU(const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
02933 Vector<complex<double>, VectFull, Allocator2>& b,
02934 LapackInfo& info = lapack_info)
02935 {
02936
02937 #ifdef SELDON_CHECK_DIMENSIONS
02938 CheckDim(A, b, "SolveLU(A, X)");
02939 #endif
02940
02941 int m = A.GetM(); int nrhs = 1;
02942 char uplo('U'); char trans('T'); char diag('N');
02943 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
02944 b.GetDataVoid(), &m, &info.GetInfoRef());
02945
02946 }
02947
02948
02949
02950
02951
02952 template <class Prop0, class Allocator0, class Allocator2>
02953 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02954 const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
02955 Vector<float, VectFull, Allocator2>& b,
02956 LapackInfo& info = lapack_info)
02957 {
02958
02959 #ifdef SELDON_CHECK_DIMENSIONS
02960 CheckDim(A, b, "SolveLU(A, X)");
02961 #endif
02962
02963 int m = A.GetM(); int nrhs = 1;
02964 char uplo('U');
02965 char trans = TransA.RevChar(); char diag = DiagA.Char();
02966 strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02967 b.GetData(), &m, &info.GetInfoRef());
02968 }
02969
02970
02971 template <class Prop0, class Allocator0, class Allocator2>
02972 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02973 const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
02974 Vector<double, VectFull, Allocator2>& b,
02975 LapackInfo& info = lapack_info)
02976 {
02977
02978 #ifdef SELDON_CHECK_DIMENSIONS
02979 CheckDim(A, b, "SolveLU(A, X)");
02980 #endif
02981
02982 int m = A.GetM(); int nrhs = 1;
02983 char uplo('U');
02984 char trans = TransA.RevChar(); char diag = DiagA.Char();
02985 dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
02986 b.GetData(), &m, &info.GetInfoRef());
02987
02988 }
02989
02990
02991 template <class Prop0, class Allocator0, class Allocator2>
02992 void
02993 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
02994 const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
02995 Vector<complex<float>, VectFull, Allocator2>& b,
02996 LapackInfo& info = lapack_info)
02997 {
02998
02999 #ifdef SELDON_CHECK_DIMENSIONS
03000 CheckDim(A, b, "SolveLU(A, X)");
03001 #endif
03002
03003 int m = A.GetM(); int nrhs = 1;
03004 char uplo('U');
03005 char trans = TransA.RevChar(); char diag = DiagA.Char();
03006 if (TransA.ConjTrans())
03007 Conjugate(b);
03008 ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
03009 b.GetDataVoid(), &m, &info.GetInfoRef());
03010 if (TransA.ConjTrans())
03011 Conjugate(b);
03012 }
03013
03014
03015 template <class Prop0, class Allocator0, class Allocator2>
03016 void
03017 SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03018 const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
03019 Vector<complex<double>, VectFull, Allocator2>& b,
03020 LapackInfo& info = lapack_info)
03021 {
03022
03023 #ifdef SELDON_CHECK_DIMENSIONS
03024 CheckDim(A, b, "SolveLU(A, X)");
03025 #endif
03026
03027 int m = A.GetM(); int nrhs = 1;
03028 char uplo('U');
03029 char trans = TransA.RevChar(); char diag = DiagA.Char();
03030 if (TransA.ConjTrans())
03031 Conjugate(b);
03032 ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
03033 b.GetDataVoid(), &m, &info.GetInfoRef());
03034 if (TransA.ConjTrans())
03035 Conjugate(b);
03036 }
03037
03038
03039
03040
03041
03042 template <class Prop0, class Allocator0, class Allocator2>
03043 void SolveLU(const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
03044 Vector<float, VectFull, Allocator2>& b,
03045 LapackInfo& info = lapack_info)
03046 {
03047
03048 #ifdef SELDON_CHECK_DIMENSIONS
03049 CheckDim(A, b, "SolveLU(A, X)");
03050 #endif
03051
03052 int m = A.GetM(); int nrhs = 1;
03053 char uplo('L'); char trans('T'); char diag('N');
03054 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03055 b.GetData(), &m, &info.GetInfoRef());
03056 }
03057
03058
03059 template <class Prop0, class Allocator0, class Allocator2>
03060 void SolveLU(const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
03061 Vector<double, VectFull, Allocator2>& b,
03062 LapackInfo& info = lapack_info)
03063 {
03064
03065 #ifdef SELDON_CHECK_DIMENSIONS
03066 CheckDim(A, b, "SolveLU(A, X)");
03067 #endif
03068
03069 int m = A.GetM(); int nrhs = 1;
03070 char uplo('L'); char trans('T'); char diag('N');
03071 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03072 b.GetData(), &m, &info.GetInfoRef());
03073
03074 }
03075
03076
03077 template <class Prop0, class Allocator0, class Allocator2>
03078 void SolveLU(const Matrix<complex<float>, Prop0, RowUpTriangPacked,
03079 Allocator0>& A,
03080 Vector<complex<float>, VectFull, Allocator2>& b,
03081 LapackInfo& info = lapack_info)
03082 {
03083
03084 #ifdef SELDON_CHECK_DIMENSIONS
03085 CheckDim(A, b, "SolveLU(A, X)");
03086 #endif
03087
03088 int m = A.GetM(); int nrhs = 1;
03089 char uplo('L'); char trans('T'); char diag('N');
03090 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03091 b.GetDataVoid(), &m, &info.GetInfoRef());
03092 }
03093
03094
03095 template <class Prop0, class Allocator0, class Allocator2>
03096 void SolveLU(const Matrix<complex<double>, Prop0, RowUpTriangPacked,
03097 Allocator0>& A,
03098 Vector<complex<double>, VectFull, Allocator2>& b,
03099 LapackInfo& info = lapack_info)
03100 {
03101
03102 #ifdef SELDON_CHECK_DIMENSIONS
03103 CheckDim(A, b, "SolveLU(A, X)");
03104 #endif
03105
03106 int m = A.GetM(); int nrhs = 1;
03107 char uplo('L'); char trans('T'); char diag('N');
03108 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03109 b.GetDataVoid(), &m, &info.GetInfoRef());
03110
03111 }
03112
03113
03114
03115
03116
03117 template <class Prop0, class Allocator0, class Allocator2>
03118 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03119 const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
03120 Vector<float, VectFull, Allocator2>& b,
03121 LapackInfo& info = lapack_info)
03122 {
03123
03124 #ifdef SELDON_CHECK_DIMENSIONS
03125 CheckDim(A, b, "SolveLU(A, X)");
03126 #endif
03127
03128 int m = A.GetM(); int nrhs = 1;
03129 char uplo('L');
03130 char trans = TransA.RevChar(); char diag = DiagA.Char();
03131 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03132 b.GetData(), &m, &info.GetInfoRef());
03133 }
03134
03135
03136 template <class Prop0, class Allocator0, class Allocator2>
03137 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03138 const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
03139 Vector<double, VectFull, Allocator2>& b,
03140 LapackInfo& info = lapack_info)
03141 {
03142
03143 #ifdef SELDON_CHECK_DIMENSIONS
03144 CheckDim(A, b, "SolveLU(A, X)");
03145 #endif
03146
03147 int m = A.GetM(); int nrhs = 1;
03148 char uplo('L');
03149 char trans = TransA.RevChar(); char diag = DiagA.Char();
03150 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03151 b.GetData(), &m, &info.GetInfoRef());
03152
03153 }
03154
03155
03156 template <class Prop0, class Allocator0, class Allocator2>
03157 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03158 const Matrix<complex<float>, Prop0, RowUpTriangPacked,
03159 Allocator0>& A,
03160 Vector<complex<float>, VectFull, Allocator2>& b,
03161 LapackInfo& info = lapack_info)
03162 {
03163
03164 #ifdef SELDON_CHECK_DIMENSIONS
03165 CheckDim(A, b, "SolveLU(A, X)");
03166 #endif
03167
03168 int m = A.GetM(); int nrhs = 1;
03169 char uplo('L');
03170 char trans = TransA.RevChar(); char diag = DiagA.Char();
03171 if (TransA.ConjTrans())
03172 Conjugate(b);
03173 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03174 b.GetDataVoid(), &m, &info.GetInfoRef());
03175 if (TransA.ConjTrans())
03176 Conjugate(b);
03177 }
03178
03179
03180 template <class Prop0, class Allocator0, class Allocator2>
03181 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03182 const Matrix<complex<double>, Prop0, RowUpTriangPacked,
03183 Allocator0>& A,
03184 Vector<complex<double>, VectFull, Allocator2>& b,
03185 LapackInfo& info = lapack_info)
03186 {
03187
03188 #ifdef SELDON_CHECK_DIMENSIONS
03189 CheckDim(A, b, "SolveLU(A, X)");
03190 #endif
03191
03192 int m = A.GetM(); int nrhs = 1;
03193 char uplo('L');
03194 char trans = TransA.RevChar(); char diag = DiagA.Char();
03195 if (TransA.ConjTrans())
03196 Conjugate(b);
03197 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03198 b.GetDataVoid(), &m, &info.GetInfoRef());
03199 if (TransA.ConjTrans())
03200 Conjugate(b);
03201 }
03202
03203
03204
03205
03206
03207 template <class Prop0, class Allocator0, class Allocator2>
03208 void SolveLU(const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
03209 Vector<float, VectFull, Allocator2>& b,
03210 LapackInfo& info = lapack_info)
03211 {
03212
03213 #ifdef SELDON_CHECK_DIMENSIONS
03214 CheckDim(A, b, "SolveLU(A, X)");
03215 #endif
03216
03217 int m = A.GetM(); int nrhs = 1;
03218 char uplo('U'); char trans('T'); char diag('N');
03219 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03220 b.GetData(), &m, &info.GetInfoRef());
03221 }
03222
03223
03224 template <class Prop0, class Allocator0, class Allocator2>
03225 void SolveLU(const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
03226 Vector<double, VectFull, Allocator2>& b,
03227 LapackInfo& info = lapack_info)
03228 {
03229
03230 #ifdef SELDON_CHECK_DIMENSIONS
03231 CheckDim(A, b, "SolveLU(A, X)");
03232 #endif
03233
03234 int m = A.GetM(); int nrhs = 1;
03235 char uplo('U'); char trans('T'); char diag('N');
03236 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03237 b.GetData(), &m, &info.GetInfoRef());
03238
03239 }
03240
03241
03242 template <class Prop0, class Allocator0, class Allocator2>
03243 void SolveLU(const Matrix<complex<float>, Prop0, RowLoTriangPacked,
03244 Allocator0>& A,
03245 Vector<complex<float>, VectFull, Allocator2>& b,
03246 LapackInfo& info = lapack_info)
03247 {
03248
03249 #ifdef SELDON_CHECK_DIMENSIONS
03250 CheckDim(A, b, "SolveLU(A, X)");
03251 #endif
03252
03253 int m = A.GetM(); int nrhs = 1;
03254 char uplo('U'); char trans('T'); char diag('N');
03255
03256
03257 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03258 b.GetDataVoid(), &m, &info.GetInfoRef());
03259 }
03260
03261
03262 template <class Prop0, class Allocator0, class Allocator2>
03263 void SolveLU(const Matrix<complex<double>, Prop0, RowLoTriangPacked,
03264 Allocator0>& A,
03265 Vector<complex<double>, VectFull, Allocator2>& b,
03266 LapackInfo& info = lapack_info)
03267 {
03268
03269 #ifdef SELDON_CHECK_DIMENSIONS
03270 CheckDim(A, b, "SolveLU(A, X)");
03271 #endif
03272
03273 int m = A.GetM(); int nrhs = 1;
03274 char uplo('U'); char trans('T'); char diag('N');
03275 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03276 b.GetDataVoid(), &m, &info.GetInfoRef());
03277
03278 }
03279
03280
03281
03282
03283
03284 template <class Prop0, class Allocator0, class Allocator2>
03285 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03286 const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
03287 Vector<float, VectFull, Allocator2>& b,
03288 LapackInfo& info = lapack_info)
03289 {
03290
03291 #ifdef SELDON_CHECK_DIMENSIONS
03292 CheckDim(A, b, "SolveLU(A, X)");
03293 #endif
03294
03295 int m = A.GetM(); int nrhs = 1;
03296 char uplo('U');
03297 char trans = TransA.RevChar(); char diag = DiagA.Char();
03298 stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03299 b.GetData(), &m, &info.GetInfoRef());
03300 }
03301
03302
03303 template <class Prop0, class Allocator0, class Allocator2>
03304 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03305 const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
03306 Vector<double, VectFull, Allocator2>& b,
03307 LapackInfo& info = lapack_info)
03308 {
03309
03310 #ifdef SELDON_CHECK_DIMENSIONS
03311 CheckDim(A, b, "SolveLU(A, X)");
03312 #endif
03313
03314 int m = A.GetM(); int nrhs = 1;
03315 char uplo('U');
03316 char trans = TransA.RevChar(); char diag = DiagA.Char();
03317 dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
03318 b.GetData(), &m, &info.GetInfoRef());
03319
03320 }
03321
03322
03323 template <class Prop0, class Allocator0, class Allocator2>
03324 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03325 const Matrix<complex<float>, Prop0, RowLoTriangPacked,
03326 Allocator0>& A,
03327 Vector<complex<float>, VectFull, Allocator2>& b,
03328 LapackInfo& info = lapack_info)
03329 {
03330
03331 #ifdef SELDON_CHECK_DIMENSIONS
03332 CheckDim(A, b, "SolveLU(A, X)");
03333 #endif
03334
03335 int m = A.GetM(); int nrhs = 1;
03336 char uplo('U');
03337 char trans = TransA.RevChar(); char diag = DiagA.Char();
03338 if (TransA.ConjTrans())
03339 Conjugate(b);
03340 ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03341 b.GetDataVoid(), &m, &info.GetInfoRef());
03342 if (TransA.ConjTrans())
03343 Conjugate(b);
03344 }
03345
03346
03347 template <class Prop0, class Allocator0, class Allocator2>
03348 void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
03349 const Matrix<complex<double>, Prop0, RowLoTriangPacked,
03350 Allocator0>& A,
03351 Vector<complex<double>, VectFull, Allocator2>& b,
03352 LapackInfo& info = lapack_info)
03353 {
03354
03355 #ifdef SELDON_CHECK_DIMENSIONS
03356 CheckDim(A, b, "SolveLU(A, X)");
03357 #endif
03358
03359 int m = A.GetM(); int nrhs = 1;
03360 char uplo('U');
03361 char trans = TransA.RevChar(); char diag = DiagA.Char();
03362 if (TransA.ConjTrans())
03363 Conjugate(b);
03364 ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
03365 b.GetDataVoid(), &m, &info.GetInfoRef());
03366 if (TransA.ConjTrans())
03367 Conjugate(b);
03368 }
03369
03370
03371
03373
03374
03375
03377
03378
03379
03380
03381
03382
03383 template<class Prop0, class Allocator0, class Allocator1>
03384 float ReciprocalConditionNumber(const Matrix<float, Prop0, ColMajor,
03385 Allocator0>& A,
03386 Vector<int, VectFull, Allocator1>& P,
03387 SeldonNorm norm, float anorm,
03388 LapackInfo& info = lapack_info)
03389 {
03390 char norm_type = norm.Char();
03391
03392 int n = A.GetM(); float rcond(0);
03393 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(4*n);
03394 sgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
03395 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03396 return rcond;
03397 }
03398
03399
03400 template<class Prop0, class Allocator0, class Allocator1>
03401 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColMajor,
03402 Allocator0>& A,
03403 Vector<int, VectFull, Allocator1>& P,
03404 SeldonNorm norm, double anorm,
03405 LapackInfo& info = lapack_info)
03406 {
03407 char norm_type = norm.Char();
03408
03409 int n = A.GetM(); double rcond(0);
03410 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(4*n);
03411 dgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
03412 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03413 return rcond;
03414 }
03415
03416
03417 template<class Prop0, class Allocator0, class Allocator1>
03418 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03419 ColMajor, Allocator0>& A,
03420 Vector<int, VectFull, Allocator1>& P,
03421 SeldonNorm norm, float anorm,
03422 LapackInfo& info = lapack_info)
03423 {
03424 char norm_type = norm.Char();
03425
03426 int n = A.GetM(); float rcond(0);
03427 Vector<float> rwork(2*n);
03428 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03429 cgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
03430 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
03431 return rcond;
03432 }
03433
03434
03435 template<class Prop0, class Allocator0, class Allocator1>
03436 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03437 ColMajor, Allocator0>& A,
03438 Vector<int, VectFull, Allocator1>& P,
03439 SeldonNorm norm, double anorm,
03440 LapackInfo& info = lapack_info)
03441 {
03442 char norm_type = norm.Char();
03443
03444 int n = A.GetM(); double rcond(0);
03445 Vector<double> rwork(2*n);
03446 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03447 zgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
03448 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
03449 return rcond;
03450 }
03451
03452
03453
03454
03455
03456 template<class Prop0, class Allocator0, class Allocator1>
03457 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowMajor,
03458 Allocator0>& A,
03459 Vector<int, VectFull, Allocator1>& P,
03460 SeldonNorm norm, float anorm,
03461 LapackInfo& info = lapack_info)
03462 {
03463 char norm_type = norm.RevChar();
03464
03465 int n = A.GetM(); float rcond(0);
03466 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(4*n);
03467 sgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
03468 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03469 return rcond;
03470 }
03471
03472
03473 template<class Prop0, class Allocator0, class Allocator1>
03474 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowMajor,
03475 Allocator0>& A,
03476 Vector<int, VectFull, Allocator1>& P,
03477 SeldonNorm norm, double anorm,
03478 LapackInfo& info = lapack_info)
03479 {
03480 char norm_type = norm.RevChar();
03481
03482 int n = A.GetM(); double rcond(0);
03483 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(4*n);
03484 dgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
03485 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03486 return rcond;
03487 }
03488
03489
03490 template<class Prop0, class Allocator0, class Allocator1>
03491 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03492 RowMajor, Allocator0>& A,
03493 Vector<int, VectFull, Allocator1>& P,
03494 SeldonNorm norm, float anorm,
03495 LapackInfo& info = lapack_info)
03496 {
03497 char norm_type = norm.RevChar();
03498
03499 int n = A.GetM(); float rcond(0);
03500 Vector<float> rwork(2*n);
03501 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03502 cgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
03503 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
03504 return rcond;
03505 }
03506
03507
03508 template<class Prop0, class Allocator0, class Allocator1>
03509 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03510 RowMajor, Allocator0>& A,
03511 Vector<int, VectFull, Allocator1>& P,
03512 SeldonNorm norm, double anorm,
03513 LapackInfo& info = lapack_info)
03514 {
03515 char norm_type = norm.RevChar();
03516
03517 int n = A.GetM(); double rcond(0);
03518 Vector<double> rwork(2*n);
03519 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03520 zgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
03521 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
03522 return rcond;
03523 }
03524
03525
03526
03527
03528
03529 template<class Prop0, class Allocator0, class Allocator1>
03530 float ReciprocalConditionNumber(const Matrix<float, Prop0, ColSym,
03531 Allocator0>& A,
03532 Vector<int, VectFull, Allocator1>& P,
03533 SeldonNorm norm, float anorm,
03534 LapackInfo& info = lapack_info)
03535 {
03536 char uplo('U');
03537
03538 int n = A.GetM(); float rcond(0);
03539 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
03540 ssycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03541 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03542 return rcond;
03543 }
03544
03545
03546 template<class Prop0, class Allocator0, class Allocator1>
03547 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColSym,
03548 Allocator0>& A,
03549 Vector<int, VectFull, Allocator1>& P,
03550 SeldonNorm norm, double anorm,
03551 LapackInfo& info = lapack_info)
03552 {
03553 char uplo('U');
03554
03555 int n = A.GetM(); double rcond(0);
03556 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
03557 dsycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03558 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03559 return rcond;
03560 }
03561
03562
03563 template<class Prop0, class Allocator0, class Allocator1>
03564 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03565 ColSym, Allocator0>& A,
03566 Vector<int, VectFull, Allocator1>& P,
03567 SeldonNorm norm, float anorm,
03568 LapackInfo& info = lapack_info)
03569 {
03570 char uplo('U');
03571
03572 int n = A.GetM(); float rcond(0);
03573 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03574 csycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
03575 work.GetDataVoid(), &info.GetInfoRef());
03576 return rcond;
03577 }
03578
03579
03580 template<class Prop0, class Allocator0, class Allocator1>
03581 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03582 ColSym, Allocator0>& A,
03583 Vector<int, VectFull, Allocator1>& P,
03584 SeldonNorm norm, double anorm,
03585 LapackInfo& info = lapack_info)
03586 {
03587 char uplo('U');
03588
03589 int n = A.GetM(); double rcond(0);
03590 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03591 zsycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
03592 work.GetDataVoid(), &info.GetInfoRef());
03593 return rcond;
03594 }
03595
03596
03597
03598
03599
03600 template<class Prop0, class Allocator0, class Allocator1>
03601 float ReciprocalConditionNumber(const Matrix<float, Prop0,
03602 ColSymPacked, Allocator0>& A,
03603 Vector<int, VectFull, Allocator1>& P,
03604 SeldonNorm norm, float anorm,
03605 LapackInfo& info = lapack_info)
03606 {
03607 char uplo('U');
03608
03609 int n = A.GetM(); float rcond(0);
03610 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
03611 sspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03612 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03613 return rcond;
03614 }
03615
03616
03617 template<class Prop0, class Allocator0, class Allocator1>
03618 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColSymPacked,
03619 Allocator0>& A,
03620 Vector<int, VectFull, Allocator1>& P,
03621 SeldonNorm norm, double anorm,
03622 LapackInfo& info = lapack_info)
03623 {
03624 char uplo('U');
03625
03626 int n = A.GetM(); double rcond(0);
03627 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
03628 dspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03629 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03630 return rcond;
03631 }
03632
03633
03634 template<class Prop0, class Allocator0, class Allocator1>
03635 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03636 ColSymPacked, Allocator0>& A,
03637 Vector<int, VectFull, Allocator1>& P,
03638 SeldonNorm norm, float anorm,
03639 LapackInfo& info = lapack_info)
03640 {
03641 char uplo('U');
03642
03643 int n = A.GetM(); float rcond(0);
03644 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03645 cspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03646 work.GetData(), &info.GetInfoRef());
03647 return rcond;
03648 }
03649
03650
03651 template<class Prop0, class Allocator0, class Allocator1>
03652 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03653 ColSymPacked, Allocator0>& A,
03654 Vector<int, VectFull, Allocator1>& P,
03655 SeldonNorm norm, double anorm,
03656 LapackInfo& info = lapack_info)
03657 {
03658 char uplo('U');
03659
03660 int n = A.GetM(); double rcond(0);
03661 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03662 zspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03663 work.GetData(), &info.GetInfoRef());
03664 return rcond;
03665 }
03666
03667
03668
03669
03670
03671 template<class Prop0, class Allocator0, class Allocator1>
03672 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowSym,
03673 Allocator0>& A,
03674 Vector<int, VectFull, Allocator1>& P,
03675 SeldonNorm norm, float anorm,
03676 LapackInfo& info = lapack_info)
03677 {
03678 char uplo('L');
03679
03680 int n = A.GetM(); float rcond(0);
03681 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
03682 ssycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03683 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03684 return rcond;
03685 }
03686
03687
03688 template<class Prop0, class Allocator0, class Allocator1>
03689 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowSym,
03690 Allocator0>& A,
03691 Vector<int, VectFull, Allocator1>& P,
03692 SeldonNorm norm, double anorm,
03693 LapackInfo& info = lapack_info)
03694 {
03695 char uplo('L');
03696
03697 int n = A.GetM(); double rcond(0);
03698 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
03699 dsycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03700 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03701 return rcond;
03702 }
03703
03704
03705 template<class Prop0, class Allocator0, class Allocator1>
03706 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, RowSym,
03707 Allocator0>& A,
03708 Vector<int, VectFull, Allocator1>& P,
03709 SeldonNorm norm, float anorm,
03710 LapackInfo& info = lapack_info)
03711 {
03712 char uplo('L');
03713
03714 int n = A.GetM(); float rcond(0);
03715 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03716 csycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
03717 work.GetDataVoid(), &info.GetInfoRef());
03718 return rcond;
03719 }
03720
03721
03722 template<class Prop0, class Allocator0, class Allocator1>
03723 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03724 RowSym, Allocator0>& A,
03725 Vector<int, VectFull, Allocator1>& P,
03726 SeldonNorm norm, double anorm,
03727 LapackInfo& info = lapack_info)
03728 {
03729 char uplo('L');
03730
03731 int n = A.GetM(); double rcond(0);
03732 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03733 zsycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
03734 work.GetDataVoid(), &info.GetInfoRef());
03735 return rcond;
03736 }
03737
03738
03739
03740
03741
03742 template<class Prop0, class Allocator0, class Allocator1>
03743 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowSymPacked,
03744 Allocator0>& A,
03745 Vector<int, VectFull, Allocator1>& P,
03746 SeldonNorm norm, float anorm,
03747 LapackInfo& info = lapack_info)
03748 {
03749 char uplo('L');
03750
03751 int n = A.GetM(); float rcond(0);
03752 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
03753 sspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03754 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03755 return rcond;
03756 }
03757
03758
03759 template<class Prop0, class Allocator0, class Allocator1>
03760 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowSymPacked,
03761 Allocator0>& A,
03762 Vector<int, VectFull, Allocator1>& P,
03763 SeldonNorm norm, double anorm,
03764 LapackInfo& info = lapack_info)
03765 {
03766 char uplo('L');
03767
03768 int n = A.GetM(); double rcond(0);
03769 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
03770 dspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03771 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03772 return rcond;
03773 }
03774
03775
03776 template<class Prop0, class Allocator0, class Allocator1>
03777 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03778 RowSymPacked, Allocator0>& A,
03779 Vector<int, VectFull, Allocator1>& P,
03780 SeldonNorm norm, float anorm,
03781 LapackInfo& info = lapack_info)
03782 {
03783 char uplo('L');
03784
03785 int n = A.GetM(); float rcond(0);
03786 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03787 cspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03788 work.GetData(), &info.GetInfoRef());
03789 return rcond;
03790 }
03791
03792
03793 template<class Prop0, class Allocator0, class Allocator1>
03794 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03795 RowSymPacked, Allocator0>& A,
03796 Vector<int, VectFull, Allocator1>& P,
03797 SeldonNorm norm, double anorm,
03798 LapackInfo& info = lapack_info)
03799 {
03800 char uplo('L');
03801
03802 int n = A.GetM(); double rcond(0);
03803 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03804 zspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03805 work.GetData(), &info.GetInfoRef());
03806 return rcond;
03807 }
03808
03809
03810
03811
03812
03813 template<class Prop0, class Allocator0, class Allocator1>
03814 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03815 ColHerm, Allocator0>& A,
03816 Vector<int, VectFull, Allocator1>& P,
03817 SeldonNorm norm, float anorm,
03818 LapackInfo& info = lapack_info)
03819 {
03820 char uplo('U');
03821
03822 int n = A.GetM(); float rcond(0);
03823 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03824 checon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03825 work.GetData(), &info.GetInfoRef());
03826 return rcond;
03827 }
03828
03829
03830 template<class Prop0, class Allocator0, class Allocator1>
03831 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03832 ColHerm, Allocator0>& A,
03833 Vector<int, VectFull, Allocator1>& P,
03834 SeldonNorm norm, double anorm,
03835 LapackInfo& info = lapack_info)
03836 {
03837 char uplo('U');
03838
03839 int n = A.GetM(); double rcond(0);
03840 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03841 zhecon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03842 work.GetData(), &info.GetInfoRef());
03843 return rcond;
03844 }
03845
03846
03847
03848
03849
03850 template<class Prop0, class Allocator0, class Allocator1>
03851 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03852 ColHermPacked, Allocator0>& A,
03853 Vector<int, VectFull, Allocator1>& P,
03854 SeldonNorm norm, float anorm,
03855 LapackInfo& info = lapack_info)
03856 {
03857 char uplo('U');
03858
03859 int n = A.GetM(); float rcond(0);
03860 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03861 chpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03862 work.GetData(), &info.GetInfoRef());
03863 return rcond;
03864 }
03865
03866
03867 template<class Prop0, class Allocator0, class Allocator1>
03868 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03869 ColHermPacked, Allocator0>& A,
03870 Vector<int, VectFull, Allocator1>& P,
03871 SeldonNorm norm, double anorm,
03872 LapackInfo& info = lapack_info)
03873 {
03874 char uplo('U');
03875
03876 int n = A.GetM(); double rcond(0);
03877 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03878 zhpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03879 work.GetData(), &info.GetInfoRef());
03880 return rcond;
03881 }
03882
03883
03884
03885
03886
03887 template<class Prop0, class Allocator0, class Allocator1>
03888 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03889 RowHerm, Allocator0>& A,
03890 Vector<int, VectFull, Allocator1>& P,
03891 SeldonNorm norm, float anorm,
03892 LapackInfo& info = lapack_info)
03893 {
03894 char uplo('L');
03895
03896 int n = A.GetM(); float rcond(0);
03897 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03898 checon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03899 work.GetData(), &info.GetInfoRef());
03900 return rcond;
03901 }
03902
03903
03904 template<class Prop0, class Allocator0, class Allocator1>
03905 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03906 RowHerm, Allocator0>& A,
03907 Vector<int, VectFull, Allocator1>& P,
03908 SeldonNorm norm, double anorm,
03909 LapackInfo& info = lapack_info)
03910 {
03911 char uplo('L');
03912
03913 int n = A.GetM(); double rcond(0);
03914 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03915 zhecon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
03916 work.GetData(), &info.GetInfoRef());
03917 return rcond;
03918 }
03919
03920
03921
03922
03923
03924 template<class Prop0, class Allocator0, class Allocator1>
03925 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03926 RowHermPacked, Allocator0>& A,
03927 Vector<int, VectFull, Allocator1>& P,
03928 SeldonNorm norm, float anorm,
03929 LapackInfo& info = lapack_info)
03930 {
03931 char uplo('L');
03932
03933 int n = A.GetM(); float rcond(0);
03934 Vector<complex<float>, VectFull, Allocator0> work(2*n);
03935 chpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03936 work.GetData(), &info.GetInfoRef());
03937 return rcond;
03938 }
03939
03940
03941 template<class Prop0, class Allocator0, class Allocator1>
03942 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
03943 RowHermPacked, Allocator0>& A,
03944 Vector<int, VectFull, Allocator1>& P,
03945 SeldonNorm norm, double anorm,
03946 LapackInfo& info = lapack_info)
03947 {
03948 char uplo('L');
03949
03950 int n = A.GetM(); double rcond(0);
03951 Vector<complex<double>, VectFull, Allocator0> work(2*n);
03952 zhpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
03953 work.GetData(), &info.GetInfoRef());
03954 return rcond;
03955 }
03956
03957
03958
03959
03960
03961 template<class Prop0, class Allocator0>
03962 float ReciprocalConditionNumber(const Matrix<float, Prop0, ColUpTriang,
03963 Allocator0>& A, SeldonNorm norm,
03964 LapackInfo& info = lapack_info)
03965 {
03966 char uplo('U'); char norm_type = norm.Char(); char diag('N');
03967
03968 int n = A.GetM(); float rcond(0);
03969 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
03970 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
03971 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03972 return rcond;
03973 }
03974
03975
03976 template<class Prop0, class Allocator0>
03977 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColUpTriang,
03978 Allocator0>& A, SeldonNorm norm,
03979 LapackInfo& info = lapack_info)
03980 {
03981 char uplo('U'); char norm_type = norm.Char(); char diag('N');
03982
03983 int n = A.GetM(); double rcond(0);
03984 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
03985 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
03986 work.GetData(), iwork.GetData(), &info.GetInfoRef());
03987 return rcond;
03988 }
03989
03990
03991 template<class Prop0, class Allocator0>
03992 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
03993 ColUpTriang, Allocator0>& A,
03994 SeldonNorm norm,
03995 LapackInfo& info = lapack_info)
03996 {
03997 char uplo('U'); char norm_type = norm.Char(); char diag('N');
03998
03999 int n = A.GetM(); float rcond(0);
04000 Vector<float> rwork(n);
04001 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04002 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04003 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04004 return rcond;
04005 }
04006
04007
04008 template<class Prop0, class Allocator0>
04009 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04010 ColUpTriang, Allocator0>& A,
04011 SeldonNorm norm,
04012 LapackInfo& info = lapack_info)
04013 {
04014 char uplo('U'); char norm_type = norm.Char(); char diag('N');
04015
04016 int n = A.GetM(); double rcond(0);
04017 Vector<double> rwork(n);
04018 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04019 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04020 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04021 return rcond;
04022 }
04023
04024
04025
04026
04027
04028 template<class Prop0, class Allocator0>
04029 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04030 const Matrix<float, Prop0, ColUpTriang,
04031 Allocator0>& A, SeldonNorm norm,
04032 LapackInfo& info = lapack_info)
04033 {
04034 char uplo('U'); char norm_type = norm.Char();
04035 char diag = DiagA.Char();
04036 int n = A.GetM(); float rcond(0);
04037 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04038 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04039 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04040 return rcond;
04041 }
04042
04043
04044 template<class Prop0, class Allocator0>
04045 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04046 const Matrix<double, Prop0, ColUpTriang,
04047 Allocator0>& A, SeldonNorm norm,
04048 LapackInfo& info = lapack_info)
04049 {
04050 char uplo('U'); char norm_type = norm.Char();
04051
04052 int n = A.GetM(); double rcond(0);
04053 char diag = DiagA.Char();
04054 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04055 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04056 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04057 return rcond;
04058 }
04059
04060
04061 template<class Prop0, class Allocator0>
04062 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04063 const Matrix<complex<float>, Prop0,
04064 ColUpTriang, Allocator0>& A,
04065 SeldonNorm norm,
04066 LapackInfo& info = lapack_info)
04067 {
04068 char uplo('U'); char norm_type = norm.Char();
04069 char diag = DiagA.Char();
04070 int n = A.GetM(); float rcond(0);
04071 Vector<float> rwork(n);
04072 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04073 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04074 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04075 return rcond;
04076 }
04077
04078
04079 template<class Prop0, class Allocator0>
04080 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04081 const Matrix<complex<double>, Prop0,
04082 ColUpTriang, Allocator0>& A,
04083 SeldonNorm norm,
04084 LapackInfo& info = lapack_info)
04085 {
04086 char uplo('U'); char norm_type = norm.Char();
04087 char diag = DiagA.Char();
04088 int n = A.GetM(); double rcond(0);
04089 Vector<double> rwork(n);
04090 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04091 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04092 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04093 return rcond;
04094 }
04095
04096
04097
04098
04099
04100 template<class Prop0, class Allocator0>
04101 float ReciprocalConditionNumber(const Matrix<float, Prop0,
04102 ColLoTriang, Allocator0>& A,
04103 SeldonNorm norm,
04104 LapackInfo& info = lapack_info)
04105 {
04106 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04107
04108 int n = A.GetM(); float rcond(0);
04109 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04110 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04111 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04112 return rcond;
04113 }
04114
04115
04116 template<class Prop0, class Allocator0>
04117 double ReciprocalConditionNumber(const Matrix<double, Prop0, ColLoTriang,
04118 Allocator0>& A, SeldonNorm norm,
04119 LapackInfo& info = lapack_info)
04120 {
04121 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04122
04123 int n = A.GetM(); double rcond(0);
04124 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04125 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04126 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04127 return rcond;
04128 }
04129
04130
04131 template<class Prop0, class Allocator0>
04132 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
04133 ColLoTriang, Allocator0>& A,
04134 SeldonNorm norm,
04135 LapackInfo& info = lapack_info)
04136 {
04137 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04138
04139 int n = A.GetM(); float rcond(0);
04140 Vector<float> rwork(n);
04141 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04142 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04143 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04144 return rcond;
04145 }
04146
04147
04148 template<class Prop0, class Allocator0>
04149 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04150 ColLoTriang, Allocator0>& A,
04151 SeldonNorm norm,
04152 LapackInfo& info = lapack_info)
04153 {
04154 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04155
04156 int n = A.GetM(); double rcond(0);
04157 Vector<double> rwork(n);
04158 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04159 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04160 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04161 return rcond;
04162 }
04163
04164
04165
04166
04167
04168 template<class Prop0, class Allocator0>
04169 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04170 const Matrix<float, Prop0,
04171 ColLoTriang, Allocator0>& A,
04172 SeldonNorm norm,
04173 LapackInfo& info = lapack_info)
04174 {
04175 char uplo('L'); char norm_type = norm.Char();
04176 char diag = DiagA.Char();
04177 int n = A.GetM(); float rcond(0);
04178 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04179 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04180 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04181 return rcond;
04182 }
04183
04184
04185 template<class Prop0, class Allocator0>
04186 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04187 const Matrix<double, Prop0, ColLoTriang,
04188 Allocator0>& A, SeldonNorm norm,
04189 LapackInfo& info = lapack_info)
04190 {
04191 char uplo('L'); char norm_type = norm.Char();
04192 char diag = DiagA.Char();
04193 int n = A.GetM(); double rcond(0);
04194 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04195 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04196 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04197 return rcond;
04198 }
04199
04200
04201 template<class Prop0, class Allocator0>
04202 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04203 const Matrix<complex<float>, Prop0,
04204 ColLoTriang, Allocator0>& A,
04205 SeldonNorm norm,
04206 LapackInfo& info = lapack_info)
04207 {
04208 char uplo('L'); char norm_type = norm.Char();
04209 char diag = DiagA.Char();
04210 int n = A.GetM(); float rcond(0);
04211 Vector<float> rwork(n);
04212 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04213 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04214 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04215 return rcond;
04216 }
04217
04218
04219 template<class Prop0, class Allocator0>
04220 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04221 const Matrix<complex<double>, Prop0,
04222 ColLoTriang, Allocator0>& A,
04223 SeldonNorm norm,
04224 LapackInfo& info = lapack_info)
04225 {
04226 char uplo('L'); char norm_type = norm.Char();
04227 char diag = DiagA.Char();
04228 int n = A.GetM(); double rcond(0);
04229 Vector<double> rwork(n);
04230 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04231 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04232 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04233 return rcond;
04234 }
04235
04236
04237
04238
04239
04240 template<class Prop0, class Allocator0>
04241 float ReciprocalConditionNumber(const Matrix<float, Prop0,
04242 ColUpTriangPacked, Allocator0>& A,
04243 SeldonNorm norm,
04244 LapackInfo& info = lapack_info)
04245 {
04246 char uplo('U'); char norm_type = norm.Char(); char diag('N');
04247
04248 int n = A.GetM(); float rcond(0);
04249 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04250 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04251 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04252 return rcond;
04253 }
04254
04255
04256 template<class Prop0, class Allocator0>
04257 double ReciprocalConditionNumber(const Matrix<double, Prop0,
04258 ColUpTriangPacked, Allocator0>& A,
04259 SeldonNorm norm,
04260 LapackInfo& info = lapack_info)
04261 {
04262 char uplo('U'); char norm_type = norm.Char(); char diag('N');
04263
04264 int n = A.GetM(); double rcond(0);
04265 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04266 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04267 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04268 return rcond;
04269 }
04270
04271
04272 template<class Prop0, class Allocator0>
04273 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
04274 ColUpTriangPacked, Allocator0>& A,
04275 SeldonNorm norm,
04276 LapackInfo& info = lapack_info)
04277 {
04278 char uplo('U'); char norm_type = norm.Char(); char diag('N');
04279
04280 int n = A.GetM(); float rcond(0);
04281 Vector<float> rwork(n);
04282 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04283 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04284 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04285 return rcond;
04286 }
04287
04288
04289 template<class Prop0, class Allocator0>
04290 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04291 ColUpTriangPacked, Allocator0>& A,
04292 SeldonNorm norm,
04293 LapackInfo& info = lapack_info)
04294 {
04295 char uplo('U'); char norm_type = norm.Char(); char diag('N');
04296
04297 int n = A.GetM(); double rcond(0);
04298 Vector<double> rwork(n);
04299 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04300 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04301 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04302 return rcond;
04303 }
04304
04305
04306
04307
04308
04309 template<class Prop0, class Allocator0>
04310 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04311 const Matrix<float, Prop0,
04312 ColUpTriangPacked, Allocator0>& A,
04313 SeldonNorm norm,
04314 LapackInfo& info = lapack_info)
04315 {
04316 char uplo('U'); char norm_type = norm.Char();
04317 char diag = DiagA.Char();
04318 int n = A.GetM(); float rcond(0);
04319 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04320 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04321 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04322 return rcond;
04323 }
04324
04325
04326 template<class Prop0, class Allocator0>
04327 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04328 const Matrix<double, Prop0,
04329 ColUpTriangPacked, Allocator0>& A,
04330 SeldonNorm norm,
04331 LapackInfo& info = lapack_info)
04332 {
04333 char uplo('U'); char norm_type = norm.Char();
04334 char diag = DiagA.Char();
04335 int n = A.GetM(); double rcond(0);
04336 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04337 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04338 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04339 return rcond;
04340 }
04341
04342
04343 template<class Prop0, class Allocator0>
04344 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04345 const Matrix<complex<float>, Prop0,
04346 ColUpTriangPacked, Allocator0>& A,
04347 SeldonNorm norm,
04348 LapackInfo& info = lapack_info)
04349 {
04350 char uplo('U'); char norm_type = norm.Char();
04351 char diag = DiagA.Char();
04352 int n = A.GetM(); float rcond(0);
04353 Vector<float> rwork(n);
04354 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04355 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04356 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04357 return rcond;
04358 }
04359
04360
04361 template<class Prop0, class Allocator0>
04362 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04363 const Matrix<complex<double>, Prop0,
04364 ColUpTriangPacked, Allocator0>& A,
04365 SeldonNorm norm,
04366 LapackInfo& info = lapack_info)
04367 {
04368 char uplo('U'); char norm_type = norm.Char();
04369 char diag = DiagA.Char();
04370 int n = A.GetM(); double rcond(0);
04371 Vector<double> rwork(n);
04372 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04373 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04374 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04375 return rcond;
04376 }
04377
04378
04379
04380
04381
04382 template<class Prop0, class Allocator0>
04383 float ReciprocalConditionNumber(const Matrix<float, Prop0,
04384 ColLoTriangPacked, Allocator0>& A,
04385 SeldonNorm norm,
04386 LapackInfo& info = lapack_info)
04387 {
04388 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04389
04390 int n = A.GetM(); float rcond(0);
04391 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04392 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04393 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04394 return rcond;
04395 }
04396
04397
04398 template<class Prop0, class Allocator0>
04399 double ReciprocalConditionNumber(const Matrix<double, Prop0,
04400 ColLoTriangPacked, Allocator0>& A,
04401 SeldonNorm norm,
04402 LapackInfo& info = lapack_info)
04403 {
04404 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04405
04406 int n = A.GetM(); double rcond(0);
04407 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04408 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04409 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04410 return rcond;
04411 }
04412
04413
04414 template<class Prop0, class Allocator0>
04415 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
04416 ColLoTriangPacked, Allocator0>& A,
04417 SeldonNorm norm,
04418 LapackInfo& info = lapack_info)
04419 {
04420 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04421
04422 int n = A.GetM(); float rcond(0);
04423 Vector<float> rwork(n);
04424 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04425 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04426 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04427 return rcond;
04428 }
04429
04430
04431 template<class Prop0, class Allocator0>
04432 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04433 ColLoTriangPacked, Allocator0>& A,
04434 SeldonNorm norm,
04435 LapackInfo& info = lapack_info)
04436 {
04437 char uplo('L'); char norm_type = norm.Char(); char diag('N');
04438
04439 int n = A.GetM(); double rcond(0);
04440 Vector<double> rwork(n);
04441 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04442 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04443 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04444 return rcond;
04445 }
04446
04447
04448
04449
04450
04451 template<class Prop0, class Allocator0>
04452 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04453 const Matrix<float, Prop0,
04454 ColLoTriangPacked, Allocator0>& A,
04455 SeldonNorm norm,
04456 LapackInfo& info = lapack_info)
04457 {
04458 char uplo('L'); char norm_type = norm.Char();
04459 char diag = DiagA.Char();
04460 int n = A.GetM(); float rcond(0);
04461 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04462 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04463 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04464 return rcond;
04465 }
04466
04467
04468 template<class Prop0, class Allocator0>
04469 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04470 const Matrix<double, Prop0,
04471 ColLoTriangPacked, Allocator0>& A,
04472 SeldonNorm norm,
04473 LapackInfo& info = lapack_info)
04474 {
04475 char uplo('L'); char norm_type = norm.Char();
04476 char diag = DiagA.Char();
04477 int n = A.GetM(); double rcond(0);
04478 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04479 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04480 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04481 return rcond;
04482 }
04483
04484
04485 template<class Prop0, class Allocator0>
04486 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04487 const Matrix<complex<float>, Prop0,
04488 ColLoTriangPacked, Allocator0>& A,
04489 SeldonNorm norm,
04490 LapackInfo& info = lapack_info)
04491 {
04492 char uplo('L'); char norm_type = norm.Char();
04493 char diag = DiagA.Char();
04494 int n = A.GetM(); float rcond(0);
04495 Vector<float> rwork(n);
04496 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04497 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04498 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04499 return rcond;
04500 }
04501
04502
04503 template<class Prop0, class Allocator0>
04504 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04505 const Matrix<complex<double>, Prop0,
04506 ColLoTriangPacked, Allocator0>& A,
04507 SeldonNorm norm,
04508 LapackInfo& info = lapack_info)
04509 {
04510 char uplo('L'); char norm_type = norm.Char();
04511 char diag = DiagA.Char();
04512 int n = A.GetM(); double rcond(0);
04513 Vector<double> rwork(n);
04514 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04515 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04516 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04517 return rcond;
04518 }
04519
04520
04521
04522
04523
04524 template<class Prop0, class Allocator0>
04525 float ReciprocalConditionNumber(const Matrix<float, Prop0, RowUpTriang,
04526 Allocator0>& A, SeldonNorm norm,
04527 LapackInfo& info = lapack_info)
04528 {
04529 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04530
04531 int n = A.GetM(); float rcond(0);
04532 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04533 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04534 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04535 return rcond;
04536 }
04537
04538
04539 template<class Prop0, class Allocator0>
04540 double ReciprocalConditionNumber(const Matrix<double, Prop0, RowUpTriang,
04541 Allocator0>& A, SeldonNorm norm,
04542 LapackInfo& info = lapack_info)
04543 {
04544 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04545
04546 int n = A.GetM(); double rcond(0);
04547 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04548 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04549 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04550 return rcond;
04551 }
04552
04553
04554 template<class Prop0, class Allocator0>
04555 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
04556 RowUpTriang, Allocator0>& A,
04557 SeldonNorm norm,
04558 LapackInfo& info = lapack_info)
04559 {
04560 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04561
04562 int n = A.GetM(); float rcond(0);
04563 Vector<float> rwork(n);
04564 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04565 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04566 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04567 return rcond;
04568 }
04569
04570
04571 template<class Prop0, class Allocator0>
04572 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04573 RowUpTriang, Allocator0>& A,
04574 SeldonNorm norm,
04575 LapackInfo& info = lapack_info)
04576 {
04577 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04578
04579 int n = A.GetM(); double rcond(0);
04580 Vector<double> rwork(n);
04581 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04582 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04583 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04584 return rcond;
04585 }
04586
04587
04588
04589
04590
04591 template<class Prop0, class Allocator0>
04592 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04593 const Matrix<float, Prop0, RowUpTriang,
04594 Allocator0>& A, SeldonNorm norm,
04595 LapackInfo& info = lapack_info)
04596 {
04597 char uplo('L'); char norm_type = norm.RevChar();
04598 char diag = DiagA.Char();
04599 int n = A.GetM(); float rcond(0);
04600 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04601 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04602 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04603 return rcond;
04604 }
04605
04606
04607 template<class Prop0, class Allocator0>
04608 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04609 const Matrix<double, Prop0, RowUpTriang,
04610 Allocator0>& A, SeldonNorm norm,
04611 LapackInfo& info = lapack_info)
04612 {
04613 char uplo('L'); char norm_type = norm.RevChar();
04614 char diag = DiagA.Char();
04615 int n = A.GetM(); double rcond(0);
04616 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04617 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04618 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04619 return rcond;
04620 }
04621
04622
04623 template<class Prop0, class Allocator0>
04624 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04625 const Matrix<complex<float>, Prop0,
04626 RowUpTriang, Allocator0>& A,
04627 SeldonNorm norm,
04628 LapackInfo& info = lapack_info)
04629 {
04630 char uplo('L'); char norm_type = norm.RevChar();
04631 char diag = DiagA.Char();
04632 int n = A.GetM(); float rcond(0);
04633 Vector<float> rwork(n);
04634 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04635 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04636 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04637 return rcond;
04638 }
04639
04640
04641 template<class Prop0, class Allocator0>
04642 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04643 const Matrix<complex<double>, Prop0,
04644 RowUpTriang, Allocator0>& A,
04645 SeldonNorm norm,
04646 LapackInfo& info = lapack_info)
04647 {
04648 char uplo('L'); char norm_type = norm.RevChar();
04649 char diag = DiagA.Char();
04650 int n = A.GetM(); double rcond(0);
04651 Vector<double> rwork(n);
04652 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04653 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04654 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04655 return rcond;
04656 }
04657
04658
04659
04660
04661
04662 template<class Prop0, class Allocator0>
04663 float ReciprocalConditionNumber(const Matrix<float, Prop0,
04664 RowLoTriang, Allocator0>& A,
04665 SeldonNorm norm,
04666 LapackInfo& info = lapack_info)
04667 {
04668 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
04669
04670 int n = A.GetM(); float rcond(0);
04671 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04672 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04673 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04674 return rcond;
04675 }
04676
04677
04678 template<class Prop0, class Allocator0>
04679 double ReciprocalConditionNumber(const Matrix<double, Prop0,
04680 RowLoTriang, Allocator0>& A,
04681 SeldonNorm norm,
04682 LapackInfo& info = lapack_info)
04683 {
04684 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
04685
04686 int n = A.GetM(); double rcond(0);
04687 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04688 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04689 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04690 return rcond;
04691 }
04692
04693
04694 template<class Prop0, class Allocator0>
04695 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
04696 RowLoTriang, Allocator0>& A,
04697 SeldonNorm norm,
04698 LapackInfo& info = lapack_info)
04699 {
04700 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
04701
04702 int n = A.GetM(); float rcond(0);
04703 Vector<float> rwork(n);
04704 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04705 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04706 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04707 return rcond;
04708 }
04709
04710
04711 template<class Prop0, class Allocator0>
04712 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04713 RowLoTriang, Allocator0>& A,
04714 SeldonNorm norm,
04715 LapackInfo& info = lapack_info)
04716 {
04717 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
04718
04719 int n = A.GetM(); double rcond(0);
04720 Vector<double> rwork(n);
04721 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04722 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04723 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04724 return rcond;
04725 }
04726
04727
04728
04729
04730
04731 template<class Prop0, class Allocator0>
04732 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04733 const Matrix<float, Prop0,
04734 RowLoTriang, Allocator0>& A,
04735 SeldonNorm norm,
04736 LapackInfo& info = lapack_info)
04737 {
04738 char uplo('U'); char norm_type = norm.RevChar();
04739 char diag = DiagA.Char();
04740 int n = A.GetM(); float rcond(0);
04741 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04742 strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04743 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04744 return rcond;
04745 }
04746
04747
04748 template<class Prop0, class Allocator0>
04749 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04750 const Matrix<double, Prop0,
04751 RowLoTriang, Allocator0>& A,
04752 SeldonNorm norm,
04753 LapackInfo& info = lapack_info)
04754 {
04755 char uplo('U'); char norm_type = norm.RevChar();
04756 char diag = DiagA.Char();
04757 int n = A.GetM(); double rcond(0);
04758 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04759 dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
04760 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04761 return rcond;
04762 }
04763
04764
04765 template<class Prop0, class Allocator0>
04766 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04767 const Matrix<complex<float>, Prop0,
04768 RowLoTriang, Allocator0>& A,
04769 SeldonNorm norm,
04770 LapackInfo& info = lapack_info)
04771 {
04772 char uplo('U'); char norm_type = norm.RevChar();
04773 char diag = DiagA.Char();
04774 int n = A.GetM(); float rcond(0);
04775 Vector<float> rwork(n);
04776 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04777 ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04778 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04779 return rcond;
04780 }
04781
04782
04783 template<class Prop0, class Allocator0>
04784 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04785 const Matrix<complex<double>, Prop0,
04786 RowLoTriang, Allocator0>& A,
04787 SeldonNorm norm,
04788 LapackInfo& info = lapack_info)
04789 {
04790 char uplo('U'); char norm_type = norm.RevChar();
04791 char diag = DiagA.Char();
04792 int n = A.GetM(); double rcond(0);
04793 Vector<double> rwork(n);
04794 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04795 ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
04796 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04797 return rcond;
04798 }
04799
04800
04801
04802
04803
04804 template<class Prop0, class Allocator0>
04805 float ReciprocalConditionNumber(const Matrix<float, Prop0,
04806 RowUpTriangPacked, Allocator0>& A,
04807 SeldonNorm norm,
04808 LapackInfo& info = lapack_info)
04809 {
04810 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04811
04812 int n = A.GetM(); float rcond(0);
04813 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04814 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04815 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04816 return rcond;
04817 }
04818
04819
04820 template<class Prop0, class Allocator0>
04821 double ReciprocalConditionNumber(const Matrix<double, Prop0,
04822 RowUpTriangPacked, Allocator0>& A,
04823 SeldonNorm norm,
04824 LapackInfo& info = lapack_info)
04825 {
04826 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04827
04828 int n = A.GetM(); double rcond(0);
04829 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04830 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04831 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04832 return rcond;
04833 }
04834
04835
04836 template<class Prop0, class Allocator0>
04837 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
04838 RowUpTriangPacked, Allocator0>& A,
04839 SeldonNorm norm,
04840 LapackInfo& info = lapack_info)
04841 {
04842 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04843
04844 int n = A.GetM(); float rcond(0);
04845 Vector<float> rwork(n);
04846 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04847 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04848 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04849 return rcond;
04850 }
04851
04852
04853 template<class Prop0, class Allocator0>
04854 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04855 RowUpTriangPacked, Allocator0>& A,
04856 SeldonNorm norm,
04857 LapackInfo& info = lapack_info)
04858 {
04859 char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
04860
04861 int n = A.GetM(); double rcond(0);
04862 Vector<double> rwork(n);
04863 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04864 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04865 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04866 return rcond;
04867 }
04868
04869
04870
04871
04872
04873 template<class Prop0, class Allocator0>
04874 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04875 const Matrix<float, Prop0,
04876 RowUpTriangPacked, Allocator0>& A,
04877 SeldonNorm norm,
04878 LapackInfo& info = lapack_info)
04879 {
04880 char uplo('L'); char norm_type = norm.RevChar();
04881 char diag = DiagA.Char();
04882 int n = A.GetM(); float rcond(0);
04883 Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
04884 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04885 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04886 return rcond;
04887 }
04888
04889
04890 template<class Prop0, class Allocator0>
04891 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04892 const Matrix<double, Prop0,
04893 RowUpTriangPacked, Allocator0>& A,
04894 SeldonNorm norm,
04895 LapackInfo& info = lapack_info)
04896 {
04897 char uplo('L'); char norm_type = norm.RevChar();
04898 char diag = DiagA.Char();
04899 int n = A.GetM(); double rcond(0);
04900 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04901 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04902 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04903 return rcond;
04904 }
04905
04906
04907 template<class Prop0, class Allocator0>
04908 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
04909 const Matrix<complex<float>, Prop0,
04910 RowUpTriangPacked, Allocator0>& A,
04911 SeldonNorm norm,
04912 LapackInfo& info = lapack_info)
04913 {
04914 char uplo('L'); char norm_type = norm.RevChar();
04915 char diag = DiagA.Char();
04916 int n = A.GetM(); float rcond(0);
04917 Vector<float> rwork(n);
04918 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04919 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04920 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04921 return rcond;
04922 }
04923
04924
04925 template<class Prop0, class Allocator0>
04926 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
04927 const Matrix<complex<double>, Prop0,
04928 RowUpTriangPacked, Allocator0>& A,
04929 SeldonNorm norm,
04930 LapackInfo& info = lapack_info)
04931 {
04932 char uplo('L'); char norm_type = norm.RevChar();
04933 char diag = DiagA.Char();
04934 int n = A.GetM(); double rcond(0);
04935 Vector<double> rwork(n);
04936 Vector<complex<double>, VectFull, Allocator0> work(2*n);
04937 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04938 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04939 return rcond;
04940 }
04941
04942
04943
04944
04945
04946 template<class Prop0, class Allocator0>
04947 float ReciprocalConditionNumber(const Matrix<float, Prop0,
04948 RowLoTriangPacked, Allocator0>& A,
04949 SeldonNorm norm,
04950 LapackInfo& info = lapack_info)
04951 {
04952 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
04953
04954 int n = A.GetM(); float rcond(0);
04955 Vector<int> iwork(n);
04956 Vector<float, VectFull, Allocator0> work(3*n);
04957 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04958 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04959 return rcond;
04960 }
04961
04962
04963 template<class Prop0, class Allocator0>
04964 double ReciprocalConditionNumber(const Matrix<double, Prop0,
04965 RowLoTriangPacked, Allocator0>& A,
04966 SeldonNorm norm,
04967 LapackInfo& info = lapack_info)
04968 {
04969 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
04970
04971 int n = A.GetM(); double rcond(0);
04972 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
04973 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
04974 work.GetData(), iwork.GetData(), &info.GetInfoRef());
04975 return rcond;
04976 }
04977
04978
04979 template<class Prop0, class Allocator0>
04980 float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
04981 RowLoTriangPacked, Allocator0>& A,
04982 SeldonNorm norm,
04983 LapackInfo& info = lapack_info)
04984 {
04985 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
04986
04987 int n = A.GetM(); float rcond(0);
04988 Vector<float> rwork(n);
04989 Vector<complex<float>, VectFull, Allocator0> work(2*n);
04990 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
04991 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
04992 return rcond;
04993 }
04994
04995
04996 template<class Prop0, class Allocator0>
04997 double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
04998 RowLoTriangPacked, Allocator0>& A,
04999 SeldonNorm norm,
05000 LapackInfo& info = lapack_info)
05001 {
05002 char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
05003
05004 int n = A.GetM(); double rcond(0);
05005 Vector<double> rwork(n);
05006 Vector<complex<double>, VectFull, Allocator0> work(2*n);
05007 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
05008 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
05009 return rcond;
05010 }
05011
05012
05013
05014
05015
05016 template<class Prop0, class Allocator0>
05017 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
05018 const Matrix<float, Prop0,
05019 RowLoTriangPacked, Allocator0>& A,
05020 SeldonNorm norm,
05021 LapackInfo& info = lapack_info)
05022 {
05023 char uplo('U'); char norm_type = norm.RevChar();
05024 char diag = DiagA.Char();
05025 int n = A.GetM(); float rcond(0);
05026 Vector<int> iwork(n);
05027 Vector<float, VectFull, Allocator0> work(3*n);
05028 stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
05029 work.GetData(), iwork.GetData(), &info.GetInfoRef());
05030 return rcond;
05031 }
05032
05033
05034 template<class Prop0, class Allocator0>
05035 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
05036 const Matrix<double, Prop0,
05037 RowLoTriangPacked, Allocator0>& A,
05038 SeldonNorm norm,
05039 LapackInfo& info = lapack_info)
05040 {
05041 char uplo('U'); char norm_type = norm.RevChar();
05042 char diag = DiagA.Char();
05043 int n = A.GetM(); double rcond(0);
05044 Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
05045 dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
05046 work.GetData(), iwork.GetData(), &info.GetInfoRef());
05047 return rcond;
05048 }
05049
05050
05051 template<class Prop0, class Allocator0>
05052 float ReciprocalConditionNumber(const SeldonDiag& DiagA,
05053 const Matrix<complex<float>, Prop0,
05054 RowLoTriangPacked, Allocator0>& A,
05055 SeldonNorm norm,
05056 LapackInfo& info = lapack_info)
05057 {
05058 char uplo('U'); char norm_type = norm.RevChar();
05059 char diag = DiagA.Char();
05060 int n = A.GetM(); float rcond(0);
05061 Vector<float> rwork(n);
05062 Vector<complex<float>, VectFull, Allocator0> work(2*n);
05063 ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
05064 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
05065 return rcond;
05066 }
05067
05068
05069 template<class Prop0, class Allocator0>
05070 double ReciprocalConditionNumber(const SeldonDiag& DiagA,
05071 const Matrix<complex<double>, Prop0,
05072 RowLoTriangPacked, Allocator0>& A,
05073 SeldonNorm norm,
05074 LapackInfo& info = lapack_info)
05075 {
05076 char uplo('U'); char norm_type = norm.RevChar();
05077 char diag = DiagA.Char();
05078 int n = A.GetM(); double rcond(0);
05079 Vector<double> rwork(n);
05080 Vector<complex<double>, VectFull, Allocator0> work(2*n);
05081 ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
05082 work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
05083 return rcond;
05084 }
05085
05086
05087
05089
05090
05091
05093
05094
05095
05096
05097
05098
05099 template <class Prop0, class Allocator0,
05100 class Allocator1, class Allocator2,
05101 class Allocator3, class Allocator4>
05102 void RefineSolutionLU(const Matrix<float, Prop0, ColMajor, Allocator0>& A,
05103 const Matrix<float, Prop0, ColMajor,
05104 Allocator1>& Alu,
05105 const Vector<int, VectFull, Allocator2>& P,
05106 Vector<float, VectFull, Allocator3>& x,
05107 const Vector<float, VectFull, Allocator4>& b,
05108 float& ferr, float& berr,
05109 LapackInfo& info = lapack_info)
05110 {
05111
05112 #ifdef SELDON_CHECK_DIMENSIONS
05113 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05114 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05115 #endif
05116
05117 int m = A.GetM();
05118 int nrhs = 1;
05119 char trans('N');
05120 Vector<float, VectFull, Allocator3> work(3*m);
05121 Vector<int> iwork(m);
05122 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05123 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05124 &ferr, &berr, work.GetData(),
05125 iwork.GetData(), &info.GetInfoRef() );
05126 }
05127
05128
05129 template <class Prop0, class Allocator0,
05130 class Allocator1, class Allocator2,
05131 class Allocator3, class Allocator4>
05132 void RefineSolutionLU(const Matrix<double, Prop0, ColMajor, Allocator0>& A,
05133 const Matrix<double, Prop0, ColMajor,
05134 Allocator1>& Alu,
05135 const Vector<int, VectFull, Allocator2>& P,
05136 Vector<double, VectFull, Allocator3>& x,
05137 const Vector<double, VectFull, Allocator4>& b,
05138 double& ferr, double& berr,
05139 LapackInfo& info = lapack_info)
05140 {
05141
05142 #ifdef SELDON_CHECK_DIMENSIONS
05143 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05144 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05145 #endif
05146
05147 int m = A.GetM();
05148 int nrhs = 1;
05149 char trans('N');
05150 Vector<double, VectFull, Allocator3> work(3*m);
05151 Vector<int> iwork(m);
05152 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05153 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05154 &ferr, &berr, work.GetData(),
05155 iwork.GetData(), &info.GetInfoRef() );
05156 }
05157
05158
05159 template <class Prop0, class Allocator0,
05160 class Allocator1, class Allocator2,
05161 class Allocator3, class Allocator4>
05162 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
05163 ColMajor, Allocator0>& A,
05164 const Matrix<complex<float>, Prop0,
05165 ColMajor, Allocator1>& Alu,
05166 const Vector<int, VectFull, Allocator2>& P,
05167 Vector<complex<float>, VectFull, Allocator3>& x,
05168 const Vector<complex<float>, VectFull,
05169 Allocator4>& b,
05170 float& ferr, float& berr,
05171 LapackInfo& info = lapack_info)
05172 {
05173
05174 #ifdef SELDON_CHECK_DIMENSIONS
05175 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05176 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05177 #endif
05178
05179 int m = A.GetM();
05180 int nrhs = 1;
05181 char trans('N');
05182 Vector<complex<float>, VectFull, Allocator3> work(2*m);
05183 Vector<float> rwork(m);
05184 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05185 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05186 &berr, work.GetData(), rwork.GetData(),
05187 &info.GetInfoRef() );
05188 }
05189
05190
05191 template <class Prop0, class Allocator0,
05192 class Allocator1, class Allocator2,
05193 class Allocator3, class Allocator4>
05194 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
05195 ColMajor, Allocator0>& A,
05196 const Matrix<complex<double>, Prop0,
05197 ColMajor, Allocator1>& Alu,
05198 const Vector<int, VectFull, Allocator2>& P,
05199 Vector<complex<double>, VectFull, Allocator3>& x,
05200 const Vector<complex<double>, VectFull,
05201 Allocator4>& b,
05202 double& ferr, double& berr,
05203 LapackInfo& info = lapack_info)
05204 {
05205
05206 #ifdef SELDON_CHECK_DIMENSIONS
05207 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05208 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05209 #endif
05210
05211 int m = A.GetM();
05212 int nrhs = 1;
05213 char trans('N');
05214 Vector<complex<double>, VectFull, Allocator3> work(2*m);
05215 Vector<double> rwork(m);
05216 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05217 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05218 &berr, work.GetData(), rwork.GetData(),
05219 &info.GetInfoRef() );
05220 }
05221
05222
05223
05224
05225
05226 template <class Prop0, class Allocator0,
05227 class Allocator1, class Allocator2,
05228 class Allocator3, class Allocator4>
05229 void RefineSolutionLU(const SeldonTranspose& TransA,
05230 const Matrix<float, Prop0, ColMajor, Allocator0>& A,
05231 const Matrix<float, Prop0, ColMajor,
05232 Allocator1>& Alu,
05233 const Vector<int, VectFull, Allocator2>& P,
05234 Vector<float, VectFull, Allocator3>& x,
05235 const Vector<float, VectFull, Allocator4>& b,
05236 float& ferr, float& berr,
05237 LapackInfo& info = lapack_info)
05238 {
05239
05240 #ifdef SELDON_CHECK_DIMENSIONS
05241 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05242 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05243 #endif
05244
05245 int m = A.GetM();
05246 int nrhs = 1;
05247 char trans = TransA.Char();
05248 Vector<float, VectFull, Allocator3> work(3*m);
05249 Vector<int> iwork(m);
05250 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05251 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05252 &ferr, &berr, work.GetData(),
05253 iwork.GetData(), &info.GetInfoRef() );
05254 }
05255
05256
05257 template <class Prop0, class Allocator0,
05258 class Allocator1, class Allocator2,
05259 class Allocator3, class Allocator4>
05260 void RefineSolutionLU(const SeldonTranspose& TransA,
05261 const Matrix<double, Prop0, ColMajor, Allocator0>& A,
05262 const Matrix<double, Prop0, ColMajor,
05263 Allocator1>& Alu,
05264 const Vector<int, VectFull, Allocator2>& P,
05265 Vector<double, VectFull, Allocator3>& x,
05266 const Vector<double, VectFull, Allocator4>& b,
05267 double& ferr, double& berr,
05268 LapackInfo& info = lapack_info)
05269 {
05270
05271 #ifdef SELDON_CHECK_DIMENSIONS
05272 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05273 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05274 #endif
05275
05276 int m = A.GetM();
05277 int nrhs = 1;
05278 char trans = TransA.Char();
05279 Vector<double, VectFull, Allocator3> work(3*m);
05280 Vector<int> iwork(m);
05281 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05282 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05283 &ferr, &berr, work.GetData(),
05284 iwork.GetData(), &info.GetInfoRef() );
05285 }
05286
05287
05288 template <class Prop0, class Allocator0,
05289 class Allocator1, class Allocator2,
05290 class Allocator3, class Allocator4>
05291 void
05292 RefineSolutionLU(const SeldonTranspose& TransA,
05293 const Matrix<complex<float>, Prop0, ColMajor,
05294 Allocator0>& A,
05295 const Matrix<complex<float>, Prop0, ColMajor,
05296 Allocator1>& Alu,
05297 const Vector<int, VectFull, Allocator2>& P,
05298 Vector<complex<float>, VectFull, Allocator3>& x,
05299 const Vector<complex<float>, VectFull, Allocator4>& b,
05300 float& ferr, float& berr,
05301 LapackInfo& info = lapack_info)
05302 {
05303
05304 #ifdef SELDON_CHECK_DIMENSIONS
05305 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05306 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05307 #endif
05308
05309 int m = A.GetM();
05310 int nrhs = 1;
05311 char trans = TransA.Char();
05312 Vector<complex<float>, VectFull, Allocator3> work(2*m);
05313 Vector<float> rwork(m);
05314 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05315 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
05316 &ferr, &berr, work.GetDataVoid(),
05317 rwork.GetData(), &info.GetInfoRef() );
05318 }
05319
05320
05321 template <class Prop0, class Allocator0,
05322 class Allocator1, class Allocator2,
05323 class Allocator3, class Allocator4>
05324 void RefineSolutionLU(const SeldonTranspose& TransA,
05325 const Matrix<complex<double>, Prop0, ColMajor,
05326 Allocator0>& A,
05327 const Matrix<complex<double>, Prop0, ColMajor,
05328 Allocator1>& Alu,
05329 const Vector<int, VectFull, Allocator2>& P,
05330 Vector<complex<double>, VectFull, Allocator3>& x,
05331 const Vector<complex<double>, VectFull,
05332 Allocator4>& b,
05333 double& ferr, double& berr,
05334 LapackInfo& info = lapack_info)
05335 {
05336
05337 #ifdef SELDON_CHECK_DIMENSIONS
05338 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05339 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05340 #endif
05341
05342 int m = A.GetM();
05343 int nrhs = 1;
05344 char trans = TransA.Char();
05345 Vector<complex<double>, VectFull, Allocator3> work(2*m);
05346 Vector<double> rwork(m);
05347 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05348 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
05349 &ferr, &berr, work.GetDataVoid(),
05350 rwork.GetData(), &info.GetInfoRef());
05351 }
05352
05353
05354
05355
05356
05357 template <class Prop0, class Allocator0,
05358 class Allocator1, class Allocator2,
05359 class Allocator3, class Allocator4>
05360 void RefineSolutionLU(const Matrix<float, Prop0, RowMajor, Allocator0>& A,
05361 const Matrix<float, Prop0, RowMajor,
05362 Allocator1>& Alu,
05363 const Vector<int, VectFull, Allocator2>& P,
05364 Vector<float, VectFull, Allocator3>& x,
05365 const Vector<float, VectFull, Allocator4>& b,
05366 float& ferr, float& berr,
05367 LapackInfo& info = lapack_info)
05368 {
05369
05370 #ifdef SELDON_CHECK_DIMENSIONS
05371 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05372 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05373 #endif
05374
05375 int m = A.GetM();
05376 int nrhs = 1;
05377 char trans('T');
05378 Vector<float, VectFull, Allocator3> work(3*m);
05379 Vector<int> iwork(m);
05380 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05381 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05382 &ferr, &berr, work.GetData(),
05383 iwork.GetData(), &info.GetInfoRef());
05384 }
05385
05386
05387 template <class Prop0, class Allocator0,
05388 class Allocator1, class Allocator2,
05389 class Allocator3, class Allocator4>
05390 void RefineSolutionLU(const Matrix<double, Prop0, RowMajor, Allocator0>& A,
05391 const Matrix<double, Prop0, RowMajor,
05392 Allocator1>& Alu,
05393 const Vector<int, VectFull, Allocator2>& P,
05394 Vector<double, VectFull, Allocator3>& x,
05395 const Vector<double, VectFull, Allocator4>& b,
05396 double& ferr, double& berr,
05397 LapackInfo& info = lapack_info)
05398 {
05399
05400 #ifdef SELDON_CHECK_DIMENSIONS
05401 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05402 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05403 #endif
05404
05405 int m = A.GetM();
05406 int nrhs = 1;
05407 char trans('T');
05408 Vector<double, VectFull, Allocator3> work(3*m);
05409 Vector<int> iwork(m);
05410 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05411 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05412 &ferr, &berr, work.GetData(),
05413 iwork.GetData(), &info.GetInfoRef());
05414 }
05415
05416
05417 template <class Prop0, class Allocator0,
05418 class Allocator1, class Allocator2,
05419 class Allocator3, class Allocator4>
05420 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
05421 RowMajor, Allocator0>& A,
05422 const Matrix<complex<float>, Prop0,
05423 RowMajor, Allocator1>& Alu,
05424 const Vector<int, VectFull, Allocator2>& P,
05425 Vector<complex<float>, VectFull, Allocator3>& x,
05426 const Vector<complex<float>, VectFull,
05427 Allocator4>& b,
05428 float& ferr, float& berr,
05429 LapackInfo& info = lapack_info)
05430 {
05431
05432 #ifdef SELDON_CHECK_DIMENSIONS
05433 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05434 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05435 #endif
05436
05437 int m = A.GetM();
05438 int nrhs = 1;
05439 char trans('T');
05440 Vector<complex<float>, VectFull, Allocator3> work(2*m);
05441 Vector<float> rwork(m);
05442 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05443 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05444 &berr, work.GetData(), rwork.GetData(),
05445 &info.GetInfoRef());
05446 }
05447
05448
05449 template <class Prop0, class Allocator0,
05450 class Allocator1, class Allocator2,
05451 class Allocator3, class Allocator4>
05452 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
05453 RowMajor, Allocator0>& A,
05454 const Matrix<complex<double>, Prop0,
05455 RowMajor, Allocator1>& Alu,
05456 const Vector<int, VectFull, Allocator2>& P,
05457 Vector<complex<double>, VectFull, Allocator3>& x,
05458 const Vector<complex<double>, VectFull,
05459 Allocator4>& b,
05460 double& ferr, double& berr,
05461 LapackInfo& info = lapack_info)
05462 {
05463
05464 #ifdef SELDON_CHECK_DIMENSIONS
05465 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05466 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05467 #endif
05468
05469 int m = A.GetM();
05470 int nrhs = 1;
05471 char trans('T');
05472 Vector<complex<double>, VectFull, Allocator3> work(2*m);
05473 Vector<double> rwork(m);
05474 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05475 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05476 &berr, work.GetData(), rwork.GetData(),
05477 &info.GetInfoRef());
05478 }
05479
05480
05481
05482
05483
05484 template <class Prop0, class Allocator0,
05485 class Allocator1, class Allocator2,
05486 class Allocator3, class Allocator4>
05487 void RefineSolutionLU(const SeldonTranspose& TransA,
05488 const Matrix<float, Prop0, RowMajor, Allocator0>& A,
05489 const Matrix<float, Prop0, RowMajor,
05490 Allocator1>& Alu,
05491 const Vector<int, VectFull, Allocator2>& P,
05492 Vector<float, VectFull, Allocator3>& x,
05493 const Vector<float, VectFull, Allocator4>& b,
05494 float& ferr, float& berr,
05495 LapackInfo& info = lapack_info)
05496 {
05497
05498 #ifdef SELDON_CHECK_DIMENSIONS
05499 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05500 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05501 #endif
05502
05503 int m = A.GetM();
05504 int nrhs = 1;
05505 char trans = TransA.RevChar();
05506 Vector<float, VectFull, Allocator3> work(3*m);
05507 Vector<int> iwork(m);
05508 sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05509 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05510 &ferr, &berr, work.GetData(),
05511 iwork.GetData(), &info.GetInfoRef() );
05512 }
05513
05514
05515 template <class Prop0, class Allocator0,
05516 class Allocator1, class Allocator2,
05517 class Allocator3, class Allocator4>
05518 void RefineSolutionLU(const SeldonTranspose& TransA,
05519 const Matrix<double, Prop0, RowMajor, Allocator0>& A,
05520 const Matrix<double, Prop0, RowMajor,
05521 Allocator1>& Alu,
05522 const Vector<int, VectFull, Allocator2>& P,
05523 Vector<double, VectFull, Allocator3>& x,
05524 const Vector<double, VectFull, Allocator4>& b,
05525 double& ferr, double& berr,
05526 LapackInfo& info = lapack_info)
05527 {
05528
05529 #ifdef SELDON_CHECK_DIMENSIONS
05530 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05531 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05532 #endif
05533
05534 int m = A.GetM();
05535 int nrhs = 1;
05536 char trans = TransA.RevChar();
05537 Vector<double, VectFull, Allocator3> work(3*m);
05538 Vector<int> iwork(m);
05539 dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05540 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05541 &ferr, &berr, work.GetData(),
05542 iwork.GetData(), &info.GetInfoRef() );
05543 }
05544
05545
05546 template <class Prop0, class Allocator0,
05547 class Allocator1, class Allocator2,
05548 class Allocator3, class Allocator4>
05549 void RefineSolutionLU(const SeldonTranspose& TransA,
05550 const Matrix<complex<float>, Prop0, RowMajor,
05551 Allocator0>& A,
05552 const Matrix<complex<float>, Prop0, RowMajor,
05553 Allocator1>& Alu,
05554 const Vector<int, VectFull, Allocator2>& P,
05555 Vector<complex<float>, VectFull, Allocator3>& x,
05556 Vector<complex<float>, VectFull, Allocator4>& b,
05557 float& ferr, float& berr,
05558 LapackInfo& info = lapack_info)
05559 {
05560
05561 #ifdef SELDON_CHECK_DIMENSIONS
05562 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05563 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05564 #endif
05565
05566 int m = A.GetM();
05567 int nrhs = 1;
05568 char trans = TransA.RevChar();
05569 Vector<complex<float>, VectFull, Allocator3> work(2*m);
05570 Vector<float> rwork(m);
05571 if (TransA.ConjTrans())
05572 {
05573 Conjugate(b);
05574 Conjugate(x);
05575 }
05576 cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05577 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
05578 &ferr, &berr, work.GetDataVoid(),
05579 rwork.GetData(), &info.GetInfoRef() );
05580 if (TransA.ConjTrans())
05581 {
05582 Conjugate(b);
05583 Conjugate(x);
05584 }
05585 }
05586
05587
05588 template <class Prop0, class Allocator0,
05589 class Allocator1, class Allocator2,
05590 class Allocator3, class Allocator4>
05591 void RefineSolutionLU(const SeldonTranspose& TransA,
05592 const Matrix<complex<double>, Prop0, RowMajor,
05593 Allocator0>& A,
05594 const Matrix<complex<double>, Prop0, RowMajor,
05595 Allocator1>& Alu,
05596 const Vector<int, VectFull, Allocator2>& P,
05597 Vector<complex<double>, VectFull, Allocator3>& x,
05598 Vector<complex<double>, VectFull,
05599 Allocator4>& b,
05600 double& ferr, double& berr,
05601 LapackInfo& info = lapack_info)
05602 {
05603
05604 #ifdef SELDON_CHECK_DIMENSIONS
05605 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05606 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05607 #endif
05608
05609 int m = A.GetM();
05610 int nrhs = 1;
05611 char trans = TransA.RevChar();
05612 Vector<complex<double>, VectFull, Allocator3> work(2*m);
05613 Vector<double> rwork(m);
05614 if (TransA.ConjTrans())
05615 {
05616 Conjugate(b);
05617 Conjugate(x);
05618 }
05619 zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05620 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
05621 &ferr, &berr, work.GetDataVoid(),
05622 rwork.GetData(), &info.GetInfoRef());
05623 if (TransA.ConjTrans())
05624 {
05625 Conjugate(b);
05626 Conjugate(x);
05627 }
05628 }
05629
05630
05631
05632
05633
05634 template <class Prop0, class Allocator0,
05635 class Allocator1, class Allocator2,
05636 class Allocator3, class Allocator4>
05637 void RefineSolutionLU(const Matrix<float, Prop0, ColSym, Allocator0>& A,
05638 const Matrix<float, Prop0, ColSym,
05639 Allocator1>& Alu,
05640 const Vector<int, VectFull, Allocator2>& P,
05641 Vector<float, VectFull, Allocator3>& x,
05642 const Vector<float, VectFull, Allocator4>& b,
05643 float& ferr, float& berr,
05644 LapackInfo& info = lapack_info)
05645 {
05646
05647 #ifdef SELDON_CHECK_DIMENSIONS
05648 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05649 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05650 #endif
05651
05652 int m = A.GetM();
05653 int nrhs = 1;
05654 char uplo('U');
05655 Vector<float, VectFull, Allocator3> work(3*m);
05656 Vector<int> iwork(m);
05657 ssyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05658 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05659 &ferr, &berr, work.GetData(),
05660 iwork.GetData(), &info.GetInfoRef() );
05661 }
05662
05663
05664 template <class Prop0, class Allocator0,
05665 class Allocator1, class Allocator2,
05666 class Allocator3, class Allocator4>
05667 void RefineSolutionLU(const Matrix<double, Prop0, ColSym, Allocator0>& A,
05668 const Matrix<double, Prop0, ColSym,
05669 Allocator1>& Alu,
05670 const Vector<int, VectFull, Allocator2>& P,
05671 Vector<double, VectFull, Allocator3>& x,
05672 const Vector<double, VectFull, Allocator4>& b,
05673 double& ferr, double& berr,
05674 LapackInfo& info = lapack_info)
05675 {
05676
05677 #ifdef SELDON_CHECK_DIMENSIONS
05678 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05679 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05680 #endif
05681
05682 int m = A.GetM();
05683 int nrhs = 1;
05684 char uplo('U');
05685 Vector<double, VectFull, Allocator3> work(3*m);
05686 Vector<int> iwork(m);
05687 dsyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05688 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05689 &ferr, &berr, work.GetData(),
05690 iwork.GetData(), &info.GetInfoRef() );
05691 }
05692
05693
05694 template <class Prop0, class Allocator0,
05695 class Allocator1, class Allocator2,
05696 class Allocator3, class Allocator4>
05697 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
05698 ColSym, Allocator0>& A,
05699 const Matrix<complex<float>, Prop0,
05700 ColSym, Allocator1>& Alu,
05701 const Vector<int, VectFull, Allocator2>& P,
05702 Vector<complex<float>, VectFull, Allocator3>& x,
05703 const Vector<complex<float>, VectFull,
05704 Allocator4>& b,
05705 float& ferr, float& berr,
05706 LapackInfo& info = lapack_info)
05707 {
05708
05709 #ifdef SELDON_CHECK_DIMENSIONS
05710 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05711 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05712 #endif
05713
05714 int m = A.GetM();
05715 int nrhs = 1;
05716 char uplo('U');
05717 Vector<complex<float>, VectFull, Allocator3> work(2*m);
05718 Vector<float> rwork(m);
05719 csyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05720 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05721 &berr, work.GetData(), rwork.GetData(),
05722 &info.GetInfoRef() );
05723 }
05724
05725
05726 template <class Prop0, class Allocator0,
05727 class Allocator1, class Allocator2,
05728 class Allocator3, class Allocator4>
05729 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
05730 ColSym, Allocator0>& A,
05731 const Matrix<complex<double>, Prop0,
05732 ColSym, Allocator1>& Alu,
05733 const Vector<int, VectFull, Allocator2>& P,
05734 Vector<complex<double>, VectFull, Allocator3>& x,
05735 const Vector<complex<double>, VectFull,
05736 Allocator4>& b,
05737 double& ferr, double& berr,
05738 LapackInfo& info = lapack_info)
05739 {
05740
05741 #ifdef SELDON_CHECK_DIMENSIONS
05742 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05743 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05744 #endif
05745
05746 int m = A.GetM();
05747 int nrhs = 1;
05748 char uplo('U');
05749 Vector<complex<double>, VectFull, Allocator3> work(2*m);
05750 Vector<double> rwork(m);
05751 zsyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05752 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05753 &berr, work.GetData(), rwork.GetData(),
05754 &info.GetInfoRef() );
05755 }
05756
05757
05758
05759
05760
05761 template <class Prop0, class Allocator0,
05762 class Allocator1, class Allocator2,
05763 class Allocator3, class Allocator4>
05764 void RefineSolutionLU(const Matrix<float, Prop0, ColSymPacked,
05765 Allocator0>& A,
05766 const Matrix<float, Prop0, ColSymPacked,
05767 Allocator1>& Alu,
05768 const Vector<int, VectFull, Allocator2>& P,
05769 Vector<float, VectFull, Allocator3>& x,
05770 const Vector<float, VectFull, Allocator4>& b,
05771 float& ferr, float& berr,
05772 LapackInfo& info = lapack_info)
05773 {
05774
05775 #ifdef SELDON_CHECK_DIMENSIONS
05776 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05777 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05778 #endif
05779
05780 int m = A.GetM();
05781 int nrhs = 1;
05782 char uplo('U');
05783 Vector<float, VectFull, Allocator3> work(3*m);
05784 Vector<int> iwork(m);
05785 ssprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
05786 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05787 &ferr, &berr, work.GetData(),
05788 iwork.GetData(), &info.GetInfoRef() );
05789 }
05790
05791
05792 template <class Prop0, class Allocator0,
05793 class Allocator1, class Allocator2,
05794 class Allocator3, class Allocator4>
05795 void RefineSolutionLU(const Matrix<double, Prop0, ColSymPacked,
05796 Allocator0>& A,
05797 const Matrix<double, Prop0, ColSymPacked,
05798 Allocator1>& Alu,
05799 const Vector<int, VectFull, Allocator2>& P,
05800 Vector<double, VectFull, Allocator3>& x,
05801 const Vector<double, VectFull, Allocator4>& b,
05802 double& ferr, double& berr,
05803 LapackInfo& info = lapack_info)
05804 {
05805
05806 #ifdef SELDON_CHECK_DIMENSIONS
05807 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05808 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05809 #endif
05810
05811 int m = A.GetM();
05812 int nrhs = 1;
05813 char uplo('U');
05814 Vector<double, VectFull, Allocator3> work(3*m);
05815 Vector<int> iwork(m);
05816 dsprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
05817 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05818 &ferr, &berr, work.GetData(),
05819 iwork.GetData(), &info.GetInfoRef() );
05820 }
05821
05822
05823 template <class Prop0, class Allocator0,
05824 class Allocator1, class Allocator2,
05825 class Allocator3, class Allocator4>
05826 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
05827 ColSymPacked, Allocator0>& A,
05828 const Matrix<complex<float>, Prop0,
05829 ColSymPacked, Allocator1>& Alu,
05830 const Vector<int, VectFull, Allocator2>& P,
05831 Vector<complex<float>, VectFull, Allocator3>& x,
05832 const Vector<complex<float>, VectFull,
05833 Allocator4>& b,
05834 float& ferr, float& berr,
05835 LapackInfo& info = lapack_info)
05836 {
05837
05838 #ifdef SELDON_CHECK_DIMENSIONS
05839 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05840 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05841 #endif
05842
05843 int m = A.GetM();
05844 int nrhs = 1;
05845 char uplo('U');
05846 Vector<complex<float>, VectFull, Allocator3> work(2*m);
05847 Vector<float> rwork(m);
05848 csprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
05849 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05850 &berr, work.GetData(), rwork.GetData(),
05851 &info.GetInfoRef() );
05852 }
05853
05854
05855 template <class Prop0, class Allocator0,
05856 class Allocator1, class Allocator2,
05857 class Allocator3, class Allocator4>
05858 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
05859 ColSymPacked, Allocator0>& A,
05860 const Matrix<complex<double>, Prop0,
05861 ColSymPacked, Allocator1>& Alu,
05862 const Vector<int, VectFull, Allocator2>& P,
05863 Vector<complex<double>, VectFull, Allocator3>& x,
05864 const Vector<complex<double>, VectFull,
05865 Allocator4>& b,
05866 double& ferr, double& berr,
05867 LapackInfo& info = lapack_info)
05868 {
05869
05870 #ifdef SELDON_CHECK_DIMENSIONS
05871 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05872 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05873 #endif
05874
05875 int m = A.GetM();
05876 int nrhs = 1;
05877 char uplo('U');
05878 Vector<complex<double>, VectFull, Allocator3> work(2*m);
05879 Vector<double> rwork(m);
05880 zsprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
05881 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05882 &berr, work.GetData(), rwork.GetData(),
05883 &info.GetInfoRef() );
05884 }
05885
05886
05887
05888
05889
05890 template <class Prop0, class Allocator0,
05891 class Allocator1, class Allocator2,
05892 class Allocator3, class Allocator4>
05893 void RefineSolutionLU(const Matrix<float, Prop0, RowSym, Allocator0>& A,
05894 const Matrix<float, Prop0, RowSym,
05895 Allocator1>& Alu,
05896 const Vector<int, VectFull, Allocator2>& P,
05897 Vector<float, VectFull, Allocator3>& x,
05898 const Vector<float, VectFull, Allocator4>& b,
05899 float& ferr, float& berr,
05900 LapackInfo& info = lapack_info)
05901 {
05902
05903 #ifdef SELDON_CHECK_DIMENSIONS
05904 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05905 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05906 #endif
05907
05908 int m = A.GetM();
05909 int nrhs = 1;
05910 char uplo('L');
05911 Vector<float, VectFull, Allocator3> work(3*m);
05912 Vector<int> iwork(m);
05913 ssyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05914 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05915 &ferr, &berr, work.GetData(),
05916 iwork.GetData(), &info.GetInfoRef() );
05917 }
05918
05919
05920 template <class Prop0, class Allocator0,
05921 class Allocator1, class Allocator2,
05922 class Allocator3, class Allocator4>
05923 void RefineSolutionLU(const Matrix<double, Prop0, RowSym, Allocator0>& A,
05924 const Matrix<double, Prop0, RowSym,
05925 Allocator1>& Alu,
05926 const Vector<int, VectFull, Allocator2>& P,
05927 Vector<double, VectFull, Allocator3>& x,
05928 const Vector<double, VectFull, Allocator4>& b,
05929 double& ferr, double& berr,
05930 LapackInfo& info = lapack_info)
05931 {
05932
05933 #ifdef SELDON_CHECK_DIMENSIONS
05934 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05935 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05936 #endif
05937
05938 int m = A.GetM();
05939 int nrhs = 1;
05940 char uplo('L');
05941 Vector<double, VectFull, Allocator3> work(3*m);
05942 Vector<int> iwork(m);
05943 dsyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
05944 P.GetData(), b.GetData(), &m, x.GetData(), &m,
05945 &ferr, &berr, work.GetData(),
05946 iwork.GetData(), &info.GetInfoRef() );
05947 }
05948
05949
05950 template <class Prop0, class Allocator0,
05951 class Allocator1, class Allocator2,
05952 class Allocator3, class Allocator4>
05953 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
05954 RowSym, Allocator0>& A,
05955 const Matrix<complex<float>, Prop0,
05956 RowSym, Allocator1>& Alu,
05957 const Vector<int, VectFull, Allocator2>& P,
05958 Vector<complex<float>, VectFull, Allocator3>& x,
05959 const Vector<complex<float>, VectFull,
05960 Allocator4>& b,
05961 float& ferr, float& berr,
05962 LapackInfo& info = lapack_info)
05963 {
05964
05965 #ifdef SELDON_CHECK_DIMENSIONS
05966 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05967 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05968 #endif
05969
05970 int m = A.GetM();
05971 int nrhs = 1;
05972 char uplo('L');
05973 Vector<complex<float>, VectFull, Allocator3> work(2*m);
05974 Vector<float> rwork(m);
05975 csyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
05976 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
05977 &berr, work.GetData(), rwork.GetData(),
05978 &info.GetInfoRef() );
05979 }
05980
05981
05982 template <class Prop0, class Allocator0,
05983 class Allocator1, class Allocator2,
05984 class Allocator3, class Allocator4>
05985 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
05986 RowSym, Allocator0>& A,
05987 const Matrix<complex<double>, Prop0,
05988 RowSym, Allocator1>& Alu,
05989 const Vector<int, VectFull, Allocator2>& P,
05990 Vector<complex<double>, VectFull, Allocator3>& x,
05991 const Vector<complex<double>, VectFull,
05992 Allocator4>& b,
05993 double& ferr, double& berr,
05994 LapackInfo& info = lapack_info)
05995 {
05996
05997 #ifdef SELDON_CHECK_DIMENSIONS
05998 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
05999 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06000 #endif
06001
06002 int m = A.GetM();
06003 int nrhs = 1;
06004 char uplo('L');
06005 Vector<complex<double>, VectFull, Allocator3> work(2*m);
06006 Vector<double> rwork(m);
06007 zsyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
06008 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06009 &berr, work.GetData(), rwork.GetData(),
06010 &info.GetInfoRef() );
06011 }
06012
06013
06014
06015
06016
06017 template <class Prop0, class Allocator0,
06018 class Allocator1, class Allocator2,
06019 class Allocator3, class Allocator4>
06020 void RefineSolutionLU(const Matrix<float, Prop0, RowSymPacked,
06021 Allocator0>& A,
06022 const Matrix<float, Prop0, RowSymPacked,
06023 Allocator1>& Alu,
06024 const Vector<int, VectFull, Allocator2>& P,
06025 Vector<float, VectFull, Allocator3>& x,
06026 const Vector<float, VectFull, Allocator4>& b,
06027 float& ferr, float& berr,
06028 LapackInfo& info = lapack_info)
06029 {
06030
06031 #ifdef SELDON_CHECK_DIMENSIONS
06032 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06033 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06034 #endif
06035
06036 int m = A.GetM();
06037 int nrhs = 1;
06038 char uplo('L');
06039 Vector<float, VectFull, Allocator3> work(3*m);
06040 Vector<int> iwork(m);
06041 ssprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
06042 P.GetData(), b.GetData(), &m, x.GetData(), &m,
06043 &ferr, &berr, work.GetData(),
06044 iwork.GetData(), &info.GetInfoRef() );
06045 }
06046
06047
06048 template <class Prop0, class Allocator0,
06049 class Allocator1, class Allocator2,
06050 class Allocator3, class Allocator4>
06051 void RefineSolutionLU(const Matrix<double, Prop0, RowSymPacked,
06052 Allocator0>& A,
06053 const Matrix<double, Prop0, RowSymPacked,
06054 Allocator1>& Alu,
06055 const Vector<int, VectFull, Allocator2>& P,
06056 Vector<double, VectFull, Allocator3>& x,
06057 const Vector<double, VectFull, Allocator4>& b,
06058 double& ferr, double& berr,
06059 LapackInfo& info = lapack_info)
06060 {
06061
06062 #ifdef SELDON_CHECK_DIMENSIONS
06063 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06064 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06065 #endif
06066
06067 int m = A.GetM();
06068 int nrhs = 1;
06069 char uplo('L');
06070 Vector<double, VectFull, Allocator3> work(3*m);
06071 Vector<int> iwork(m);
06072 dsprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
06073 P.GetData(), b.GetData(), &m, x.GetData(), &m,
06074 &ferr, &berr, work.GetData(),
06075 iwork.GetData(), &info.GetInfoRef() );
06076 }
06077
06078
06079 template <class Prop0, class Allocator0,
06080 class Allocator1, class Allocator2,
06081 class Allocator3, class Allocator4>
06082 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
06083 RowSymPacked, Allocator0>& A,
06084 const Matrix<complex<float>, Prop0,
06085 RowSymPacked, Allocator1>& Alu,
06086 const Vector<int, VectFull, Allocator2>& P,
06087 Vector<complex<float>, VectFull, Allocator3>& x,
06088 const Vector<complex<float>, VectFull,
06089 Allocator4>& b,
06090 float& ferr, float& berr,
06091 LapackInfo& info = lapack_info)
06092 {
06093
06094 #ifdef SELDON_CHECK_DIMENSIONS
06095 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06096 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06097 #endif
06098
06099 int m = A.GetM();
06100 int nrhs = 1;
06101 char uplo('L');
06102 Vector<complex<float>, VectFull, Allocator3> work(2*m);
06103 Vector<float> rwork(m);
06104 csprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
06105 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06106 &berr, work.GetData(), rwork.GetData(),
06107 &info.GetInfoRef() );
06108 }
06109
06110
06111 template <class Prop0, class Allocator0,
06112 class Allocator1, class Allocator2,
06113 class Allocator3, class Allocator4>
06114 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
06115 RowSymPacked, Allocator0>& A,
06116 const Matrix<complex<double>, Prop0,
06117 RowSymPacked, Allocator1>& Alu,
06118 const Vector<int, VectFull, Allocator2>& P,
06119 Vector<complex<double>, VectFull, Allocator3>& x,
06120 const Vector<complex<double>, VectFull,
06121 Allocator4>& b,
06122 double& ferr, double& berr,
06123 LapackInfo& info = lapack_info)
06124 {
06125
06126 #ifdef SELDON_CHECK_DIMENSIONS
06127 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06128 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06129 #endif
06130
06131 int m = A.GetM();
06132 int nrhs = 1;
06133 char uplo('L');
06134 Vector<complex<double>, VectFull, Allocator3> work(2*m);
06135 Vector<double> rwork(m);
06136 zsprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
06137 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06138 &berr, work.GetData(), rwork.GetData(),
06139 &info.GetInfoRef() );
06140 }
06141
06142
06143
06144
06145
06146 template <class Prop0, class Allocator0,
06147 class Allocator1, class Allocator2,
06148 class Allocator3, class Allocator4>
06149 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
06150 ColHerm, Allocator0>& A,
06151 const Matrix<complex<float>, Prop0,
06152 ColHerm, Allocator1>& Alu,
06153 const Vector<int, VectFull, Allocator2>& P,
06154 Vector<complex<float>, VectFull, Allocator3>& x,
06155 const Vector<complex<float>, VectFull,
06156 Allocator4>& b,
06157 float& ferr, float& berr,
06158 LapackInfo& info = lapack_info)
06159 {
06160
06161 #ifdef SELDON_CHECK_DIMENSIONS
06162 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06163 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06164 #endif
06165
06166 int m = A.GetM();
06167 int nrhs = 1;
06168 char uplo('U');
06169 Vector<complex<float>, VectFull, Allocator3> work(2*m);
06170 Vector<float> rwork(m);
06171 cherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
06172 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06173 &berr, work.GetData(), rwork.GetData(),
06174 &info.GetInfoRef() );
06175 }
06176
06177
06178 template <class Prop0, class Allocator0,
06179 class Allocator1, class Allocator2,
06180 class Allocator3, class Allocator4>
06181 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
06182 ColHerm, Allocator0>& A,
06183 const Matrix<complex<double>, Prop0,
06184 ColHerm, Allocator1>& Alu,
06185 const Vector<int, VectFull, Allocator2>& P,
06186 Vector<complex<double>, VectFull, Allocator3>& x,
06187 const Vector<complex<double>, VectFull,
06188 Allocator4>& b,
06189 double& ferr, double& berr,
06190 LapackInfo& info = lapack_info)
06191 {
06192
06193 #ifdef SELDON_CHECK_DIMENSIONS
06194 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06195 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06196 #endif
06197
06198 int m = A.GetM();
06199 int nrhs = 1;
06200 char uplo('U');
06201 Vector<complex<double>, VectFull, Allocator3> work(2*m);
06202 Vector<double> rwork(m);
06203 zherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
06204 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06205 &berr, work.GetData(), rwork.GetData(),
06206 &info.GetInfoRef() );
06207 }
06208
06209
06210
06211
06212
06213 template <class Prop0, class Allocator0,
06214 class Allocator1, class Allocator2,
06215 class Allocator3, class Allocator4>
06216 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
06217 ColHermPacked, Allocator0>& A,
06218 const Matrix<complex<float>, Prop0,
06219 ColHermPacked, Allocator1>& Alu,
06220 const Vector<int, VectFull, Allocator2>& P,
06221 Vector<complex<float>, VectFull, Allocator3>& x,
06222 const Vector<complex<float>, VectFull,
06223 Allocator4>& b,
06224 float& ferr, float& berr,
06225 LapackInfo& info = lapack_info)
06226 {
06227
06228 #ifdef SELDON_CHECK_DIMENSIONS
06229 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06230 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06231 #endif
06232
06233 int m = A.GetM();
06234 int nrhs = 1;
06235 char uplo('U');
06236 Vector<complex<float>, VectFull, Allocator3> work(2*m);
06237 Vector<float> rwork(m);
06238 chprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
06239 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06240 &berr, work.GetData(), rwork.GetData(),
06241 &info.GetInfoRef() );
06242 }
06243
06244
06245 template <class Prop0, class Allocator0,
06246 class Allocator1, class Allocator2,
06247 class Allocator3, class Allocator4>
06248 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
06249 ColHermPacked, Allocator0>& A,
06250 const Matrix<complex<double>, Prop0,
06251 ColHermPacked, Allocator1>& Alu,
06252 const Vector<int, VectFull, Allocator2>& P,
06253 Vector<complex<double>, VectFull, Allocator3>& x,
06254 const Vector<complex<double>, VectFull,
06255 Allocator4>& b,
06256 double& ferr, double& berr,
06257 LapackInfo& info = lapack_info)
06258 {
06259
06260 #ifdef SELDON_CHECK_DIMENSIONS
06261 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06262 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06263 #endif
06264
06265 int m = A.GetM();
06266 int nrhs = 1;
06267 char uplo('U');
06268 Vector<complex<double>, VectFull, Allocator3> work(2*m);
06269 Vector<double> rwork(m);
06270 zhprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
06271 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06272 &berr, work.GetData(), rwork.GetData(),
06273 &info.GetInfoRef() );
06274 }
06275
06276
06277
06278
06279
06280 template <class Prop0, class Allocator0,
06281 class Allocator1, class Allocator2,
06282 class Allocator3, class Allocator4>
06283 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
06284 RowHerm, Allocator0>& A,
06285 const Matrix<complex<float>, Prop0,
06286 RowHerm, Allocator1>& Alu,
06287 const Vector<int, VectFull, Allocator2>& P,
06288 Vector<complex<float>, VectFull, Allocator3>& x,
06289 Vector<complex<float>, VectFull,
06290 Allocator4>& b,
06291 float& ferr, float& berr,
06292 LapackInfo& info = lapack_info)
06293 {
06294
06295 #ifdef SELDON_CHECK_DIMENSIONS
06296 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06297 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06298 #endif
06299
06300 int m = A.GetM();
06301 int nrhs = 1;
06302 char uplo('L');
06303 Vector<complex<float>, VectFull, Allocator3> work(2*m);
06304 Vector<float> rwork(m);
06305 Conjugate(b); Conjugate(x);
06306 cherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
06307 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06308 &berr, work.GetData(), rwork.GetData(),
06309 &info.GetInfoRef() );
06310 Conjugate(b); Conjugate(x);
06311 }
06312
06313
06314 template <class Prop0, class Allocator0,
06315 class Allocator1, class Allocator2,
06316 class Allocator3, class Allocator4>
06317 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
06318 RowHerm, Allocator0>& A,
06319 const Matrix<complex<double>, Prop0,
06320 RowHerm, Allocator1>& Alu,
06321 const Vector<int, VectFull, Allocator2>& P,
06322 Vector<complex<double>, VectFull, Allocator3>& x,
06323 Vector<complex<double>, VectFull,
06324 Allocator4>& b,
06325 double& ferr, double& berr,
06326 LapackInfo& info = lapack_info)
06327 {
06328
06329 #ifdef SELDON_CHECK_DIMENSIONS
06330 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06331 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06332 #endif
06333
06334 int m = A.GetM();
06335 int nrhs = 1;
06336 char uplo('L');
06337 Vector<complex<double>, VectFull, Allocator3> work(2*m);
06338 Vector<double> rwork(m);
06339 Conjugate(b); Conjugate(x);
06340 zherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
06341 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06342 &berr, work.GetData(), rwork.GetData(),
06343 &info.GetInfoRef() );
06344 Conjugate(b); Conjugate(x);
06345 }
06346
06347
06348
06349
06350
06351 template <class Prop0, class Allocator0,
06352 class Allocator1, class Allocator2,
06353 class Allocator3, class Allocator4>
06354 void RefineSolutionLU(const Matrix<complex<float>, Prop0,
06355 RowHermPacked, Allocator0>& A,
06356 const Matrix<complex<float>, Prop0,
06357 RowHermPacked, Allocator1>& Alu,
06358 const Vector<int, VectFull, Allocator2>& P,
06359 Vector<complex<float>, VectFull, Allocator3>& x,
06360 Vector<complex<float>, VectFull,
06361 Allocator4>& b,
06362 float& ferr, float& berr,
06363 LapackInfo& info = lapack_info)
06364 {
06365
06366 #ifdef SELDON_CHECK_DIMENSIONS
06367 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06368 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06369 #endif
06370
06371 int m = A.GetM();
06372 int nrhs = 1;
06373 char uplo('L');
06374 Vector<complex<float>, VectFull, Allocator3> work(2*m);
06375 Vector<float> rwork(m);
06376 Conjugate(b); Conjugate(x);
06377 chprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
06378 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06379 &berr, work.GetData(), rwork.GetData(),
06380 &info.GetInfoRef() );
06381 Conjugate(b); Conjugate(x);
06382 }
06383
06384
06385 template <class Prop0, class Allocator0,
06386 class Allocator1, class Allocator2,
06387 class Allocator3, class Allocator4>
06388 void RefineSolutionLU(const Matrix<complex<double>, Prop0,
06389 RowHermPacked, Allocator0>& A,
06390 const Matrix<complex<double>, Prop0,
06391 RowHermPacked, Allocator1>& Alu,
06392 const Vector<int, VectFull, Allocator2>& P,
06393 Vector<complex<double>, VectFull, Allocator3>& x,
06394 Vector<complex<double>, VectFull,
06395 Allocator4>& b,
06396 double& ferr, double& berr,
06397 LapackInfo& info = lapack_info)
06398 {
06399
06400 #ifdef SELDON_CHECK_DIMENSIONS
06401 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06402 CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
06403 #endif
06404
06405 int m = A.GetM();
06406 int nrhs = 1;
06407 char uplo('L');
06408 Vector<complex<double>, VectFull, Allocator3> work(2*m);
06409 Vector<double> rwork(m);
06410 Conjugate(b); Conjugate(x);
06411 zhprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
06412 P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
06413 &berr, work.GetData(), rwork.GetData(),
06414 &info.GetInfoRef() );
06415 Conjugate(b); Conjugate(x);
06416 }
06417
06418
06419
06420
06421
06422 template <class Prop0, class Allocator0,
06423 class Allocator1, class Allocator2>
06424 void RefineSolutionLU(const Matrix<float, Prop0, ColUpTriang,
06425 Allocator0>& A,
06426 Vector<float, VectFull, Allocator1>& x,
06427 const Vector<float, VectFull, Allocator2>& b,
06428 float& ferr, float& berr,
06429 LapackInfo& info = lapack_info)
06430 {
06431
06432 #ifdef SELDON_CHECK_DIMENSIONS
06433 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06434 #endif
06435
06436 int m = A.GetM();
06437 int nrhs = 1;
06438 char uplo('U');
06439 char trans('N'); char diag('N');
06440 Vector<float, VectFull, Allocator1> work(3*m);
06441 Vector<int> iwork(m);
06442 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06443 b.GetData(), &m, x.GetData(), &m,
06444 &ferr, &berr, work.GetData(),
06445 iwork.GetData(), &info.GetInfoRef() );
06446 }
06447
06448 template <class Prop0, class Allocator0,
06449 class Allocator1, class Allocator2>
06450 void RefineSolutionLU(const Matrix<double, Prop0, ColUpTriang,
06451 Allocator0>& A,
06452 Vector<double, VectFull, Allocator1>& x,
06453 const Vector<double, VectFull, Allocator2>& b,
06454 double& ferr, double& berr,
06455 LapackInfo& info = lapack_info)
06456 {
06457
06458 #ifdef SELDON_CHECK_DIMENSIONS
06459 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06460 #endif
06461
06462 int m = A.GetM();
06463 int nrhs = 1;
06464 char uplo('U');
06465 char trans('N'); char diag('N');
06466 Vector<double, VectFull, Allocator1> work(3*m);
06467 Vector<int> iwork(m);
06468 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06469 b.GetData(), &m, x.GetData(), &m,
06470 &ferr, &berr, work.GetData(),
06471 iwork.GetData(), &info.GetInfoRef() );
06472 }
06473
06474
06475 template <class Prop0, class Allocator0,
06476 class Allocator1, class Allocator2>
06477 void
06478 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColUpTriang,
06479 Allocator0>& A,
06480 Vector<complex<float>, VectFull, Allocator1>& x,
06481 const Vector<complex<float>, VectFull, Allocator2>& b,
06482 float& ferr, float& berr,
06483 LapackInfo& info = lapack_info)
06484 {
06485
06486 #ifdef SELDON_CHECK_DIMENSIONS
06487 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06488 #endif
06489
06490 int m = A.GetM();
06491 int nrhs = 1;
06492 char uplo('U');
06493 char trans('N'); char diag('N');
06494 Vector<complex<float>, VectFull, Allocator1> work(2*m);
06495 Vector<float> rwork(m);
06496 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06497 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06498 &ferr, &berr, work.GetDataVoid(),
06499 rwork.GetData(), &info.GetInfoRef() );
06500 }
06501
06502
06503 template <class Prop0, class Allocator0,
06504 class Allocator1, class Allocator2>
06505 void
06506 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColUpTriang,
06507 Allocator0>& A,
06508 Vector<complex<double>, VectFull, Allocator1>& x,
06509 const Vector<complex<double>, VectFull, Allocator2>& b,
06510 double& ferr, double& berr,
06511 LapackInfo& info = lapack_info)
06512 {
06513
06514 #ifdef SELDON_CHECK_DIMENSIONS
06515 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06516 #endif
06517
06518 int m = A.GetM();
06519 int nrhs = 1;
06520 char uplo('U');
06521 char trans('N'); char diag('N');
06522 Vector<complex<double>, VectFull, Allocator1> work(2*m);
06523 Vector<double> rwork(m);
06524 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06525 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06526 &ferr, &berr, work.GetDataVoid(),
06527 rwork.GetData(), &info.GetInfoRef() );
06528 }
06529
06530
06531
06532
06533
06534 template <class Prop0, class Allocator0,
06535 class Allocator1, class Allocator2>
06536 void
06537 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06538 const Matrix<float, Prop0, ColUpTriang,
06539 Allocator0>& A,
06540 Vector<float, VectFull, Allocator1>& x,
06541 const Vector<float, VectFull, Allocator2>& b,
06542 float& ferr, float& berr,
06543 LapackInfo& info = lapack_info)
06544 {
06545
06546 #ifdef SELDON_CHECK_DIMENSIONS
06547 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06548 #endif
06549
06550 int m = A.GetM();
06551 int nrhs = 1;
06552 char uplo('U');
06553 char trans = TransA.Char(); char diag = DiagA.Char();
06554 Vector<float, VectFull, Allocator1> work(3*m);
06555 Vector<int> iwork(m);
06556 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06557 b.GetData(), &m, x.GetData(), &m,
06558 &ferr, &berr, work.GetData(),
06559 iwork.GetData(), &info.GetInfoRef() );
06560 }
06561
06562 template <class Prop0, class Allocator0,
06563 class Allocator1, class Allocator2>
06564 void
06565 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06566 const Matrix<double, Prop0, ColUpTriang,
06567 Allocator0>& A,
06568 Vector<double, VectFull, Allocator1>& x,
06569 const Vector<double, VectFull, Allocator2>& b,
06570 double& ferr, double& berr,
06571 LapackInfo& info = lapack_info)
06572 {
06573
06574 #ifdef SELDON_CHECK_DIMENSIONS
06575 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06576 #endif
06577
06578 int m = A.GetM();
06579 int nrhs = 1;
06580 char uplo('U');
06581 char trans = TransA.Char(); char diag = DiagA.Char();
06582 Vector<double, VectFull, Allocator1> work(3*m);
06583 Vector<int> iwork(m);
06584 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06585 b.GetData(), &m, x.GetData(), &m,
06586 &ferr, &berr, work.GetData(),
06587 iwork.GetData(), &info.GetInfoRef() );
06588 }
06589
06590
06591 template <class Prop0, class Allocator0,
06592 class Allocator1, class Allocator2>
06593 void
06594 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06595 const Matrix<complex<float>, Prop0, ColUpTriang,
06596 Allocator0>& A,
06597 Vector<complex<float>, VectFull, Allocator1>& x,
06598 const Vector<complex<float>, VectFull, Allocator2>& b,
06599 float& ferr, float& berr,
06600 LapackInfo& info = lapack_info)
06601 {
06602
06603 #ifdef SELDON_CHECK_DIMENSIONS
06604 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06605 #endif
06606
06607 int m = A.GetM();
06608 int nrhs = 1;
06609 char uplo('U');
06610 char trans = TransA.Char(); char diag = DiagA.Char();
06611 Vector<complex<float>, VectFull, Allocator1> work(2*m);
06612 Vector<float> rwork(m);
06613 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06614 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06615 &ferr, &berr, work.GetDataVoid(),
06616 rwork.GetData(), &info.GetInfoRef() );
06617 }
06618
06619
06620 template <class Prop0, class Allocator0,
06621 class Allocator1, class Allocator2>
06622 void
06623 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06624 const Matrix<complex<double>, Prop0, ColUpTriang,
06625 Allocator0>& A,
06626 Vector<complex<double>, VectFull, Allocator1>& x,
06627 const Vector<complex<double>, VectFull, Allocator2>& b,
06628 double& ferr, double& berr,
06629 LapackInfo& info = lapack_info)
06630 {
06631
06632 #ifdef SELDON_CHECK_DIMENSIONS
06633 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06634 #endif
06635
06636 int m = A.GetM();
06637 int nrhs = 1;
06638 char uplo('U');
06639 char trans = TransA.Char(); char diag = DiagA.Char();
06640 Vector<complex<double>, VectFull, Allocator1> work(2*m);
06641 Vector<double> rwork(m);
06642 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06643 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06644 &ferr, &berr, work.GetDataVoid(),
06645 rwork.GetData(), &info.GetInfoRef() );
06646 }
06647
06648
06649
06650
06651
06652 template <class Prop0, class Allocator0,
06653 class Allocator1, class Allocator2>
06654 void RefineSolutionLU(const Matrix<float, Prop0, ColLoTriang,
06655 Allocator0>& A,
06656 Vector<float, VectFull, Allocator1>& x,
06657 const Vector<float, VectFull, Allocator2>& b,
06658 float& ferr, float& berr,
06659 LapackInfo& info = lapack_info)
06660 {
06661
06662 #ifdef SELDON_CHECK_DIMENSIONS
06663 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06664 #endif
06665
06666 int m = A.GetM();
06667 int nrhs = 1;
06668 char uplo('L');
06669 char trans('N'); char diag('N');
06670 Vector<float, VectFull, Allocator1> work(3*m);
06671 Vector<int> iwork(m);
06672 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06673 b.GetData(), &m, x.GetData(), &m,
06674 &ferr, &berr, work.GetData(),
06675 iwork.GetData(), &info.GetInfoRef() );
06676 }
06677
06678 template <class Prop0, class Allocator0,
06679 class Allocator1, class Allocator2>
06680 void RefineSolutionLU(const Matrix<double, Prop0, ColLoTriang,
06681 Allocator0>& A,
06682 Vector<double, VectFull, Allocator1>& x,
06683 const Vector<double, VectFull, Allocator2>& b,
06684 double& ferr, double& berr,
06685 LapackInfo& info = lapack_info)
06686 {
06687
06688 #ifdef SELDON_CHECK_DIMENSIONS
06689 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06690 #endif
06691
06692 int m = A.GetM();
06693 int nrhs = 1;
06694 char uplo('L');
06695 char trans('N'); char diag('N');
06696 Vector<double, VectFull, Allocator1> work(3*m);
06697 Vector<int> iwork(m);
06698 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06699 b.GetData(), &m, x.GetData(), &m,
06700 &ferr, &berr, work.GetData(),
06701 iwork.GetData(), &info.GetInfoRef() );
06702 }
06703
06704
06705 template <class Prop0, class Allocator0,
06706 class Allocator1, class Allocator2>
06707 void
06708 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColLoTriang,
06709 Allocator0>& A,
06710 Vector<complex<float>, VectFull, Allocator1>& x,
06711 const Vector<complex<float>, VectFull, Allocator2>& b,
06712 float& ferr, float& berr,
06713 LapackInfo& info = lapack_info)
06714 {
06715
06716 #ifdef SELDON_CHECK_DIMENSIONS
06717 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06718 #endif
06719
06720 int m = A.GetM();
06721 int nrhs = 1;
06722 char uplo('L');
06723 char trans('N'); char diag('N');
06724 Vector<complex<float>, VectFull, Allocator1> work(2*m);
06725 Vector<float> rwork(m);
06726 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06727 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06728 &ferr, &berr, work.GetDataVoid(),
06729 rwork.GetData(), &info.GetInfoRef() );
06730 }
06731
06732
06733 template <class Prop0, class Allocator0,
06734 class Allocator1, class Allocator2>
06735 void
06736 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColLoTriang,
06737 Allocator0>& A,
06738 Vector<complex<double>, VectFull, Allocator1>& x,
06739 const Vector<complex<double>, VectFull, Allocator2>& b,
06740 double& ferr, double& berr,
06741 LapackInfo& info = lapack_info)
06742 {
06743
06744 #ifdef SELDON_CHECK_DIMENSIONS
06745 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06746 #endif
06747
06748 int m = A.GetM();
06749 int nrhs = 1;
06750 char uplo('L');
06751 char trans('N'); char diag('N');
06752 Vector<complex<double>, VectFull, Allocator1> work(2*m);
06753 Vector<double> rwork(m);
06754 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06755 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06756 &ferr, &berr, work.GetDataVoid(),
06757 rwork.GetData(), &info.GetInfoRef() );
06758 }
06759
06760
06761
06762
06763
06764 template <class Prop0, class Allocator0,
06765 class Allocator1, class Allocator2>
06766 void
06767 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06768 const Matrix<float, Prop0, ColLoTriang,
06769 Allocator0>& A,
06770 Vector<float, VectFull, Allocator1>& x,
06771 const Vector<float, VectFull, Allocator2>& b,
06772 float& ferr, float& berr,
06773 LapackInfo& info = lapack_info)
06774 {
06775
06776 #ifdef SELDON_CHECK_DIMENSIONS
06777 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06778 #endif
06779
06780 int m = A.GetM();
06781 int nrhs = 1;
06782 char uplo('L');
06783 char trans = TransA.Char(); char diag = DiagA.Char();
06784 Vector<float, VectFull, Allocator1> work(3*m);
06785 Vector<int> iwork(m);
06786 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06787 b.GetData(), &m, x.GetData(), &m,
06788 &ferr, &berr, work.GetData(),
06789 iwork.GetData(), &info.GetInfoRef() );
06790 }
06791
06792 template <class Prop0, class Allocator0,
06793 class Allocator1, class Allocator2>
06794 void
06795 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06796 const Matrix<double, Prop0, ColLoTriang,
06797 Allocator0>& A,
06798 Vector<double, VectFull, Allocator1>& x,
06799 const Vector<double, VectFull, Allocator2>& b,
06800 double& ferr, double& berr,
06801 LapackInfo& info = lapack_info)
06802 {
06803
06804 #ifdef SELDON_CHECK_DIMENSIONS
06805 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06806 #endif
06807
06808 int m = A.GetM();
06809 int nrhs = 1;
06810 char uplo('L');
06811 char trans = TransA.Char(); char diag = DiagA.Char();
06812 Vector<double, VectFull, Allocator1> work(3*m);
06813 Vector<int> iwork(m);
06814 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
06815 b.GetData(), &m, x.GetData(), &m,
06816 &ferr, &berr, work.GetData(),
06817 iwork.GetData(), &info.GetInfoRef() );
06818 }
06819
06820
06821 template <class Prop0, class Allocator0,
06822 class Allocator1, class Allocator2>
06823 void
06824 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06825 const Matrix<complex<float>, Prop0, ColLoTriang,
06826 Allocator0>& A,
06827 Vector<complex<float>, VectFull, Allocator1>& x,
06828 const Vector<complex<float>, VectFull, Allocator2>& b,
06829 float& ferr, float& berr,
06830 LapackInfo& info = lapack_info)
06831 {
06832
06833 #ifdef SELDON_CHECK_DIMENSIONS
06834 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06835 #endif
06836
06837 int m = A.GetM();
06838 int nrhs = 1;
06839 char uplo('L');
06840 char trans = TransA.Char(); char diag = DiagA.Char();
06841 Vector<complex<float>, VectFull, Allocator1> work(2*m);
06842 Vector<float> rwork(m);
06843 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06844 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06845 &ferr, &berr, work.GetDataVoid(),
06846 rwork.GetData(), &info.GetInfoRef() );
06847 }
06848
06849
06850 template <class Prop0, class Allocator0,
06851 class Allocator1, class Allocator2>
06852 void
06853 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06854 const Matrix<complex<double>, Prop0, ColLoTriang,
06855 Allocator0>& A,
06856 Vector<complex<double>, VectFull, Allocator1>& x,
06857 const Vector<complex<double>, VectFull, Allocator2>& b,
06858 double& ferr, double& berr,
06859 LapackInfo& info = lapack_info)
06860 {
06861
06862 #ifdef SELDON_CHECK_DIMENSIONS
06863 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06864 #endif
06865
06866 int m = A.GetM();
06867 int nrhs = 1;
06868 char uplo('L');
06869 char trans = TransA.Char(); char diag = DiagA.Char();
06870 Vector<complex<double>, VectFull, Allocator1> work(2*m);
06871 Vector<double> rwork(m);
06872 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
06873 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06874 &ferr, &berr, work.GetDataVoid(),
06875 rwork.GetData(), &info.GetInfoRef() );
06876 }
06877
06878
06879
06880
06881
06882 template <class Prop0, class Allocator0,
06883 class Allocator1, class Allocator2>
06884 void RefineSolutionLU(const Matrix<float, Prop0, ColUpTriangPacked,
06885 Allocator0>& A,
06886 Vector<float, VectFull, Allocator1>& x,
06887 const Vector<float, VectFull, Allocator2>& b,
06888 float& ferr, float& berr,
06889 LapackInfo& info = lapack_info)
06890 {
06891
06892 #ifdef SELDON_CHECK_DIMENSIONS
06893 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06894 #endif
06895
06896 int m = A.GetM();
06897 int nrhs = 1;
06898 char uplo('U');
06899 char trans('N'); char diag('N');
06900 Vector<float, VectFull, Allocator1> work(3*m);
06901 Vector<int> iwork(m);
06902 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
06903 b.GetData(), &m, x.GetData(), &m,
06904 &ferr, &berr, work.GetData(),
06905 iwork.GetData(), &info.GetInfoRef() );
06906 }
06907
06908 template <class Prop0, class Allocator0,
06909 class Allocator1, class Allocator2>
06910 void RefineSolutionLU(const Matrix<double, Prop0, ColUpTriangPacked,
06911 Allocator0>& A,
06912 Vector<double, VectFull, Allocator1>& x,
06913 const Vector<double, VectFull, Allocator2>& b,
06914 double& ferr, double& berr,
06915 LapackInfo& info = lapack_info)
06916 {
06917
06918 #ifdef SELDON_CHECK_DIMENSIONS
06919 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06920 #endif
06921
06922 int m = A.GetM();
06923 int nrhs = 1;
06924 char uplo('U');
06925 char trans('N'); char diag('N');
06926 Vector<double, VectFull, Allocator1> work(3*m);
06927 Vector<int> iwork(m);
06928 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
06929 b.GetData(), &m, x.GetData(), &m,
06930 &ferr, &berr, work.GetData(),
06931 iwork.GetData(), &info.GetInfoRef() );
06932 }
06933
06934
06935 template <class Prop0, class Allocator0,
06936 class Allocator1, class Allocator2>
06937 void
06938 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColUpTriangPacked,
06939 Allocator0>& A,
06940 Vector<complex<float>, VectFull, Allocator1>& x,
06941 const Vector<complex<float>, VectFull, Allocator2>& b,
06942 float& ferr, float& berr,
06943 LapackInfo& info = lapack_info)
06944 {
06945
06946 #ifdef SELDON_CHECK_DIMENSIONS
06947 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06948 #endif
06949
06950 int m = A.GetM();
06951 int nrhs = 1;
06952 char uplo('U');
06953 char trans('N'); char diag('N');
06954 Vector<complex<float>, VectFull, Allocator1> work(2*m);
06955 Vector<float> rwork(m);
06956 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
06957 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06958 &ferr, &berr, work.GetDataVoid(),
06959 rwork.GetData(), &info.GetInfoRef() );
06960 }
06961
06962
06963 template <class Prop0, class Allocator0,
06964 class Allocator1, class Allocator2>
06965 void
06966 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColUpTriangPacked,
06967 Allocator0>& A,
06968 Vector<complex<double>, VectFull, Allocator1>& x,
06969 const Vector<complex<double>, VectFull, Allocator2>& b,
06970 double& ferr, double& berr,
06971 LapackInfo& info = lapack_info)
06972 {
06973
06974 #ifdef SELDON_CHECK_DIMENSIONS
06975 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
06976 #endif
06977
06978 int m = A.GetM();
06979 int nrhs = 1;
06980 char uplo('U');
06981 char trans('N'); char diag('N');
06982 Vector<complex<double>, VectFull, Allocator1> work(2*m);
06983 Vector<double> rwork(m);
06984 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
06985 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
06986 &ferr, &berr, work.GetDataVoid(),
06987 rwork.GetData(), &info.GetInfoRef() );
06988 }
06989
06990
06991
06992
06993
06994 template <class Prop0, class Allocator0,
06995 class Allocator1, class Allocator2>
06996 void
06997 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
06998 const Matrix<float, Prop0, ColUpTriangPacked,
06999 Allocator0>& A,
07000 Vector<float, VectFull, Allocator1>& x,
07001 const Vector<float, VectFull, Allocator2>& b,
07002 float& ferr, float& berr,
07003 LapackInfo& info = lapack_info)
07004 {
07005
07006 #ifdef SELDON_CHECK_DIMENSIONS
07007 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07008 #endif
07009
07010 int m = A.GetM();
07011 int nrhs = 1;
07012 char uplo('U');
07013 char trans = TransA.Char(); char diag = DiagA.Char();
07014 Vector<float, VectFull, Allocator1> work(3*m);
07015 Vector<int> iwork(m);
07016 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07017 b.GetData(), &m, x.GetData(), &m,
07018 &ferr, &berr, work.GetData(),
07019 iwork.GetData(), &info.GetInfoRef() );
07020 }
07021
07022 template <class Prop0, class Allocator0,
07023 class Allocator1, class Allocator2>
07024 void
07025 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07026 const Matrix<double, Prop0, ColUpTriangPacked,
07027 Allocator0>& A,
07028 Vector<double, VectFull, Allocator1>& x,
07029 const Vector<double, VectFull, Allocator2>& b,
07030 double& ferr, double& berr,
07031 LapackInfo& info = lapack_info)
07032 {
07033
07034 #ifdef SELDON_CHECK_DIMENSIONS
07035 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07036 #endif
07037
07038 int m = A.GetM();
07039 int nrhs = 1;
07040 char uplo('U');
07041 char trans = TransA.Char(); char diag = DiagA.Char();
07042 Vector<double, VectFull, Allocator1> work(3*m);
07043 Vector<int> iwork(m);
07044 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07045 b.GetData(), &m, x.GetData(), &m,
07046 &ferr, &berr, work.GetData(),
07047 iwork.GetData(), &info.GetInfoRef() );
07048 }
07049
07050
07051 template <class Prop0, class Allocator0,
07052 class Allocator1, class Allocator2>
07053 void
07054 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07055 const Matrix<complex<float>, Prop0, ColUpTriangPacked,
07056 Allocator0>& A,
07057 Vector<complex<float>, VectFull, Allocator1>& x,
07058 const Vector<complex<float>, VectFull, Allocator2>& b,
07059 float& ferr, float& berr,
07060 LapackInfo& info = lapack_info)
07061 {
07062
07063 #ifdef SELDON_CHECK_DIMENSIONS
07064 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07065 #endif
07066
07067 int m = A.GetM();
07068 int nrhs = 1;
07069 char uplo('U');
07070 char trans = TransA.Char(); char diag = DiagA.Char();
07071 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07072 Vector<float> rwork(m);
07073 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07074 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07075 &ferr, &berr, work.GetDataVoid(),
07076 rwork.GetData(), &info.GetInfoRef() );
07077 }
07078
07079
07080 template <class Prop0, class Allocator0,
07081 class Allocator1, class Allocator2>
07082 void
07083 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07084 const Matrix<complex<double>, Prop0, ColUpTriangPacked,
07085 Allocator0>& A,
07086 Vector<complex<double>, VectFull, Allocator1>& x,
07087 const Vector<complex<double>, VectFull, Allocator2>& b,
07088 double& ferr, double& berr,
07089 LapackInfo& info = lapack_info)
07090 {
07091
07092 #ifdef SELDON_CHECK_DIMENSIONS
07093 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07094 #endif
07095
07096 int m = A.GetM();
07097 int nrhs = 1;
07098 char uplo('U');
07099 char trans = TransA.Char(); char diag = DiagA.Char();
07100 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07101 Vector<double> rwork(m);
07102 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07103 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07104 &ferr, &berr, work.GetDataVoid(),
07105 rwork.GetData(), &info.GetInfoRef() );
07106 }
07107
07108
07109
07110
07111
07112 template <class Prop0, class Allocator0,
07113 class Allocator1, class Allocator2>
07114 void RefineSolutionLU(const Matrix<float, Prop0, ColLoTriangPacked,
07115 Allocator0>& A,
07116 Vector<float, VectFull, Allocator1>& x,
07117 const Vector<float, VectFull, Allocator2>& b,
07118 float& ferr, float& berr,
07119 LapackInfo& info = lapack_info)
07120 {
07121
07122 #ifdef SELDON_CHECK_DIMENSIONS
07123 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07124 #endif
07125
07126 int m = A.GetM();
07127 int nrhs = 1;
07128 char uplo('L');
07129 char trans('N'); char diag('N');
07130 Vector<float, VectFull, Allocator1> work(3*m);
07131 Vector<int> iwork(m);
07132 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07133 b.GetData(), &m, x.GetData(), &m,
07134 &ferr, &berr, work.GetData(),
07135 iwork.GetData(), &info.GetInfoRef() );
07136 }
07137
07138 template <class Prop0, class Allocator0,
07139 class Allocator1, class Allocator2>
07140 void RefineSolutionLU(const Matrix<double, Prop0, ColLoTriangPacked,
07141 Allocator0>& A,
07142 Vector<double, VectFull, Allocator1>& x,
07143 const Vector<double, VectFull, Allocator2>& b,
07144 double& ferr, double& berr,
07145 LapackInfo& info = lapack_info)
07146 {
07147
07148 #ifdef SELDON_CHECK_DIMENSIONS
07149 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07150 #endif
07151
07152 int m = A.GetM();
07153 int nrhs = 1;
07154 char uplo('L');
07155 char trans('N'); char diag('N');
07156 Vector<double, VectFull, Allocator1> work(3*m);
07157 Vector<int> iwork(m);
07158 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07159 b.GetData(), &m, x.GetData(), &m,
07160 &ferr, &berr, work.GetData(),
07161 iwork.GetData(), &info.GetInfoRef() );
07162 }
07163
07164
07165 template <class Prop0, class Allocator0,
07166 class Allocator1, class Allocator2>
07167 void
07168 RefineSolutionLU(const Matrix<complex<float>, Prop0, ColLoTriangPacked,
07169 Allocator0>& A,
07170 Vector<complex<float>, VectFull, Allocator1>& x,
07171 const Vector<complex<float>, VectFull, Allocator2>& b,
07172 float& ferr, float& berr,
07173 LapackInfo& info = lapack_info)
07174 {
07175
07176 #ifdef SELDON_CHECK_DIMENSIONS
07177 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07178 #endif
07179
07180 int m = A.GetM();
07181 int nrhs = 1;
07182 char uplo('L');
07183 char trans('N'); char diag('N');
07184 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07185 Vector<float> rwork(m);
07186 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07187 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07188 &ferr, &berr, work.GetDataVoid(),
07189 rwork.GetData(), &info.GetInfoRef() );
07190 }
07191
07192
07193 template <class Prop0, class Allocator0,
07194 class Allocator1, class Allocator2>
07195 void
07196 RefineSolutionLU(const Matrix<complex<double>, Prop0, ColLoTriangPacked,
07197 Allocator0>& A,
07198 Vector<complex<double>, VectFull, Allocator1>& x,
07199 const Vector<complex<double>, VectFull, Allocator2>& b,
07200 double& ferr, double& berr,
07201 LapackInfo& info = lapack_info)
07202 {
07203
07204 #ifdef SELDON_CHECK_DIMENSIONS
07205 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07206 #endif
07207
07208 int m = A.GetM();
07209 int nrhs = 1;
07210 char uplo('L');
07211 char trans('N'); char diag('N');
07212 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07213 Vector<double> rwork(m);
07214 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07215 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07216 &ferr, &berr, work.GetDataVoid(),
07217 rwork.GetData(), &info.GetInfoRef() );
07218 }
07219
07220
07221
07222
07223
07224 template <class Prop0, class Allocator0,
07225 class Allocator1, class Allocator2>
07226 void
07227 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07228 const Matrix<float, Prop0, ColLoTriangPacked,
07229 Allocator0>& A,
07230 Vector<float, VectFull, Allocator1>& x,
07231 const Vector<float, VectFull, Allocator2>& b,
07232 float& ferr, float& berr,
07233 LapackInfo& info = lapack_info)
07234 {
07235
07236 #ifdef SELDON_CHECK_DIMENSIONS
07237 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07238 #endif
07239
07240 int m = A.GetM();
07241 int nrhs = 1;
07242 char uplo('L');
07243 char trans = TransA.Char(); char diag = DiagA.Char();
07244 Vector<float, VectFull, Allocator1> work(3*m);
07245 Vector<int> iwork(m);
07246 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07247 b.GetData(), &m, x.GetData(), &m,
07248 &ferr, &berr, work.GetData(),
07249 iwork.GetData(), &info.GetInfoRef() );
07250 }
07251
07252 template <class Prop0, class Allocator0,
07253 class Allocator1, class Allocator2>
07254 void
07255 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07256 const Matrix<double, Prop0, ColLoTriangPacked,
07257 Allocator0>& A,
07258 Vector<double, VectFull, Allocator1>& x,
07259 const Vector<double, VectFull, Allocator2>& b,
07260 double& ferr, double& berr,
07261 LapackInfo& info = lapack_info)
07262 {
07263
07264 #ifdef SELDON_CHECK_DIMENSIONS
07265 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07266 #endif
07267
07268 int m = A.GetM();
07269 int nrhs = 1;
07270 char uplo('L');
07271 char trans = TransA.Char(); char diag = DiagA.Char();
07272 Vector<double, VectFull, Allocator1> work(3*m);
07273 Vector<int> iwork(m);
07274 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07275 b.GetData(), &m, x.GetData(), &m,
07276 &ferr, &berr, work.GetData(),
07277 iwork.GetData(), &info.GetInfoRef() );
07278 }
07279
07280
07281 template <class Prop0, class Allocator0,
07282 class Allocator1, class Allocator2>
07283 void
07284 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07285 const Matrix<complex<float>, Prop0, ColLoTriangPacked,
07286 Allocator0>& A,
07287 Vector<complex<float>, VectFull, Allocator1>& x,
07288 const Vector<complex<float>, VectFull, Allocator2>& b,
07289 float& ferr, float& berr,
07290 LapackInfo& info = lapack_info)
07291 {
07292
07293 #ifdef SELDON_CHECK_DIMENSIONS
07294 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07295 #endif
07296
07297 int m = A.GetM();
07298 int nrhs = 1;
07299 char uplo('L');
07300 char trans = TransA.Char(); char diag = DiagA.Char();
07301 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07302 Vector<float> rwork(m);
07303 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07304 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07305 &ferr, &berr, work.GetDataVoid(),
07306 rwork.GetData(), &info.GetInfoRef() );
07307 }
07308
07309
07310 template <class Prop0, class Allocator0,
07311 class Allocator1, class Allocator2>
07312 void
07313 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07314 const Matrix<complex<double>, Prop0, ColLoTriangPacked,
07315 Allocator0>& A,
07316 Vector<complex<double>, VectFull, Allocator1>& x,
07317 const Vector<complex<double>, VectFull, Allocator2>& b,
07318 double& ferr, double& berr,
07319 LapackInfo& info = lapack_info)
07320 {
07321
07322 #ifdef SELDON_CHECK_DIMENSIONS
07323 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07324 #endif
07325
07326 int m = A.GetM();
07327 int nrhs = 1;
07328 char uplo('L');
07329 char trans = TransA.Char(); char diag = DiagA.Char();
07330 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07331 Vector<double> rwork(m);
07332 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07333 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07334 &ferr, &berr, work.GetDataVoid(),
07335 rwork.GetData(), &info.GetInfoRef() );
07336 }
07337
07338
07339
07340
07341
07342 template <class Prop0, class Allocator0,
07343 class Allocator1, class Allocator2>
07344 void RefineSolutionLU(const Matrix<float, Prop0, RowUpTriang,
07345 Allocator0>& A,
07346 Vector<float, VectFull, Allocator1>& x,
07347 const Vector<float, VectFull, Allocator2>& b,
07348 float& ferr, float& berr,
07349 LapackInfo& info = lapack_info)
07350 {
07351
07352 #ifdef SELDON_CHECK_DIMENSIONS
07353 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07354 #endif
07355
07356 int m = A.GetM();
07357 int nrhs = 1;
07358 char uplo('L');
07359 char trans('T'); char diag('N');
07360 Vector<float, VectFull, Allocator1> work(3*m);
07361 Vector<int> iwork(m);
07362 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07363 b.GetData(), &m, x.GetData(), &m,
07364 &ferr, &berr, work.GetData(),
07365 iwork.GetData(), &info.GetInfoRef() );
07366 }
07367
07368 template <class Prop0, class Allocator0,
07369 class Allocator1, class Allocator2>
07370 void RefineSolutionLU(const Matrix<double, Prop0, RowUpTriang,
07371 Allocator0>& A,
07372 Vector<double, VectFull, Allocator1>& x,
07373 const Vector<double, VectFull, Allocator2>& b,
07374 double& ferr, double& berr,
07375 LapackInfo& info = lapack_info)
07376 {
07377
07378 #ifdef SELDON_CHECK_DIMENSIONS
07379 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07380 #endif
07381
07382 int m = A.GetM();
07383 int nrhs = 1;
07384 char uplo('L');
07385 char trans('T'); char diag('N');
07386 Vector<double, VectFull, Allocator1> work(3*m);
07387 Vector<int> iwork(m);
07388 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07389 b.GetData(), &m, x.GetData(), &m,
07390 &ferr, &berr, work.GetData(),
07391 iwork.GetData(), &info.GetInfoRef() );
07392 }
07393
07394
07395 template <class Prop0, class Allocator0,
07396 class Allocator1, class Allocator2>
07397 void
07398 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowUpTriang,
07399 Allocator0>& A,
07400 Vector<complex<float>, VectFull, Allocator1>& x,
07401 const Vector<complex<float>, VectFull, Allocator2>& b,
07402 float& ferr, float& berr,
07403 LapackInfo& info = lapack_info)
07404 {
07405
07406 #ifdef SELDON_CHECK_DIMENSIONS
07407 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07408 #endif
07409
07410 int m = A.GetM();
07411 int nrhs = 1;
07412 char uplo('L');
07413 char trans('T'); char diag('N');
07414 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07415 Vector<float> rwork(m);
07416 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07417 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07418 &ferr, &berr, work.GetDataVoid(),
07419 rwork.GetData(), &info.GetInfoRef() );
07420 }
07421
07422
07423 template <class Prop0, class Allocator0,
07424 class Allocator1, class Allocator2>
07425 void
07426 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowUpTriang,
07427 Allocator0>& A,
07428 Vector<complex<double>, VectFull, Allocator1>& x,
07429 const Vector<complex<double>, VectFull, Allocator2>& b,
07430 double& ferr, double& berr,
07431 LapackInfo& info = lapack_info)
07432 {
07433
07434 #ifdef SELDON_CHECK_DIMENSIONS
07435 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07436 #endif
07437
07438 int m = A.GetM();
07439 int nrhs = 1;
07440 char uplo('L');
07441 char trans('T'); char diag('N');
07442 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07443 Vector<double> rwork(m);
07444 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07445 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07446 &ferr, &berr, work.GetDataVoid(),
07447 rwork.GetData(), &info.GetInfoRef() );
07448 }
07449
07450
07451
07452
07453
07454 template <class Prop0, class Allocator0,
07455 class Allocator1, class Allocator2>
07456 void
07457 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07458 const Matrix<float, Prop0, RowUpTriang,
07459 Allocator0>& A,
07460 Vector<float, VectFull, Allocator1>& x,
07461 const Vector<float, VectFull, Allocator2>& b,
07462 float& ferr, float& berr,
07463 LapackInfo& info = lapack_info)
07464 {
07465
07466 #ifdef SELDON_CHECK_DIMENSIONS
07467 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07468 #endif
07469
07470 int m = A.GetM();
07471 int nrhs = 1;
07472 char uplo('L');
07473 char trans = TransA.RevChar(); char diag = DiagA.Char();
07474 Vector<float, VectFull, Allocator1> work(3*m);
07475 Vector<int> iwork(m);
07476 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07477 b.GetData(), &m, x.GetData(), &m,
07478 &ferr, &berr, work.GetData(),
07479 iwork.GetData(), &info.GetInfoRef() );
07480 }
07481
07482 template <class Prop0, class Allocator0,
07483 class Allocator1, class Allocator2>
07484 void
07485 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07486 const Matrix<double, Prop0, RowUpTriang,
07487 Allocator0>& A,
07488 Vector<double, VectFull, Allocator1>& x,
07489 const Vector<double, VectFull, Allocator2>& b,
07490 double& ferr, double& berr,
07491 LapackInfo& info = lapack_info)
07492 {
07493
07494 #ifdef SELDON_CHECK_DIMENSIONS
07495 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07496 #endif
07497
07498 int m = A.GetM();
07499 int nrhs = 1;
07500 char uplo('L');
07501 char trans = TransA.RevChar(); char diag = DiagA.Char();
07502 Vector<double, VectFull, Allocator1> work(3*m);
07503 Vector<int> iwork(m);
07504 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07505 b.GetData(), &m, x.GetData(), &m,
07506 &ferr, &berr, work.GetData(),
07507 iwork.GetData(), &info.GetInfoRef() );
07508 }
07509
07510
07511 template <class Prop0, class Allocator0,
07512 class Allocator1, class Allocator2>
07513 void
07514 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07515 const Matrix<complex<float>, Prop0, RowUpTriang,
07516 Allocator0>& A,
07517 Vector<complex<float>, VectFull, Allocator1>& x,
07518 Vector<complex<float>, VectFull, Allocator2>& b,
07519 float& ferr, float& berr,
07520 LapackInfo& info = lapack_info)
07521 {
07522
07523 #ifdef SELDON_CHECK_DIMENSIONS
07524 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07525 #endif
07526
07527 int m = A.GetM();
07528 int nrhs = 1;
07529 char uplo('L');
07530 char trans = TransA.RevChar(); char diag = DiagA.Char();
07531 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07532 Vector<float> rwork(m);
07533 if (TransA.ConjTrans())
07534 {
07535 Conjugate(b);
07536 Conjugate(x);
07537 }
07538 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07539 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07540 &ferr, &berr, work.GetDataVoid(),
07541 rwork.GetData(), &info.GetInfoRef() );
07542 if (TransA.ConjTrans())
07543 {
07544 Conjugate(b);
07545 Conjugate(x);
07546 }
07547 }
07548
07549
07550 template <class Prop0, class Allocator0,
07551 class Allocator1, class Allocator2>
07552 void
07553 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07554 const Matrix<complex<double>, Prop0, RowUpTriang,
07555 Allocator0>& A,
07556 Vector<complex<double>, VectFull, Allocator1>& x,
07557 Vector<complex<double>, VectFull, Allocator2>& b,
07558 double& ferr, double& berr,
07559 LapackInfo& info = lapack_info)
07560 {
07561
07562 #ifdef SELDON_CHECK_DIMENSIONS
07563 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07564 #endif
07565
07566 int m = A.GetM();
07567 int nrhs = 1;
07568 char uplo('L');
07569 char trans = TransA.RevChar(); char diag = DiagA.Char();
07570 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07571 Vector<double> rwork(m);
07572 if (TransA.ConjTrans())
07573 {
07574 Conjugate(b);
07575 Conjugate(x);
07576 }
07577 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07578 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07579 &ferr, &berr, work.GetDataVoid(),
07580 rwork.GetData(), &info.GetInfoRef() );
07581 if (TransA.ConjTrans())
07582 {
07583 Conjugate(b);
07584 Conjugate(x);
07585 }
07586 }
07587
07588
07589
07590
07591
07592 template <class Prop0, class Allocator0,
07593 class Allocator1, class Allocator2>
07594 void RefineSolutionLU(const Matrix<float, Prop0, RowLoTriang,
07595 Allocator0>& A,
07596 Vector<float, VectFull, Allocator1>& x,
07597 const Vector<float, VectFull, Allocator2>& b,
07598 float& ferr, float& berr,
07599 LapackInfo& info = lapack_info)
07600 {
07601
07602 #ifdef SELDON_CHECK_DIMENSIONS
07603 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07604 #endif
07605
07606 int m = A.GetM();
07607 int nrhs = 1;
07608 char uplo('U');
07609 char trans('T'); char diag('N');
07610 Vector<float, VectFull, Allocator1> work(3*m);
07611 Vector<int> iwork(m);
07612 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07613 b.GetData(), &m, x.GetData(), &m,
07614 &ferr, &berr, work.GetData(),
07615 iwork.GetData(), &info.GetInfoRef() );
07616 }
07617
07618 template <class Prop0, class Allocator0,
07619 class Allocator1, class Allocator2>
07620 void RefineSolutionLU(const Matrix<double, Prop0, RowLoTriang,
07621 Allocator0>& A,
07622 Vector<double, VectFull, Allocator1>& x,
07623 const Vector<double, VectFull, Allocator2>& b,
07624 double& ferr, double& berr,
07625 LapackInfo& info = lapack_info)
07626 {
07627
07628 #ifdef SELDON_CHECK_DIMENSIONS
07629 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07630 #endif
07631
07632 int m = A.GetM();
07633 int nrhs = 1;
07634 char uplo('U');
07635 char trans('T'); char diag('N');
07636 Vector<double, VectFull, Allocator1> work(3*m);
07637 Vector<int> iwork(m);
07638 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07639 b.GetData(), &m, x.GetData(), &m,
07640 &ferr, &berr, work.GetData(),
07641 iwork.GetData(), &info.GetInfoRef() );
07642 }
07643
07644
07645 template <class Prop0, class Allocator0,
07646 class Allocator1, class Allocator2>
07647 void
07648 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowLoTriang,
07649 Allocator0>& A,
07650 Vector<complex<float>, VectFull, Allocator1>& x,
07651 const Vector<complex<float>, VectFull, Allocator2>& b,
07652 float& ferr, float& berr,
07653 LapackInfo& info = lapack_info)
07654 {
07655
07656 #ifdef SELDON_CHECK_DIMENSIONS
07657 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07658 #endif
07659
07660 int m = A.GetM();
07661 int nrhs = 1;
07662 char uplo('U');
07663 char trans('T'); char diag('N');
07664 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07665 Vector<float> rwork(m);
07666 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07667 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07668 &ferr, &berr, work.GetDataVoid(),
07669 rwork.GetData(), &info.GetInfoRef() );
07670 }
07671
07672
07673 template <class Prop0, class Allocator0,
07674 class Allocator1, class Allocator2>
07675 void
07676 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowLoTriang,
07677 Allocator0>& A,
07678 Vector<complex<double>, VectFull, Allocator1>& x,
07679 const Vector<complex<double>, VectFull, Allocator2>& b,
07680 double& ferr, double& berr,
07681 LapackInfo& info = lapack_info)
07682 {
07683
07684 #ifdef SELDON_CHECK_DIMENSIONS
07685 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07686 #endif
07687
07688 int m = A.GetM();
07689 int nrhs = 1;
07690 char uplo('U');
07691 char trans('T'); char diag('N');
07692 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07693 Vector<double> rwork(m);
07694 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07695 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07696 &ferr, &berr, work.GetDataVoid(),
07697 rwork.GetData(), &info.GetInfoRef() );
07698 }
07699
07700
07701
07702
07703
07704 template <class Prop0, class Allocator0,
07705 class Allocator1, class Allocator2>
07706 void
07707 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07708 const Matrix<float, Prop0, RowLoTriang,
07709 Allocator0>& A,
07710 Vector<float, VectFull, Allocator1>& x,
07711 const Vector<float, VectFull, Allocator2>& b,
07712 float& ferr, float& berr,
07713 LapackInfo& info = lapack_info)
07714 {
07715
07716 #ifdef SELDON_CHECK_DIMENSIONS
07717 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07718 #endif
07719
07720 int m = A.GetM();
07721 int nrhs = 1;
07722 char uplo('U');
07723 char trans = TransA.RevChar(); char diag = DiagA.Char();
07724 Vector<float, VectFull, Allocator1> work(3*m);
07725 Vector<int> iwork(m);
07726 strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07727 b.GetData(), &m, x.GetData(), &m,
07728 &ferr, &berr, work.GetData(),
07729 iwork.GetData(), &info.GetInfoRef() );
07730 }
07731
07732 template <class Prop0, class Allocator0,
07733 class Allocator1, class Allocator2>
07734 void
07735 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07736 const Matrix<double, Prop0, RowLoTriang,
07737 Allocator0>& A,
07738 Vector<double, VectFull, Allocator1>& x,
07739 const Vector<double, VectFull, Allocator2>& b,
07740 double& ferr, double& berr,
07741 LapackInfo& info = lapack_info)
07742 {
07743
07744 #ifdef SELDON_CHECK_DIMENSIONS
07745 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07746 #endif
07747
07748 int m = A.GetM();
07749 int nrhs = 1;
07750 char uplo('U');
07751 char trans = TransA.RevChar(); char diag = DiagA.Char();
07752 Vector<double, VectFull, Allocator1> work(3*m);
07753 Vector<int> iwork(m);
07754 dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
07755 b.GetData(), &m, x.GetData(), &m,
07756 &ferr, &berr, work.GetData(),
07757 iwork.GetData(), &info.GetInfoRef() );
07758 }
07759
07760
07761 template <class Prop0, class Allocator0,
07762 class Allocator1, class Allocator2>
07763 void
07764 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07765 const Matrix<complex<float>, Prop0, RowLoTriang,
07766 Allocator0>& A,
07767 Vector<complex<float>, VectFull, Allocator1>& x,
07768 Vector<complex<float>, VectFull, Allocator2>& b,
07769 float& ferr, float& berr,
07770 LapackInfo& info = lapack_info)
07771 {
07772
07773 #ifdef SELDON_CHECK_DIMENSIONS
07774 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07775 #endif
07776
07777 int m = A.GetM();
07778 int nrhs = 1;
07779 char uplo('U');
07780 char trans = TransA.RevChar(); char diag = DiagA.Char();
07781 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07782 Vector<float> rwork(m);
07783 if (TransA.ConjTrans())
07784 {
07785 Conjugate(b);
07786 Conjugate(x);
07787 }
07788 ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07789 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07790 &ferr, &berr, work.GetDataVoid(),
07791 rwork.GetData(), &info.GetInfoRef() );
07792 if (TransA.ConjTrans())
07793 {
07794 Conjugate(b);
07795 Conjugate(x);
07796 }
07797 }
07798
07799
07800 template <class Prop0, class Allocator0,
07801 class Allocator1, class Allocator2>
07802 void
07803 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07804 const Matrix<complex<double>, Prop0, RowLoTriang,
07805 Allocator0>& A,
07806 Vector<complex<double>, VectFull, Allocator1>& x,
07807 Vector<complex<double>, VectFull, Allocator2>& b,
07808 double& ferr, double& berr,
07809 LapackInfo& info = lapack_info)
07810 {
07811
07812 #ifdef SELDON_CHECK_DIMENSIONS
07813 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07814 #endif
07815
07816 int m = A.GetM();
07817 int nrhs = 1;
07818 char uplo('U');
07819 char trans = TransA.RevChar(); char diag = DiagA.Char();
07820 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07821 Vector<double> rwork(m);
07822 if (TransA.ConjTrans())
07823 {
07824 Conjugate(b);
07825 Conjugate(x);
07826 }
07827 ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
07828 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07829 &ferr, &berr, work.GetDataVoid(),
07830 rwork.GetData(), &info.GetInfoRef() );
07831 if (TransA.ConjTrans())
07832 {
07833 Conjugate(b);
07834 Conjugate(x);
07835 }
07836 }
07837
07838
07839
07840
07841
07842 template <class Prop0, class Allocator0,
07843 class Allocator1, class Allocator2>
07844 void RefineSolutionLU(const Matrix<float, Prop0, RowUpTriangPacked,
07845 Allocator0>& A,
07846 Vector<float, VectFull, Allocator1>& x,
07847 const Vector<float, VectFull, Allocator2>& b,
07848 float& ferr, float& berr,
07849 LapackInfo& info = lapack_info)
07850 {
07851
07852 #ifdef SELDON_CHECK_DIMENSIONS
07853 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07854 #endif
07855
07856 int m = A.GetM();
07857 int nrhs = 1;
07858 char uplo('L');
07859 char trans('T'); char diag('N');
07860 Vector<float, VectFull, Allocator1> work(3*m);
07861 Vector<int> iwork(m);
07862 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07863 b.GetData(), &m, x.GetData(), &m,
07864 &ferr, &berr, work.GetData(),
07865 iwork.GetData(), &info.GetInfoRef() );
07866 }
07867
07868 template <class Prop0, class Allocator0,
07869 class Allocator1, class Allocator2>
07870 void RefineSolutionLU(const Matrix<double, Prop0, RowUpTriangPacked,
07871 Allocator0>& A,
07872 Vector<double, VectFull, Allocator1>& x,
07873 const Vector<double, VectFull, Allocator2>& b,
07874 double& ferr, double& berr,
07875 LapackInfo& info = lapack_info)
07876 {
07877
07878 #ifdef SELDON_CHECK_DIMENSIONS
07879 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07880 #endif
07881
07882 int m = A.GetM();
07883 int nrhs = 1;
07884 char uplo('L');
07885 char trans('T'); char diag('N');
07886 Vector<double, VectFull, Allocator1> work(3*m);
07887 Vector<int> iwork(m);
07888 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07889 b.GetData(), &m, x.GetData(), &m,
07890 &ferr, &berr, work.GetData(),
07891 iwork.GetData(), &info.GetInfoRef() );
07892 }
07893
07894
07895 template <class Prop0, class Allocator0,
07896 class Allocator1, class Allocator2>
07897 void
07898 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowUpTriangPacked,
07899 Allocator0>& A,
07900 Vector<complex<float>, VectFull, Allocator1>& x,
07901 const Vector<complex<float>, VectFull, Allocator2>& b,
07902 float& ferr, float& berr,
07903 LapackInfo& info = lapack_info)
07904 {
07905
07906 #ifdef SELDON_CHECK_DIMENSIONS
07907 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07908 #endif
07909
07910 int m = A.GetM();
07911 int nrhs = 1;
07912 char uplo('L');
07913 char trans('T'); char diag('N');
07914 Vector<complex<float>, VectFull, Allocator1> work(2*m);
07915 Vector<float> rwork(m);
07916 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07917 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07918 &ferr, &berr, work.GetDataVoid(),
07919 rwork.GetData(), &info.GetInfoRef() );
07920 }
07921
07922
07923 template <class Prop0, class Allocator0,
07924 class Allocator1, class Allocator2>
07925 void
07926 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowUpTriangPacked,
07927 Allocator0>& A,
07928 Vector<complex<double>, VectFull, Allocator1>& x,
07929 const Vector<complex<double>, VectFull, Allocator2>& b,
07930 double& ferr, double& berr,
07931 LapackInfo& info = lapack_info)
07932 {
07933
07934 #ifdef SELDON_CHECK_DIMENSIONS
07935 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07936 #endif
07937
07938 int m = A.GetM();
07939 int nrhs = 1;
07940 char uplo('L');
07941 char trans('T'); char diag('N');
07942 Vector<complex<double>, VectFull, Allocator1> work(2*m);
07943 Vector<double> rwork(m);
07944 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
07945 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
07946 &ferr, &berr, work.GetDataVoid(),
07947 rwork.GetData(), &info.GetInfoRef() );
07948 }
07949
07950
07951
07952
07953
07954 template <class Prop0, class Allocator0,
07955 class Allocator1, class Allocator2>
07956 void
07957 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07958 const Matrix<float, Prop0, RowUpTriangPacked,
07959 Allocator0>& A,
07960 Vector<float, VectFull, Allocator1>& x,
07961 const Vector<float, VectFull, Allocator2>& b,
07962 float& ferr, float& berr,
07963 LapackInfo& info = lapack_info)
07964 {
07965
07966 #ifdef SELDON_CHECK_DIMENSIONS
07967 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07968 #endif
07969
07970 int m = A.GetM();
07971 int nrhs = 1;
07972 char uplo('L');
07973 char trans = TransA.RevChar(); char diag = DiagA.Char();
07974 Vector<float, VectFull, Allocator1> work(3*m);
07975 Vector<int> iwork(m);
07976 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
07977 b.GetData(), &m, x.GetData(), &m,
07978 &ferr, &berr, work.GetData(),
07979 iwork.GetData(), &info.GetInfoRef() );
07980 }
07981
07982 template <class Prop0, class Allocator0,
07983 class Allocator1, class Allocator2>
07984 void
07985 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
07986 const Matrix<double, Prop0, RowUpTriangPacked,
07987 Allocator0>& A,
07988 Vector<double, VectFull, Allocator1>& x,
07989 const Vector<double, VectFull, Allocator2>& b,
07990 double& ferr, double& berr,
07991 LapackInfo& info = lapack_info)
07992 {
07993
07994 #ifdef SELDON_CHECK_DIMENSIONS
07995 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
07996 #endif
07997
07998 int m = A.GetM();
07999 int nrhs = 1;
08000 char uplo('L');
08001 char trans = TransA.RevChar(); char diag = DiagA.Char();
08002 Vector<double, VectFull, Allocator1> work(3*m);
08003 Vector<int> iwork(m);
08004 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
08005 b.GetData(), &m, x.GetData(), &m,
08006 &ferr, &berr, work.GetData(),
08007 iwork.GetData(), &info.GetInfoRef() );
08008 }
08009
08010
08011 template <class Prop0, class Allocator0,
08012 class Allocator1, class Allocator2>
08013 void
08014 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
08015 const Matrix<complex<float>, Prop0, RowUpTriangPacked,
08016 Allocator0>& A,
08017 Vector<complex<float>, VectFull, Allocator1>& x,
08018 Vector<complex<float>, VectFull, Allocator2>& b,
08019 float& ferr, float& berr,
08020 LapackInfo& info = lapack_info)
08021 {
08022
08023 #ifdef SELDON_CHECK_DIMENSIONS
08024 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08025 #endif
08026
08027 int m = A.GetM();
08028 int nrhs = 1;
08029 char uplo('L');
08030 char trans = TransA.RevChar(); char diag = DiagA.Char();
08031 Vector<complex<float>, VectFull, Allocator1> work(2*m);
08032 Vector<float> rwork(m);
08033 if (TransA.ConjTrans())
08034 {
08035 Conjugate(b);
08036 Conjugate(x);
08037 }
08038 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
08039 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
08040 &ferr, &berr, work.GetDataVoid(),
08041 rwork.GetData(), &info.GetInfoRef() );
08042 if (TransA.ConjTrans())
08043 {
08044 Conjugate(b);
08045 Conjugate(x);
08046 }
08047 }
08048
08049
08050 template <class Prop0, class Allocator0,
08051 class Allocator1, class Allocator2>
08052 void
08053 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
08054 const Matrix<complex<double>, Prop0, RowUpTriangPacked,
08055 Allocator0>& A,
08056 Vector<complex<double>, VectFull, Allocator1>& x,
08057 Vector<complex<double>, VectFull, Allocator2>& b,
08058 double& ferr, double& berr,
08059 LapackInfo& info = lapack_info)
08060 {
08061
08062 #ifdef SELDON_CHECK_DIMENSIONS
08063 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08064 #endif
08065
08066 int m = A.GetM();
08067 int nrhs = 1;
08068 char uplo('L');
08069 char trans = TransA.RevChar(); char diag = DiagA.Char();
08070 Vector<complex<double>, VectFull, Allocator1> work(2*m);
08071 Vector<double> rwork(m);
08072 if (TransA.ConjTrans())
08073 {
08074 Conjugate(b);
08075 Conjugate(x);
08076 }
08077 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
08078 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
08079 &ferr, &berr, work.GetDataVoid(),
08080 rwork.GetData(), &info.GetInfoRef() );
08081 if (TransA.ConjTrans())
08082 {
08083 Conjugate(b);
08084 Conjugate(x);
08085 }
08086 }
08087
08088
08089
08090
08091
08092 template <class Prop0, class Allocator0,
08093 class Allocator1, class Allocator2>
08094 void RefineSolutionLU(const Matrix<float, Prop0, RowLoTriangPacked,
08095 Allocator0>& A,
08096 Vector<float, VectFull, Allocator1>& x,
08097 const Vector<float, VectFull, Allocator2>& b,
08098 float& ferr, float& berr,
08099 LapackInfo& info = lapack_info)
08100 {
08101
08102 #ifdef SELDON_CHECK_DIMENSIONS
08103 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08104 #endif
08105
08106 int m = A.GetM();
08107 int nrhs = 1;
08108 char uplo('U');
08109 char trans('T'); char diag('N');
08110 Vector<float, VectFull, Allocator1> work(3*m);
08111 Vector<int> iwork(m);
08112 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
08113 b.GetData(), &m, x.GetData(), &m,
08114 &ferr, &berr, work.GetData(),
08115 iwork.GetData(), &info.GetInfoRef() );
08116 }
08117
08118 template <class Prop0, class Allocator0,
08119 class Allocator1, class Allocator2>
08120 void RefineSolutionLU(const Matrix<double, Prop0, RowLoTriangPacked,
08121 Allocator0>& A,
08122 Vector<double, VectFull, Allocator1>& x,
08123 const Vector<double, VectFull, Allocator2>& b,
08124 double& ferr, double& berr,
08125 LapackInfo& info = lapack_info)
08126 {
08127
08128 #ifdef SELDON_CHECK_DIMENSIONS
08129 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08130 #endif
08131
08132 int m = A.GetM();
08133 int nrhs = 1;
08134 char uplo('U');
08135 char trans('T'); char diag('N');
08136 Vector<double, VectFull, Allocator1> work(3*m);
08137 Vector<int> iwork(m);
08138 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
08139 b.GetData(), &m, x.GetData(), &m,
08140 &ferr, &berr, work.GetData(),
08141 iwork.GetData(), &info.GetInfoRef() );
08142 }
08143
08144
08145 template <class Prop0, class Allocator0,
08146 class Allocator1, class Allocator2>
08147 void
08148 RefineSolutionLU(const Matrix<complex<float>, Prop0, RowLoTriangPacked,
08149 Allocator0>& A,
08150 Vector<complex<float>, VectFull, Allocator1>& x,
08151 const Vector<complex<float>, VectFull, Allocator2>& b,
08152 float& ferr, float& berr,
08153 LapackInfo& info = lapack_info)
08154 {
08155
08156 #ifdef SELDON_CHECK_DIMENSIONS
08157 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08158 #endif
08159
08160 int m = A.GetM();
08161 int nrhs = 1;
08162 char uplo('U');
08163 char trans('T'); char diag('N');
08164 Vector<complex<float>, VectFull, Allocator1> work(2*m);
08165 Vector<float> rwork(m);
08166 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
08167 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
08168 &ferr, &berr, work.GetDataVoid(),
08169 rwork.GetData(), &info.GetInfoRef() );
08170 }
08171
08172
08173 template <class Prop0, class Allocator0,
08174 class Allocator1, class Allocator2>
08175 void
08176 RefineSolutionLU(const Matrix<complex<double>, Prop0, RowLoTriangPacked,
08177 Allocator0>& A,
08178 Vector<complex<double>, VectFull, Allocator1>& x,
08179 const Vector<complex<double>, VectFull, Allocator2>& b,
08180 double& ferr, double& berr,
08181 LapackInfo& info = lapack_info)
08182 {
08183
08184 #ifdef SELDON_CHECK_DIMENSIONS
08185 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08186 #endif
08187
08188 int m = A.GetM();
08189 int nrhs = 1;
08190 char uplo('U');
08191 char trans('T'); char diag('N');
08192 Vector<complex<double>, VectFull, Allocator1> work(2*m);
08193 Vector<double> rwork(m);
08194 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
08195 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
08196 &ferr, &berr, work.GetDataVoid(),
08197 rwork.GetData(), &info.GetInfoRef() );
08198 }
08199
08200
08201
08202
08203
08204 template <class Prop0, class Allocator0,
08205 class Allocator1, class Allocator2>
08206 void
08207 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
08208 const Matrix<float, Prop0, RowLoTriangPacked,
08209 Allocator0>& A,
08210 Vector<float, VectFull, Allocator1>& x,
08211 const Vector<float, VectFull, Allocator2>& b,
08212 float& ferr, float& berr,
08213 LapackInfo& info = lapack_info)
08214 {
08215
08216 #ifdef SELDON_CHECK_DIMENSIONS
08217 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08218 #endif
08219
08220 int m = A.GetM();
08221 int nrhs = 1;
08222 char uplo('U');
08223 char trans = TransA.RevChar(); char diag = DiagA.Char();
08224 Vector<float, VectFull, Allocator1> work(3*m);
08225 Vector<int> iwork(m);
08226 stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
08227 b.GetData(), &m, x.GetData(), &m,
08228 &ferr, &berr, work.GetData(),
08229 iwork.GetData(), &info.GetInfoRef() );
08230 }
08231
08232 template <class Prop0, class Allocator0,
08233 class Allocator1, class Allocator2>
08234 void
08235 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
08236 const Matrix<double, Prop0, RowLoTriangPacked,
08237 Allocator0>& A,
08238 Vector<double, VectFull, Allocator1>& x,
08239 const Vector<double, VectFull, Allocator2>& b,
08240 double& ferr, double& berr,
08241 LapackInfo& info = lapack_info)
08242 {
08243
08244 #ifdef SELDON_CHECK_DIMENSIONS
08245 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08246 #endif
08247
08248 int m = A.GetM();
08249 int nrhs = 1;
08250 char uplo('U');
08251 char trans = TransA.RevChar(); char diag = DiagA.Char();
08252 Vector<double, VectFull, Allocator1> work(3*m);
08253 Vector<int> iwork(m);
08254 dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
08255 b.GetData(), &m, x.GetData(), &m,
08256 &ferr, &berr, work.GetData(),
08257 iwork.GetData(), &info.GetInfoRef() );
08258 }
08259
08260
08261 template <class Prop0, class Allocator0,
08262 class Allocator1, class Allocator2>
08263 void
08264 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
08265 const Matrix<complex<float>, Prop0, RowLoTriangPacked,
08266 Allocator0>& A,
08267 Vector<complex<float>, VectFull, Allocator1>& x,
08268 Vector<complex<float>, VectFull, Allocator2>& b,
08269 float& ferr, float& berr,
08270 LapackInfo& info = lapack_info)
08271 {
08272
08273 #ifdef SELDON_CHECK_DIMENSIONS
08274 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08275 #endif
08276
08277 int m = A.GetM();
08278 int nrhs = 1;
08279 char uplo('U');
08280 char trans = TransA.RevChar(); char diag = DiagA.Char();
08281 Vector<complex<float>, VectFull, Allocator1> work(2*m);
08282 Vector<float> rwork(m);
08283 if (TransA.ConjTrans())
08284 {
08285 Conjugate(b);
08286 Conjugate(x);
08287 }
08288 ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
08289 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
08290 &ferr, &berr, work.GetDataVoid(),
08291 rwork.GetData(), &info.GetInfoRef() );
08292 if (TransA.ConjTrans())
08293 {
08294 Conjugate(b);
08295 Conjugate(x);
08296 }
08297 }
08298
08299
08300 template <class Prop0, class Allocator0,
08301 class Allocator1, class Allocator2>
08302 void
08303 RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
08304 const Matrix<complex<double>, Prop0, RowLoTriangPacked,
08305 Allocator0>& A,
08306 Vector<complex<double>, VectFull, Allocator1>& x,
08307 Vector<complex<double>, VectFull, Allocator2>& b,
08308 double& ferr, double& berr,
08309 LapackInfo& info = lapack_info)
08310 {
08311
08312 #ifdef SELDON_CHECK_DIMENSIONS
08313 CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
08314 #endif
08315
08316 int m = A.GetM();
08317 int nrhs = 1;
08318 char uplo('U');
08319 char trans = TransA.RevChar(); char diag = DiagA.Char();
08320 Vector<complex<double>, VectFull, Allocator1> work(2*m);
08321 Vector<double> rwork(m);
08322 if (TransA.ConjTrans())
08323 {
08324 Conjugate(b);
08325 Conjugate(x);
08326 }
08327 ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
08328 b.GetDataVoid(), &m, x.GetDataVoid(), &m,
08329 &ferr, &berr, work.GetDataVoid(),
08330 rwork.GetData(), &info.GetInfoRef() );
08331 if (TransA.ConjTrans())
08332 {
08333 Conjugate(b);
08334 Conjugate(x);
08335 }
08336 }
08337
08338
08339
08341
08342
08343
08345
08346
08347
08348
08349
08350
08351 template <class Prop0, class Allocator0>
08352 void GetInverse(Matrix<float, Prop0, ColMajor, Allocator0>& A,
08353 LapackInfo& info = lapack_info)
08354 {
08355 int m = A.GetM();
08356 Vector<int, VectFull, CallocAlloc<int> > pivot;
08357 Vector<float, VectFull, Allocator0> work(m);
08358 GetLU(A, pivot, info);
08359 sgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
08360 &info.GetInfoRef());
08361
08362 #ifdef SELDON_LAPACK_CHECK_INFO
08363 if (info.GetInfo() != 0)
08364 throw LapackError(info.GetInfo(), "GetInverse",
08365 "The matrix is inversible ? ");
08366 #endif
08367
08368 }
08369
08370
08371 template <class Prop0, class Allocator0>
08372 void GetInverse(Matrix<double, Prop0, ColMajor, Allocator0>& A,
08373 LapackInfo& info = lapack_info)
08374 {
08375 int m = A.GetM();
08376 Vector<int, VectFull, CallocAlloc<int> > pivot;
08377 Vector<double, VectFull, Allocator0> work(m);
08378 GetLU(A, pivot, info);
08379 dgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
08380 &info.GetInfoRef());
08381
08382 #ifdef SELDON_LAPACK_CHECK_INFO
08383 if (info.GetInfo() != 0)
08384 throw LapackError(info.GetInfo(), "GetInverse",
08385 "The matrix is inversible ? ");
08386 #endif
08387
08388 }
08389
08390
08391 template <class Prop0, class Allocator0>
08392 void GetInverse(Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
08393 LapackInfo& info = lapack_info)
08394 {
08395 int m = A.GetM();
08396 Vector<int, VectFull, CallocAlloc<int> > pivot;
08397 Vector<complex<float>, VectFull, Allocator0> work(m);
08398 GetLU(A, pivot, info);
08399 cgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
08400 work.GetDataVoid(), &m, &info.GetInfoRef());
08401
08402 #ifdef SELDON_LAPACK_CHECK_INFO
08403 if (info.GetInfo() != 0)
08404 throw LapackError(info.GetInfo(), "GetInverse",
08405 "The matrix is inversible ? ");
08406 #endif
08407
08408 }
08409
08410
08411 template <class Prop0, class Allocator0>
08412 void GetInverse(Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
08413 LapackInfo& info = lapack_info)
08414 {
08415 int m = A.GetM();
08416 Vector<int, VectFull, CallocAlloc<int> > pivot;
08417 Vector<complex<double>, VectFull, Allocator0> work(m);
08418 GetLU(A, pivot, info);
08419 zgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
08420 work.GetDataVoid(), &m, &info.GetInfoRef());
08421
08422 #ifdef SELDON_LAPACK_CHECK_INFO
08423 if (info.GetInfo() != 0)
08424 throw LapackError(info.GetInfo(), "GetInverse",
08425 "The matrix is inversible ? ");
08426 #endif
08427
08428 }
08429
08430
08431
08432
08433
08434 template <class Prop0, class Allocator0>
08435 void GetInverse(Matrix<float, Prop0, RowMajor, Allocator0>& A,
08436 LapackInfo& info = lapack_info)
08437 {
08438 int m = A.GetM();
08439 Vector<int, VectFull, CallocAlloc<int> > pivot;
08440 Vector<float, VectFull, Allocator0> work(m);
08441 GetLU(A, pivot, info);
08442 sgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
08443 &info.GetInfoRef());
08444
08445 #ifdef SELDON_LAPACK_CHECK_INFO
08446 if (info.GetInfo() != 0)
08447 throw LapackError(info.GetInfo(), "GetInverse",
08448 "The matrix is inversible ? ");
08449 #endif
08450
08451 }
08452
08453
08454 template <class Prop0, class Allocator0>
08455 void GetInverse(Matrix<double, Prop0, RowMajor, Allocator0>& A,
08456 LapackInfo& info = lapack_info)
08457 {
08458 int m = A.GetM();
08459 Vector<int, VectFull, CallocAlloc<int> > pivot;
08460 Vector<double, VectFull, Allocator0> work(m);
08461 GetLU(A, pivot, info);
08462 dgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
08463 &info.GetInfoRef());
08464
08465 #ifdef SELDON_LAPACK_CHECK_INFO
08466 if (info.GetInfo() != 0)
08467 throw LapackError(info.GetInfo(), "GetInverse",
08468 "The matrix is inversible ? ");
08469 #endif
08470
08471 }
08472
08473
08474 template <class Prop0, class Allocator0>
08475 void GetInverse(Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
08476 LapackInfo& info = lapack_info)
08477 {
08478 int m = A.GetM();
08479 Vector<int, VectFull, CallocAlloc<int> > pivot;
08480 Vector<complex<float>, VectFull, Allocator0> work(m);
08481 GetLU(A, pivot, info);
08482 cgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
08483 work.GetDataVoid(), &m, &info.GetInfoRef());
08484
08485 #ifdef SELDON_LAPACK_CHECK_INFO
08486 if (info.GetInfo() != 0)
08487 throw LapackError(info.GetInfo(), "GetInverse",
08488 "The matrix is inversible ? ");
08489 #endif
08490
08491 }
08492
08493
08494 template <class Prop0, class Allocator0>
08495 void GetInverse(Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
08496 LapackInfo& info = lapack_info)
08497 {
08498 int m = A.GetM();
08499 Vector<int, VectFull, CallocAlloc<int> > pivot;
08500 Vector<complex<double>, VectFull, Allocator0> work(m);
08501 GetLU(A, pivot, info);
08502 zgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
08503 work.GetDataVoid(), &m, &info.GetInfoRef());
08504
08505 #ifdef SELDON_LAPACK_CHECK_INFO
08506 if (info.GetInfo() != 0)
08507 throw LapackError(info.GetInfo(), "GetInverse",
08508 "The matrix is inversible ? ");
08509 #endif
08510
08511 }
08512
08513
08514
08515
08516
08517 template <class Prop0, class Allocator0>
08518 void GetInverse(Matrix<float, Prop0, ColSym, Allocator0>& A,
08519 LapackInfo& info = lapack_info)
08520 {
08521 int m = A.GetM();
08522 char uplo('U');
08523 Vector<int, VectFull, CallocAlloc<int> > pivot;
08524 Vector<float, VectFull, Allocator0> work(2*m);
08525 GetLU(A, pivot, info);
08526 ssytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
08527 &info.GetInfoRef());
08528
08529 #ifdef SELDON_LAPACK_CHECK_INFO
08530 if (info.GetInfo() != 0)
08531 throw LapackError(info.GetInfo(), "GetInverse",
08532 "The matrix is inversible ? ");
08533 #endif
08534
08535 }
08536
08537
08538 template <class Prop0, class Allocator0>
08539 void GetInverse(Matrix<double, Prop0, ColSym, Allocator0>& A,
08540 LapackInfo& info = lapack_info)
08541 {
08542 int m = A.GetM();
08543 char uplo('U');
08544 Vector<int, VectFull, CallocAlloc<int> > pivot;
08545 Vector<double, VectFull, Allocator0> work(2*m);
08546 GetLU(A, pivot, info);
08547 dsytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
08548 &info.GetInfoRef());
08549
08550 #ifdef SELDON_LAPACK_CHECK_INFO
08551 if (info.GetInfo() != 0)
08552 throw LapackError(info.GetInfo(), "GetInverse",
08553 "The matrix is inversible ? ");
08554 #endif
08555
08556 }
08557
08558
08559 template <class Prop0, class Allocator0>
08560 void GetInverse(Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
08561 LapackInfo& info = lapack_info)
08562 {
08563 int m = A.GetM();
08564 char uplo('U');
08565 Vector<int, VectFull, CallocAlloc<int> > pivot;
08566 Vector<complex<float>, VectFull, Allocator0> work(2*m);
08567 GetLU(A, pivot, info);
08568 csytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08569 work.GetDataVoid(), &info.GetInfoRef());
08570
08571 #ifdef SELDON_LAPACK_CHECK_INFO
08572 if (info.GetInfo() != 0)
08573 throw LapackError(info.GetInfo(), "GetInverse",
08574 "The matrix is inversible ? ");
08575 #endif
08576
08577 }
08578
08579
08580 template <class Prop0, class Allocator0>
08581 void GetInverse(Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
08582 LapackInfo& info = lapack_info)
08583 {
08584 int m = A.GetM();
08585 char uplo('U');
08586 Vector<int, VectFull, CallocAlloc<int> > pivot;
08587 Vector<complex<double>, VectFull, Allocator0> work(2*m);
08588 GetLU(A, pivot, info);
08589 zsytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08590 work.GetDataVoid(), &info.GetInfoRef());
08591
08592 #ifdef SELDON_LAPACK_CHECK_INFO
08593 if (info.GetInfo() != 0)
08594 throw LapackError(info.GetInfo(), "GetInverse",
08595 "The matrix is inversible ? ");
08596 #endif
08597
08598 }
08599
08600
08601
08602
08603
08604 template <class Prop0, class Allocator0>
08605 void GetInverse(Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
08606 LapackInfo& info = lapack_info)
08607 {
08608 int m = A.GetM();
08609 char uplo('U');
08610 Vector<int, VectFull, CallocAlloc<int> > pivot;
08611 Vector<float, VectFull, Allocator0> work(m);
08612 GetLU(A, pivot, info);
08613 ssptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
08614 &info.GetInfoRef());
08615
08616 #ifdef SELDON_LAPACK_CHECK_INFO
08617 if (info.GetInfo() != 0)
08618 throw LapackError(info.GetInfo(), "GetInverse",
08619 "The matrix is inversible ? ");
08620 #endif
08621
08622 }
08623
08624
08625 template <class Prop0, class Allocator0>
08626 void GetInverse(Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
08627 LapackInfo& info = lapack_info)
08628 {
08629 int m = A.GetM();
08630 char uplo('U');
08631 Vector<int, VectFull, CallocAlloc<int> > pivot;
08632 Vector<double, VectFull, Allocator0> work(m);
08633 GetLU(A, pivot, info);
08634 dsptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
08635 &info.GetInfoRef());
08636
08637 #ifdef SELDON_LAPACK_CHECK_INFO
08638 if (info.GetInfo() != 0)
08639 throw LapackError(info.GetInfo(), "GetInverse",
08640 "The matrix is inversible ? ");
08641 #endif
08642
08643 }
08644
08645
08646 template <class Prop0, class Allocator0>
08647 void GetInverse(Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A,
08648 LapackInfo& info = lapack_info)
08649 {
08650 int m = A.GetM();
08651 char uplo('U');
08652 Vector<int, VectFull, CallocAlloc<int> > pivot;
08653 Vector<complex<float>, VectFull, Allocator0> work(m);
08654 GetLU(A, pivot, info);
08655 csptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
08656 work.GetDataVoid(), &info.GetInfoRef());
08657
08658 #ifdef SELDON_LAPACK_CHECK_INFO
08659 if (info.GetInfo() != 0)
08660 throw LapackError(info.GetInfo(), "GetInverse",
08661 "The matrix is inversible ? ");
08662 #endif
08663
08664 }
08665
08666
08667 template <class Prop0, class Allocator0>
08668 void GetInverse(Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A,
08669 LapackInfo& info = lapack_info)
08670 {
08671 int m = A.GetM();
08672 char uplo('U');
08673 Vector<int, VectFull, CallocAlloc<int> > pivot;
08674 Vector<complex<double>, VectFull, Allocator0> work(m);
08675 GetLU(A, pivot, info);
08676 zsptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
08677 work.GetDataVoid(), &info.GetInfoRef());
08678
08679 #ifdef SELDON_LAPACK_CHECK_INFO
08680 if (info.GetInfo() != 0)
08681 throw LapackError(info.GetInfo(), "GetInverse",
08682 "The matrix is inversible ? ");
08683 #endif
08684
08685 }
08686
08687
08688
08689
08690
08691 template <class Prop0, class Allocator0>
08692 void GetInverse(Matrix<float, Prop0, RowSym, Allocator0>& A,
08693 LapackInfo& info = lapack_info)
08694 {
08695 int m = A.GetM();
08696 char uplo('L');
08697 Vector<int, VectFull, CallocAlloc<int> > pivot;
08698 Vector<float, VectFull, Allocator0> work(2*m);
08699 GetLU(A, pivot, info);
08700 ssytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
08701 &info.GetInfoRef());
08702
08703 #ifdef SELDON_LAPACK_CHECK_INFO
08704 if (info.GetInfo() != 0)
08705 throw LapackError(info.GetInfo(), "GetInverse",
08706 "The matrix is inversible ? ");
08707 #endif
08708
08709 }
08710
08711
08712 template <class Prop0, class Allocator0>
08713 void GetInverse(Matrix<double, Prop0, RowSym, Allocator0>& A,
08714 LapackInfo& info = lapack_info)
08715 {
08716 int m = A.GetM();
08717 char uplo('L');
08718 Vector<int, VectFull, CallocAlloc<int> > pivot;
08719 Vector<double, VectFull, Allocator0> work(2*m);
08720 GetLU(A, pivot, info);
08721 dsytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
08722 &info.GetInfoRef());
08723
08724 #ifdef SELDON_LAPACK_CHECK_INFO
08725 if (info.GetInfo() != 0)
08726 throw LapackError(info.GetInfo(), "GetInverse",
08727 "The matrix is inversible ? ");
08728 #endif
08729
08730 }
08731
08732
08733 template <class Prop0, class Allocator0>
08734 void GetInverse(Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
08735 LapackInfo& info = lapack_info)
08736 {
08737 int m = A.GetM();
08738 char uplo('L');
08739 Vector<int, VectFull, CallocAlloc<int> > pivot;
08740 Vector<complex<float>, VectFull, Allocator0> work(2*m);
08741 GetLU(A, pivot, info);
08742 csytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08743 work.GetDataVoid(), &info.GetInfoRef());
08744
08745 #ifdef SELDON_LAPACK_CHECK_INFO
08746 if (info.GetInfo() != 0)
08747 throw LapackError(info.GetInfo(), "GetInverse",
08748 "The matrix is inversible ? ");
08749 #endif
08750
08751 }
08752
08753
08754 template <class Prop0, class Allocator0>
08755 void GetInverse(Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
08756 LapackInfo& info = lapack_info)
08757 {
08758 int m = A.GetM();
08759 char uplo('L');
08760 Vector<int, VectFull, CallocAlloc<int> > pivot;
08761 Vector<complex<double>, VectFull, Allocator0> work(2*m);
08762 GetLU(A, pivot, info);
08763 zsytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08764 work.GetDataVoid(), &info.GetInfoRef());
08765
08766 #ifdef SELDON_LAPACK_CHECK_INFO
08767 if (info.GetInfo() != 0)
08768 throw LapackError(info.GetInfo(), "GetInverse",
08769 "The matrix is inversible ? ");
08770 #endif
08771
08772 }
08773
08774
08775
08776
08777
08778 template <class Prop0, class Allocator0>
08779 void GetInverse(Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
08780 LapackInfo& info = lapack_info)
08781 {
08782 int m = A.GetM();
08783 char uplo('L');
08784 Vector<int, VectFull, CallocAlloc<int> > pivot;
08785 Vector<float, VectFull, Allocator0> work(m);
08786 GetLU(A, pivot, info);
08787 ssptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
08788 &info.GetInfoRef());
08789
08790 #ifdef SELDON_LAPACK_CHECK_INFO
08791 if (info.GetInfo() != 0)
08792 throw LapackError(info.GetInfo(), "GetInverse",
08793 "The matrix is inversible ? ");
08794 #endif
08795
08796 }
08797
08798
08799 template <class Prop0, class Allocator0>
08800 void GetInverse(Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
08801 LapackInfo& info = lapack_info)
08802 {
08803 int m = A.GetM();
08804 char uplo('L');
08805 Vector<int, VectFull, CallocAlloc<int> > pivot;
08806 Vector<double, VectFull, Allocator0> work(m);
08807 GetLU(A, pivot, info);
08808 dsptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
08809 &info.GetInfoRef());
08810
08811 #ifdef SELDON_LAPACK_CHECK_INFO
08812 if (info.GetInfo() != 0)
08813 throw LapackError(info.GetInfo(), "GetInverse",
08814 "The matrix is inversible ? ");
08815 #endif
08816
08817 }
08818
08819
08820 template <class Prop0, class Allocator0>
08821 void GetInverse(Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A,
08822 LapackInfo& info = lapack_info)
08823 {
08824 int m = A.GetM();
08825 char uplo('L');
08826 Vector<int, VectFull, CallocAlloc<int> > pivot;
08827 Vector<complex<float>, VectFull, Allocator0> work(m);
08828 GetLU(A, pivot, info);
08829 csptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
08830 work.GetDataVoid(), &info.GetInfoRef());
08831
08832 #ifdef SELDON_LAPACK_CHECK_INFO
08833 if (info.GetInfo() != 0)
08834 throw LapackError(info.GetInfo(), "GetInverse",
08835 "The matrix is inversible ? ");
08836 #endif
08837
08838 }
08839
08840
08841 template <class Prop0, class Allocator0>
08842 void GetInverse(Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A,
08843 LapackInfo& info = lapack_info)
08844 {
08845 int m = A.GetM();
08846 char uplo('L');
08847 Vector<int, VectFull, CallocAlloc<int> > pivot;
08848 Vector<complex<double>, VectFull, Allocator0> work(m);
08849 GetLU(A, pivot, info);
08850 zsptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
08851 work.GetDataVoid(), &info.GetInfoRef());
08852
08853 #ifdef SELDON_LAPACK_CHECK_INFO
08854 if (info.GetInfo() != 0)
08855 throw LapackError(info.GetInfo(), "GetInverse",
08856 "The matrix is inversible ? ");
08857 #endif
08858
08859 }
08860
08861
08862
08863
08864
08865 template <class Prop0, class Allocator0>
08866 void GetInverse(Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
08867 LapackInfo& info = lapack_info)
08868 {
08869 int m = A.GetM();
08870 char uplo('U');
08871 Vector<int, VectFull, CallocAlloc<int> > pivot;
08872 Vector<complex<float>, VectFull, Allocator0> work(m);
08873 GetLU(A, pivot, info);
08874 chetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08875 work.GetDataVoid(), &info.GetInfoRef());
08876
08877 #ifdef SELDON_LAPACK_CHECK_INFO
08878 if (info.GetInfo() != 0)
08879 throw LapackError(info.GetInfo(), "GetInverse",
08880 "The matrix is inversible ? ");
08881 #endif
08882
08883 }
08884
08885
08886 template <class Prop0, class Allocator0>
08887 void GetInverse(Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
08888 LapackInfo& info = lapack_info)
08889 {
08890 int m = A.GetM();
08891 char uplo('U');
08892 Vector<int, VectFull, CallocAlloc<int> > pivot;
08893 Vector<complex<double>, VectFull, Allocator0> work(m);
08894 GetLU(A, pivot, info);
08895 zhetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08896 work.GetDataVoid(), &info.GetInfoRef());
08897
08898 #ifdef SELDON_LAPACK_CHECK_INFO
08899 if (info.GetInfo() != 0)
08900 throw LapackError(info.GetInfo(), "GetInverse",
08901 "The matrix is inversible ? ");
08902 #endif
08903
08904 }
08905
08906
08907
08908
08909
08910 template <class Prop0, class Allocator0>
08911 void GetInverse(Matrix<complex<float>, Prop0, ColHermPacked,
08912 Allocator0>& A,
08913 LapackInfo& info = lapack_info)
08914 {
08915 int m = A.GetM();
08916 char uplo('U');
08917 Vector<int, VectFull, CallocAlloc<int> > pivot;
08918 Vector<complex<float>, VectFull, Allocator0> work(m);
08919 GetLU(A, pivot, info);
08920 chptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
08921 work.GetDataVoid(), &info.GetInfoRef());
08922
08923 #ifdef SELDON_LAPACK_CHECK_INFO
08924 if (info.GetInfo() != 0)
08925 throw LapackError(info.GetInfo(), "GetInverse",
08926 "The matrix is inversible ? ");
08927 #endif
08928
08929 }
08930
08931
08932 template <class Prop0, class Allocator0>
08933 void GetInverse(Matrix<complex<double>, Prop0, ColHermPacked,
08934 Allocator0>& A,
08935 LapackInfo& info = lapack_info)
08936 {
08937 int m = A.GetM();
08938 char uplo('U');
08939 Vector<int, VectFull, CallocAlloc<int> > pivot;
08940 Vector<complex<double>, VectFull, Allocator0> work(m);
08941 GetLU(A, pivot, info);
08942 zhptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
08943 work.GetDataVoid(), &info.GetInfoRef());
08944
08945 #ifdef SELDON_LAPACK_CHECK_INFO
08946 if (info.GetInfo() != 0)
08947 throw LapackError(info.GetInfo(), "GetInverse",
08948 "The matrix is inversible ? ");
08949 #endif
08950
08951 }
08952
08953
08954
08955
08956
08957 template <class Prop0, class Allocator0>
08958 void GetInverse(Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
08959 LapackInfo& info = lapack_info)
08960 {
08961 int m = A.GetM();
08962 char uplo('L');
08963 Vector<int, VectFull, CallocAlloc<int> > pivot;
08964 Vector<complex<float>, VectFull, Allocator0> work(m);
08965 GetLU(A, pivot, info);
08966 chetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08967 work.GetDataVoid(), &info.GetInfoRef());
08968
08969 #ifdef SELDON_LAPACK_CHECK_INFO
08970 if (info.GetInfo() != 0)
08971 throw LapackError(info.GetInfo(), "GetInverse",
08972 "The matrix is inversible ? ");
08973 #endif
08974
08975 }
08976
08977
08978 template <class Prop0, class Allocator0>
08979 void GetInverse(Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
08980 LapackInfo& info = lapack_info)
08981 {
08982 int m = A.GetM();
08983 char uplo('L');
08984 Vector<int, VectFull, CallocAlloc<int> > pivot;
08985 Vector<complex<double>, VectFull, Allocator0> work(m);
08986 GetLU(A, pivot, info);
08987 zhetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
08988 work.GetDataVoid(), &info.GetInfoRef());
08989
08990 #ifdef SELDON_LAPACK_CHECK_INFO
08991 if (info.GetInfo() != 0)
08992 throw LapackError(info.GetInfo(), "GetInverse",
08993 "The matrix is inversible ? ");
08994 #endif
08995
08996 }
08997
08998
08999
09000
09001
09002 template <class Prop0, class Allocator0>
09003 void GetInverse(Matrix<complex<float>, Prop0, RowHermPacked,
09004 Allocator0>& A,
09005 LapackInfo& info = lapack_info)
09006 {
09007 int m = A.GetM();
09008 char uplo('L');
09009 Vector<int, VectFull, CallocAlloc<int> > pivot;
09010 Vector<complex<float>, VectFull, Allocator0> work(m);
09011 GetLU(A, pivot, info);
09012 chptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
09013 work.GetDataVoid(), &info.GetInfoRef());
09014
09015 #ifdef SELDON_LAPACK_CHECK_INFO
09016 if (info.GetInfo() != 0)
09017 throw LapackError(info.GetInfo(), "GetInverse",
09018 "The matrix is inversible ? ");
09019 #endif
09020
09021 }
09022
09023
09024 template <class Prop0, class Allocator0>
09025 void GetInverse(Matrix<complex<double>, Prop0, RowHermPacked,
09026 Allocator0>& A,
09027 LapackInfo& info = lapack_info)
09028 {
09029 int m = A.GetM();
09030 char uplo('L');
09031 Vector<int, VectFull, CallocAlloc<int> > pivot;
09032 Vector<complex<double>, VectFull, Allocator0> work(m);
09033 GetLU(A, pivot, info);
09034 zhptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
09035 work.GetDataVoid(), &info.GetInfoRef());
09036
09037 #ifdef SELDON_LAPACK_CHECK_INFO
09038 if (info.GetInfo() != 0)
09039 throw LapackError(info.GetInfo(), "GetInverse",
09040 "The matrix is inversible ? ");
09041 #endif
09042
09043 }
09044
09045
09046
09047
09048
09049 template <class Prop0, class Allocator0>
09050 void GetInverse(Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
09051 LapackInfo& info = lapack_info)
09052 {
09053 int m = A.GetM();
09054 char uplo('U'); char diag('N');
09055 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09056 &info.GetInfoRef());
09057
09058 #ifdef SELDON_LAPACK_CHECK_INFO
09059 if (info.GetInfo() != 0)
09060 throw LapackError(info.GetInfo(), "GetInverse",
09061 "The matrix is inversible ? ");
09062 #endif
09063
09064 }
09065
09066
09067 template <class Prop0, class Allocator0>
09068 void GetInverse(Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
09069 LapackInfo& info = lapack_info)
09070 {
09071 int m = A.GetM();
09072 char uplo('U'); char diag('N');
09073 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09074 &info.GetInfoRef());
09075
09076 #ifdef SELDON_LAPACK_CHECK_INFO
09077 if (info.GetInfo() != 0)
09078 throw LapackError(info.GetInfo(), "GetInverse",
09079 "The matrix is inversible ? ");
09080 #endif
09081
09082 }
09083
09084
09085 template <class Prop0, class Allocator0>
09086 void GetInverse(Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
09087 LapackInfo& info = lapack_info)
09088 {
09089 int m = A.GetM();
09090 char uplo('U'); char diag('N');
09091 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09092 &info.GetInfoRef());
09093
09094 #ifdef SELDON_LAPACK_CHECK_INFO
09095 if (info.GetInfo() != 0)
09096 throw LapackError(info.GetInfo(), "GetInverse",
09097 "The matrix is inversible ? ");
09098 #endif
09099
09100 }
09101
09102
09103 template <class Prop0, class Allocator0>
09104 void GetInverse(Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
09105 LapackInfo& info = lapack_info)
09106 {
09107 int m = A.GetM();
09108 char uplo('U'); char diag('N');
09109 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09110 &info.GetInfoRef());
09111
09112 #ifdef SELDON_LAPACK_CHECK_INFO
09113 if (info.GetInfo() != 0)
09114 throw LapackError(info.GetInfo(), "GetInverse",
09115 "The matrix is inversible ? ");
09116 #endif
09117
09118 }
09119
09120
09121
09122
09123
09124 template <class Prop0, class Allocator0>
09125 void GetInverse(const SeldonDiag& DiagA,
09126 Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
09127 LapackInfo& info = lapack_info)
09128 {
09129 int m = A.GetM();
09130 char uplo('U'); char diag = DiagA.Char();
09131 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09132 &info.GetInfoRef());
09133
09134 #ifdef SELDON_LAPACK_CHECK_INFO
09135 if (info.GetInfo() != 0)
09136 throw LapackError(info.GetInfo(), "GetInverse",
09137 "The matrix is inversible ? ");
09138 #endif
09139
09140 }
09141
09142
09143 template <class Prop0, class Allocator0>
09144 void GetInverse(const SeldonDiag& DiagA,
09145 Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
09146 LapackInfo& info = lapack_info)
09147 {
09148 int m = A.GetM();
09149 char uplo('U'); char diag = DiagA.Char();
09150 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09151 &info.GetInfoRef());
09152
09153 #ifdef SELDON_LAPACK_CHECK_INFO
09154 if (info.GetInfo() != 0)
09155 throw LapackError(info.GetInfo(), "GetInverse",
09156 "The matrix is inversible ? ");
09157 #endif
09158
09159 }
09160
09161
09162 template <class Prop0, class Allocator0>
09163 void GetInverse(const SeldonDiag& DiagA,
09164 Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
09165 LapackInfo& info = lapack_info)
09166 {
09167 int m = A.GetM();
09168 char uplo('U'); char diag = DiagA.Char();
09169 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09170 &info.GetInfoRef());
09171
09172 #ifdef SELDON_LAPACK_CHECK_INFO
09173 if (info.GetInfo() != 0)
09174 throw LapackError(info.GetInfo(), "GetInverse",
09175 "The matrix is inversible ? ");
09176 #endif
09177
09178 }
09179
09180
09181 template <class Prop0, class Allocator0>
09182 void GetInverse(const SeldonDiag& DiagA,
09183 Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
09184 LapackInfo& info = lapack_info)
09185 {
09186 int m = A.GetM();
09187 char uplo('U'); char diag = DiagA.Char();
09188 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09189 &info.GetInfoRef());
09190
09191 #ifdef SELDON_LAPACK_CHECK_INFO
09192 if (info.GetInfo() != 0)
09193 throw LapackError(info.GetInfo(), "GetInverse",
09194 "The matrix is inversible ? ");
09195 #endif
09196
09197 }
09198
09199
09200
09201
09202
09203 template <class Prop0, class Allocator0>
09204 void GetInverse(Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
09205 LapackInfo& info = lapack_info)
09206 {
09207 int m = A.GetM();
09208 char uplo('L'); char diag('N');
09209 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09210 &info.GetInfoRef());
09211
09212 #ifdef SELDON_LAPACK_CHECK_INFO
09213 if (info.GetInfo() != 0)
09214 throw LapackError(info.GetInfo(), "GetInverse",
09215 "The matrix is inversible ? ");
09216 #endif
09217
09218 }
09219
09220
09221 template <class Prop0, class Allocator0>
09222 void GetInverse(Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
09223 LapackInfo& info = lapack_info)
09224 {
09225 int m = A.GetM();
09226 char uplo('L'); char diag('N');
09227 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09228 &info.GetInfoRef());
09229
09230 #ifdef SELDON_LAPACK_CHECK_INFO
09231 if (info.GetInfo() != 0)
09232 throw LapackError(info.GetInfo(), "GetInverse",
09233 "The matrix is inversible ? ");
09234 #endif
09235
09236 }
09237
09238
09239 template <class Prop0, class Allocator0>
09240 void GetInverse(Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
09241 LapackInfo& info = lapack_info)
09242 {
09243 int m = A.GetM();
09244 char uplo('L'); char diag('N');
09245 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09246 &info.GetInfoRef());
09247
09248 #ifdef SELDON_LAPACK_CHECK_INFO
09249 if (info.GetInfo() != 0)
09250 throw LapackError(info.GetInfo(), "GetInverse",
09251 "The matrix is inversible ? ");
09252 #endif
09253
09254 }
09255
09256
09257 template <class Prop0, class Allocator0>
09258 void GetInverse(Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
09259 LapackInfo& info = lapack_info)
09260 {
09261 int m = A.GetM();
09262 char uplo('L'); char diag('N');
09263 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09264 &info.GetInfoRef());
09265
09266 #ifdef SELDON_LAPACK_CHECK_INFO
09267 if (info.GetInfo() != 0)
09268 throw LapackError(info.GetInfo(), "GetInverse",
09269 "The matrix is inversible ? ");
09270 #endif
09271
09272 }
09273
09274
09275
09276
09277
09278 template <class Prop0, class Allocator0>
09279 void GetInverse(const SeldonDiag& DiagA,
09280 Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
09281 LapackInfo& info = lapack_info)
09282 {
09283 int m = A.GetM();
09284 char uplo('L'); char diag = DiagA.Char();
09285 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09286 &info.GetInfoRef());
09287
09288 #ifdef SELDON_LAPACK_CHECK_INFO
09289 if (info.GetInfo() != 0)
09290 throw LapackError(info.GetInfo(), "GetInverse",
09291 "The matrix is inversible ? ");
09292 #endif
09293
09294 }
09295
09296
09297 template <class Prop0, class Allocator0>
09298 void GetInverse(const SeldonDiag& DiagA,
09299 Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
09300 LapackInfo& info = lapack_info)
09301 {
09302 int m = A.GetM();
09303 char uplo('L'); char diag = DiagA.Char();
09304 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09305 &info.GetInfoRef());
09306
09307 #ifdef SELDON_LAPACK_CHECK_INFO
09308 if (info.GetInfo() != 0)
09309 throw LapackError(info.GetInfo(), "GetInverse",
09310 "The matrix is inversible ? ");
09311 #endif
09312
09313 }
09314
09315
09316 template <class Prop0, class Allocator0>
09317 void GetInverse(const SeldonDiag& DiagA,
09318 Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
09319 LapackInfo& info = lapack_info)
09320 {
09321 int m = A.GetM();
09322 char uplo('L'); char diag = DiagA.Char();
09323 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09324 &info.GetInfoRef());
09325
09326 #ifdef SELDON_LAPACK_CHECK_INFO
09327 if (info.GetInfo() != 0)
09328 throw LapackError(info.GetInfo(), "GetInverse",
09329 "The matrix is inversible ? ");
09330 #endif
09331
09332 }
09333
09334
09335 template <class Prop0, class Allocator0>
09336 void GetInverse(const SeldonDiag& DiagA,
09337 Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
09338 LapackInfo& info = lapack_info)
09339 {
09340 int m = A.GetM();
09341 char uplo('L'); char diag = DiagA.Char();
09342 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09343 &info.GetInfoRef());
09344
09345 #ifdef SELDON_LAPACK_CHECK_INFO
09346 if (info.GetInfo() != 0)
09347 throw LapackError(info.GetInfo(), "GetInverse",
09348 "The matrix is inversible ? ");
09349 #endif
09350
09351 }
09352
09353
09354
09355
09356
09357 template <class Prop0, class Allocator0>
09358 void GetInverse(Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
09359 LapackInfo& info = lapack_info)
09360 {
09361 int m = A.GetM();
09362 char uplo('U'); char diag('N');
09363 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09364
09365 #ifdef SELDON_LAPACK_CHECK_INFO
09366 if (info.GetInfo() != 0)
09367 throw LapackError(info.GetInfo(), "GetInverse",
09368 "The matrix is inversible ? ");
09369 #endif
09370
09371 }
09372
09373
09374 template <class Prop0, class Allocator0>
09375 void GetInverse(Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
09376 LapackInfo& info = lapack_info)
09377 {
09378 int m = A.GetM();
09379 char uplo('U'); char diag('N');
09380 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09381
09382 #ifdef SELDON_LAPACK_CHECK_INFO
09383 if (info.GetInfo() != 0)
09384 throw LapackError(info.GetInfo(), "GetInverse",
09385 "The matrix is inversible ? ");
09386 #endif
09387
09388 }
09389
09390
09391 template <class Prop0, class Allocator0>
09392 void GetInverse(Matrix<complex<float>, Prop0, ColUpTriangPacked,
09393 Allocator0>& A,
09394 LapackInfo& info = lapack_info)
09395 {
09396 int m = A.GetM();
09397 char uplo('U'); char diag('N');
09398 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
09399
09400 #ifdef SELDON_LAPACK_CHECK_INFO
09401 if (info.GetInfo() != 0)
09402 throw LapackError(info.GetInfo(), "GetInverse",
09403 "The matrix is inversible ? ");
09404 #endif
09405
09406 }
09407
09408
09409 template <class Prop0, class Allocator0>
09410 void GetInverse(Matrix<complex<double>, Prop0, ColUpTriangPacked,
09411 Allocator0>& A,
09412 LapackInfo& info = lapack_info)
09413 {
09414 int m = A.GetM();
09415 char uplo('U'); char diag('N');
09416 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
09417 &info.GetInfoRef());
09418
09419 #ifdef SELDON_LAPACK_CHECK_INFO
09420 if (info.GetInfo() != 0)
09421 throw LapackError(info.GetInfo(), "GetInverse",
09422 "The matrix is inversible ? ");
09423 #endif
09424
09425 }
09426
09427
09428
09429
09430
09431 template <class Prop0, class Allocator0>
09432 void GetInverse(const SeldonDiag& DiagA,
09433 Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
09434 LapackInfo& info = lapack_info)
09435 {
09436 int m = A.GetM();
09437 char uplo('U'); char diag = DiagA.Char();
09438 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09439
09440 #ifdef SELDON_LAPACK_CHECK_INFO
09441 if (info.GetInfo() != 0)
09442 throw LapackError(info.GetInfo(), "GetInverse",
09443 "The matrix is inversible ? ");
09444 #endif
09445
09446 }
09447
09448
09449 template <class Prop0, class Allocator0>
09450 void GetInverse(const SeldonDiag& DiagA,
09451 Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
09452 LapackInfo& info = lapack_info)
09453 {
09454 int m = A.GetM();
09455 char uplo('U'); char diag = DiagA.Char();
09456 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09457
09458 #ifdef SELDON_LAPACK_CHECK_INFO
09459 if (info.GetInfo() != 0)
09460 throw LapackError(info.GetInfo(), "GetInverse",
09461 "The matrix is inversible ? ");
09462 #endif
09463
09464 }
09465
09466
09467 template <class Prop0, class Allocator0>
09468 void GetInverse(const SeldonDiag& DiagA,
09469 Matrix<complex<float>, Prop0, ColUpTriangPacked,
09470 Allocator0>& A,
09471 LapackInfo& info = lapack_info)
09472 {
09473 int m = A.GetM();
09474 char uplo('U'); char diag = DiagA.Char();
09475 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
09476
09477 #ifdef SELDON_LAPACK_CHECK_INFO
09478 if (info.GetInfo() != 0)
09479 throw LapackError(info.GetInfo(), "GetInverse",
09480 "The matrix is inversible ? ");
09481 #endif
09482
09483 }
09484
09485
09486 template <class Prop0, class Allocator0>
09487 void GetInverse(const SeldonDiag& DiagA,
09488 Matrix<complex<double>, Prop0, ColUpTriangPacked,
09489 Allocator0>& A,
09490 LapackInfo& info = lapack_info)
09491 {
09492 int m = A.GetM();
09493 char uplo('U'); char diag = DiagA.Char();
09494 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
09495 &info.GetInfoRef());
09496
09497 #ifdef SELDON_LAPACK_CHECK_INFO
09498 if (info.GetInfo() != 0)
09499 throw LapackError(info.GetInfo(), "GetInverse",
09500 "The matrix is inversible ? ");
09501 #endif
09502
09503 }
09504
09505
09506
09507
09508
09509 template <class Prop0, class Allocator0>
09510 void GetInverse(Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
09511 LapackInfo& info = lapack_info)
09512 {
09513 int m = A.GetM();
09514 char uplo('L'); char diag('N');
09515 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09516
09517 #ifdef SELDON_LAPACK_CHECK_INFO
09518 if (info.GetInfo() != 0)
09519 throw LapackError(info.GetInfo(), "GetInverse",
09520 "The matrix is inversible ? ");
09521 #endif
09522
09523 }
09524
09525
09526 template <class Prop0, class Allocator0>
09527 void GetInverse(Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
09528 LapackInfo& info = lapack_info)
09529 {
09530 int m = A.GetM();
09531 char uplo('L'); char diag('N');
09532 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09533
09534 #ifdef SELDON_LAPACK_CHECK_INFO
09535 if (info.GetInfo() != 0)
09536 throw LapackError(info.GetInfo(), "GetInverse",
09537 "The matrix is inversible ? ");
09538 #endif
09539
09540 }
09541
09542
09543 template <class Prop0, class Allocator0>
09544 void GetInverse(Matrix<complex<float>, Prop0, ColLoTriangPacked,
09545 Allocator0>& A,
09546 LapackInfo& info = lapack_info)
09547 {
09548 int m = A.GetM();
09549 char uplo('L'); char diag('N');
09550 ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
09551 &info.GetInfoRef());
09552
09553 #ifdef SELDON_LAPACK_CHECK_INFO
09554 if (info.GetInfo() != 0)
09555 throw LapackError(info.GetInfo(), "GetInverse",
09556 "The matrix is inversible ? ");
09557 #endif
09558
09559 }
09560
09561
09562 template <class Prop0, class Allocator0>
09563 void GetInverse(Matrix<complex<double>, Prop0, ColLoTriangPacked,
09564 Allocator0>& A,
09565 LapackInfo& info = lapack_info)
09566 {
09567 int m = A.GetM();
09568 char uplo('L'); char diag('N');
09569 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
09570 &info.GetInfoRef());
09571
09572 #ifdef SELDON_LAPACK_CHECK_INFO
09573 if (info.GetInfo() != 0)
09574 throw LapackError(info.GetInfo(), "GetInverse",
09575 "The matrix is inversible ? ");
09576 #endif
09577
09578 }
09579
09580
09581
09582
09583
09584 template <class Prop0, class Allocator0>
09585 void GetInverse(const SeldonDiag& DiagA,
09586 Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
09587 LapackInfo& info = lapack_info)
09588 {
09589 int m = A.GetM();
09590 char uplo('L'); char diag = DiagA.Char();
09591 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09592
09593 #ifdef SELDON_LAPACK_CHECK_INFO
09594 if (info.GetInfo() != 0)
09595 throw LapackError(info.GetInfo(), "GetInverse",
09596 "The matrix is inversible ? ");
09597 #endif
09598
09599 }
09600
09601
09602 template <class Prop0, class Allocator0>
09603 void GetInverse(const SeldonDiag& DiagA,
09604 Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
09605 LapackInfo& info = lapack_info)
09606 {
09607 int m = A.GetM();
09608 char uplo('L'); char diag = DiagA.Char();
09609 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09610
09611 #ifdef SELDON_LAPACK_CHECK_INFO
09612 if (info.GetInfo() != 0)
09613 throw LapackError(info.GetInfo(), "GetInverse",
09614 "The matrix is inversible ? ");
09615 #endif
09616
09617 }
09618
09619
09620 template <class Prop0, class Allocator0>
09621 void GetInverse(const SeldonDiag& DiagA,
09622 Matrix<complex<float>, Prop0, ColLoTriangPacked,
09623 Allocator0>& A,
09624 LapackInfo& info = lapack_info)
09625 {
09626 int m = A.GetM();
09627 char uplo('L'); char diag = DiagA.Char();
09628 ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
09629 &info.GetInfoRef());
09630
09631 #ifdef SELDON_LAPACK_CHECK_INFO
09632 if (info.GetInfo() != 0)
09633 throw LapackError(info.GetInfo(), "GetInverse",
09634 "The matrix is inversible ? ");
09635 #endif
09636
09637 }
09638
09639
09640 template <class Prop0, class Allocator0>
09641 void GetInverse(const SeldonDiag& DiagA,
09642 Matrix<complex<double>, Prop0, ColLoTriangPacked,
09643 Allocator0>& A,
09644 LapackInfo& info = lapack_info)
09645 {
09646 int m = A.GetM();
09647 char uplo('L'); char diag = DiagA.Char();
09648 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
09649 &info.GetInfoRef());
09650
09651 #ifdef SELDON_LAPACK_CHECK_INFO
09652 if (info.GetInfo() != 0)
09653 throw LapackError(info.GetInfo(), "GetInverse",
09654 "The matrix is inversible ? ");
09655 #endif
09656
09657 }
09658
09659
09660
09661
09662
09663 template <class Prop0, class Allocator0>
09664 void GetInverse(Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
09665 LapackInfo& info = lapack_info)
09666 {
09667 int m = A.GetM();
09668 char uplo('L'); char diag('N');
09669 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09670 &info.GetInfoRef());
09671
09672 #ifdef SELDON_LAPACK_CHECK_INFO
09673 if (info.GetInfo() != 0)
09674 throw LapackError(info.GetInfo(), "GetInverse",
09675 "The matrix is inversible ? ");
09676 #endif
09677
09678 }
09679
09680
09681 template <class Prop0, class Allocator0>
09682 void GetInverse(Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
09683 LapackInfo& info = lapack_info)
09684 {
09685 int m = A.GetM();
09686 char uplo('L'); char diag('N');
09687 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09688 &info.GetInfoRef());
09689
09690 #ifdef SELDON_LAPACK_CHECK_INFO
09691 if (info.GetInfo() != 0)
09692 throw LapackError(info.GetInfo(), "GetInverse",
09693 "The matrix is inversible ? ");
09694 #endif
09695
09696 }
09697
09698
09699 template <class Prop0, class Allocator0>
09700 void GetInverse(Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
09701 LapackInfo& info = lapack_info)
09702 {
09703 int m = A.GetM();
09704 char uplo('L'); char diag('N');
09705 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09706 &info.GetInfoRef());
09707
09708 #ifdef SELDON_LAPACK_CHECK_INFO
09709 if (info.GetInfo() != 0)
09710 throw LapackError(info.GetInfo(), "GetInverse",
09711 "The matrix is inversible ? ");
09712 #endif
09713
09714 }
09715
09716
09717 template <class Prop0, class Allocator0>
09718 void GetInverse(Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
09719 LapackInfo& info = lapack_info)
09720 {
09721 int m = A.GetM();
09722 char uplo('L'); char diag('N');
09723 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09724 &info.GetInfoRef());
09725
09726 #ifdef SELDON_LAPACK_CHECK_INFO
09727 if (info.GetInfo() != 0)
09728 throw LapackError(info.GetInfo(), "GetInverse",
09729 "The matrix is inversible ? ");
09730 #endif
09731
09732 }
09733
09734
09735
09736
09737
09738 template <class Prop0, class Allocator0>
09739 void GetInverse(const SeldonDiag& DiagA,
09740 Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
09741 LapackInfo& info = lapack_info)
09742 {
09743 int m = A.GetM();
09744 char uplo('L'); char diag = DiagA.Char();
09745 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09746 &info.GetInfoRef());
09747
09748 #ifdef SELDON_LAPACK_CHECK_INFO
09749 if (info.GetInfo() != 0)
09750 throw LapackError(info.GetInfo(), "GetInverse",
09751 "The matrix is inversible ? ");
09752 #endif
09753
09754 }
09755
09756
09757 template <class Prop0, class Allocator0>
09758 void GetInverse(const SeldonDiag& DiagA,
09759 Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
09760 LapackInfo& info = lapack_info)
09761 {
09762 int m = A.GetM();
09763 char uplo('L'); char diag = DiagA.Char();
09764 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09765 &info.GetInfoRef());
09766
09767 #ifdef SELDON_LAPACK_CHECK_INFO
09768 if (info.GetInfo() != 0)
09769 throw LapackError(info.GetInfo(), "GetInverse",
09770 "The matrix is inversible ? ");
09771 #endif
09772
09773 }
09774
09775
09776 template <class Prop0, class Allocator0>
09777 void GetInverse(const SeldonDiag& DiagA,
09778 Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
09779 LapackInfo& info = lapack_info)
09780 {
09781 int m = A.GetM();
09782 char uplo('L'); char diag = DiagA.Char();
09783 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09784 &info.GetInfoRef());
09785
09786 #ifdef SELDON_LAPACK_CHECK_INFO
09787 if (info.GetInfo() != 0)
09788 throw LapackError(info.GetInfo(), "GetInverse",
09789 "The matrix is inversible ? ");
09790 #endif
09791
09792 }
09793
09794
09795 template <class Prop0, class Allocator0>
09796 void GetInverse(const SeldonDiag& DiagA,
09797 Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
09798 LapackInfo& info = lapack_info)
09799 {
09800 int m = A.GetM();
09801 char uplo('L'); char diag = DiagA.Char();
09802 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09803 &info.GetInfoRef());
09804
09805 #ifdef SELDON_LAPACK_CHECK_INFO
09806 if (info.GetInfo() != 0)
09807 throw LapackError(info.GetInfo(), "GetInverse",
09808 "The matrix is inversible ? ");
09809 #endif
09810
09811 }
09812
09813
09814
09815
09816
09817 template <class Prop0, class Allocator0>
09818 void GetInverse(Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
09819 LapackInfo& info = lapack_info)
09820 {
09821 int m = A.GetM();
09822 char uplo('U'); char diag('N');
09823 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09824 &info.GetInfoRef());
09825
09826 #ifdef SELDON_LAPACK_CHECK_INFO
09827 if (info.GetInfo() != 0)
09828 throw LapackError(info.GetInfo(), "GetInverse",
09829 "The matrix is inversible ? ");
09830 #endif
09831
09832 }
09833
09834
09835 template <class Prop0, class Allocator0>
09836 void GetInverse(Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
09837 LapackInfo& info = lapack_info)
09838 {
09839 int m = A.GetM();
09840 char uplo('U'); char diag('N');
09841 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09842 &info.GetInfoRef());
09843
09844 #ifdef SELDON_LAPACK_CHECK_INFO
09845 if (info.GetInfo() != 0)
09846 throw LapackError(info.GetInfo(), "GetInverse",
09847 "The matrix is inversible ? ");
09848 #endif
09849
09850 }
09851
09852
09853 template <class Prop0, class Allocator0>
09854 void GetInverse(Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
09855 LapackInfo& info = lapack_info)
09856 {
09857 int m = A.GetM();
09858 char uplo('U'); char diag('N');
09859 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09860 &info.GetInfoRef());
09861
09862 #ifdef SELDON_LAPACK_CHECK_INFO
09863 if (info.GetInfo() != 0)
09864 throw LapackError(info.GetInfo(), "GetInverse",
09865 "The matrix is inversible ? ");
09866 #endif
09867
09868 }
09869
09870
09871 template <class Prop0, class Allocator0>
09872 void GetInverse(Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
09873 LapackInfo& info = lapack_info)
09874 {
09875 int m = A.GetM();
09876 char uplo('U'); char diag('N');
09877 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09878 &info.GetInfoRef());
09879
09880 #ifdef SELDON_LAPACK_CHECK_INFO
09881 if (info.GetInfo() != 0)
09882 throw LapackError(info.GetInfo(), "GetInverse",
09883 "The matrix is inversible ? ");
09884 #endif
09885
09886 }
09887
09888
09889
09890
09891
09892 template <class Prop0, class Allocator0>
09893 void GetInverse(const SeldonDiag& DiagA,
09894 Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
09895 LapackInfo& info = lapack_info)
09896 {
09897 int m = A.GetM();
09898 char uplo('U'); char diag = DiagA.Char();
09899 strtri_(&uplo, &diag, &m, A.GetData(), &m,
09900 &info.GetInfoRef());
09901
09902 #ifdef SELDON_LAPACK_CHECK_INFO
09903 if (info.GetInfo() != 0)
09904 throw LapackError(info.GetInfo(), "GetInverse",
09905 "The matrix is inversible ? ");
09906 #endif
09907
09908 }
09909
09910
09911 template <class Prop0, class Allocator0>
09912 void GetInverse(const SeldonDiag& DiagA,
09913 Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
09914 LapackInfo& info = lapack_info)
09915 {
09916 int m = A.GetM();
09917 char uplo('U'); char diag = DiagA.Char();
09918 dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
09919 &info.GetInfoRef());
09920
09921 #ifdef SELDON_LAPACK_CHECK_INFO
09922 if (info.GetInfo() != 0)
09923 throw LapackError(info.GetInfo(), "GetInverse",
09924 "The matrix is inversible ? ");
09925 #endif
09926
09927 }
09928
09929
09930 template <class Prop0, class Allocator0>
09931 void GetInverse(const SeldonDiag& DiagA,
09932 Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
09933 LapackInfo& info = lapack_info)
09934 {
09935 int m = A.GetM();
09936 char uplo('U'); char diag = DiagA.Char();
09937 ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09938 &info.GetInfoRef());
09939
09940 #ifdef SELDON_LAPACK_CHECK_INFO
09941 if (info.GetInfo() != 0)
09942 throw LapackError(info.GetInfo(), "GetInverse",
09943 "The matrix is inversible ? ");
09944 #endif
09945
09946 }
09947
09948
09949 template <class Prop0, class Allocator0>
09950 void GetInverse(const SeldonDiag& DiagA,
09951 Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
09952 LapackInfo& info = lapack_info)
09953 {
09954 int m = A.GetM();
09955 char uplo('U'); char diag = DiagA.Char();
09956 ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
09957 &info.GetInfoRef());
09958
09959 #ifdef SELDON_LAPACK_CHECK_INFO
09960 if (info.GetInfo() != 0)
09961 throw LapackError(info.GetInfo(), "GetInverse",
09962 "The matrix is inversible ? ");
09963 #endif
09964
09965 }
09966
09967
09968
09969
09970
09971 template <class Prop0, class Allocator0>
09972 void GetInverse(Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
09973 LapackInfo& info = lapack_info)
09974 {
09975 int m = A.GetM();
09976 char uplo('L'); char diag('N');
09977 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09978
09979 #ifdef SELDON_LAPACK_CHECK_INFO
09980 if (info.GetInfo() != 0)
09981 throw LapackError(info.GetInfo(), "GetInverse",
09982 "The matrix is inversible ? ");
09983 #endif
09984
09985 }
09986
09987
09988 template <class Prop0, class Allocator0>
09989 void GetInverse(Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
09990 LapackInfo& info = lapack_info)
09991 {
09992 int m = A.GetM();
09993 char uplo('L'); char diag('N');
09994 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
09995
09996 #ifdef SELDON_LAPACK_CHECK_INFO
09997 if (info.GetInfo() != 0)
09998 throw LapackError(info.GetInfo(), "GetInverse",
09999 "The matrix is inversible ? ");
10000 #endif
10001
10002 }
10003
10004
10005 template <class Prop0, class Allocator0>
10006 void GetInverse(Matrix<complex<float>, Prop0, RowUpTriangPacked,
10007 Allocator0>& A,
10008 LapackInfo& info = lapack_info)
10009 {
10010 int m = A.GetM();
10011 char uplo('L'); char diag('N');
10012 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
10013
10014 #ifdef SELDON_LAPACK_CHECK_INFO
10015 if (info.GetInfo() != 0)
10016 throw LapackError(info.GetInfo(), "GetInverse",
10017 "The matrix is inversible ? ");
10018 #endif
10019
10020 }
10021
10022
10023 template <class Prop0, class Allocator0>
10024 void GetInverse(Matrix<complex<double>, Prop0, RowUpTriangPacked,
10025 Allocator0>& A,
10026 LapackInfo& info = lapack_info)
10027 {
10028 int m = A.GetM();
10029 char uplo('L'); char diag('N');
10030 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
10031 &info.GetInfoRef());
10032
10033 #ifdef SELDON_LAPACK_CHECK_INFO
10034 if (info.GetInfo() != 0)
10035 throw LapackError(info.GetInfo(), "GetInverse",
10036 "The matrix is inversible ? ");
10037 #endif
10038
10039 }
10040
10041
10042
10043
10044
10045 template <class Prop0, class Allocator0>
10046 void GetInverse(const SeldonDiag& DiagA,
10047 Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
10048 LapackInfo& info = lapack_info)
10049 {
10050 int m = A.GetM();
10051 char uplo('L'); char diag = DiagA.Char();
10052 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10053
10054 #ifdef SELDON_LAPACK_CHECK_INFO
10055 if (info.GetInfo() != 0)
10056 throw LapackError(info.GetInfo(), "GetInverse",
10057 "The matrix is inversible ? ");
10058 #endif
10059
10060 }
10061
10062
10063 template <class Prop0, class Allocator0>
10064 void GetInverse(const SeldonDiag& DiagA,
10065 Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
10066 LapackInfo& info = lapack_info)
10067 {
10068 int m = A.GetM();
10069 char uplo('L'); char diag = DiagA.Char();
10070 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10071
10072 #ifdef SELDON_LAPACK_CHECK_INFO
10073 if (info.GetInfo() != 0)
10074 throw LapackError(info.GetInfo(), "GetInverse",
10075 "The matrix is inversible ? ");
10076 #endif
10077
10078 }
10079
10080
10081 template <class Prop0, class Allocator0>
10082 void GetInverse(const SeldonDiag& DiagA,
10083 Matrix<complex<float>, Prop0, RowUpTriangPacked,
10084 Allocator0>& A,
10085 LapackInfo& info = lapack_info)
10086 {
10087 int m = A.GetM();
10088 char uplo('L'); char diag = DiagA.Char();
10089 ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
10090
10091 #ifdef SELDON_LAPACK_CHECK_INFO
10092 if (info.GetInfo() != 0)
10093 throw LapackError(info.GetInfo(), "GetInverse",
10094 "The matrix is inversible ? ");
10095 #endif
10096
10097 }
10098
10099
10100 template <class Prop0, class Allocator0>
10101 void GetInverse(const SeldonDiag& DiagA,
10102 Matrix<complex<double>, Prop0, RowUpTriangPacked,
10103 Allocator0>& A,
10104 LapackInfo& info = lapack_info)
10105 {
10106 int m = A.GetM();
10107 char uplo('L'); char diag = DiagA.Char();
10108 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
10109 &info.GetInfoRef());
10110
10111 #ifdef SELDON_LAPACK_CHECK_INFO
10112 if (info.GetInfo() != 0)
10113 throw LapackError(info.GetInfo(), "GetInverse",
10114 "The matrix is inversible ? ");
10115 #endif
10116
10117 }
10118
10119
10120
10121
10122
10123 template <class Prop0, class Allocator0>
10124 void GetInverse(Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
10125 LapackInfo& info = lapack_info)
10126 {
10127 int m = A.GetM();
10128 char uplo('U'); char diag('N');
10129 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10130
10131 #ifdef SELDON_LAPACK_CHECK_INFO
10132 if (info.GetInfo() != 0)
10133 throw LapackError(info.GetInfo(), "GetInverse",
10134 "The matrix is inversible ? ");
10135 #endif
10136
10137 }
10138
10139
10140 template <class Prop0, class Allocator0>
10141 void GetInverse(Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
10142 LapackInfo& info = lapack_info)
10143 {
10144 int m = A.GetM();
10145 char uplo('U'); char diag('N');
10146 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10147
10148 #ifdef SELDON_LAPACK_CHECK_INFO
10149 if (info.GetInfo() != 0)
10150 throw LapackError(info.GetInfo(), "GetInverse",
10151 "The matrix is inversible ? ");
10152 #endif
10153
10154 }
10155
10156
10157 template <class Prop0, class Allocator0>
10158 void GetInverse(Matrix<complex<float>, Prop0, RowLoTriangPacked,
10159 Allocator0>& A,
10160 LapackInfo& info = lapack_info)
10161 {
10162 int m = A.GetM();
10163 char uplo('U'); char diag('N');
10164 ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
10165 &info.GetInfoRef());
10166
10167 #ifdef SELDON_LAPACK_CHECK_INFO
10168 if (info.GetInfo() != 0)
10169 throw LapackError(info.GetInfo(), "GetInverse",
10170 "The matrix is inversible ? ");
10171 #endif
10172
10173 }
10174
10175
10176 template <class Prop0, class Allocator0>
10177 void GetInverse(Matrix<complex<double>, Prop0, RowLoTriangPacked,
10178 Allocator0>& A,
10179 LapackInfo& info = lapack_info)
10180 {
10181 int m = A.GetM();
10182 char uplo('U'); char diag('N');
10183 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
10184 &info.GetInfoRef());
10185
10186 #ifdef SELDON_LAPACK_CHECK_INFO
10187 if (info.GetInfo() != 0)
10188 throw LapackError(info.GetInfo(), "GetInverse",
10189 "The matrix is inversible ? ");
10190 #endif
10191
10192 }
10193
10194
10195
10196
10197
10198 template <class Prop0, class Allocator0>
10199 void GetInverse(const SeldonDiag& DiagA,
10200 Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
10201 LapackInfo& info = lapack_info)
10202 {
10203 int m = A.GetM();
10204 char uplo('U'); char diag = DiagA.Char();
10205 stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10206
10207 #ifdef SELDON_LAPACK_CHECK_INFO
10208 if (info.GetInfo() != 0)
10209 throw LapackError(info.GetInfo(), "GetInverse",
10210 "The matrix is inversible ? ");
10211 #endif
10212
10213 }
10214
10215
10216 template <class Prop0, class Allocator0>
10217 void GetInverse(const SeldonDiag& DiagA,
10218 Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
10219 LapackInfo& info = lapack_info)
10220 {
10221 int m = A.GetM();
10222 char uplo('U'); char diag = DiagA.Char();
10223 dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10224
10225 #ifdef SELDON_LAPACK_CHECK_INFO
10226 if (info.GetInfo() != 0)
10227 throw LapackError(info.GetInfo(), "GetInverse",
10228 "The matrix is inversible ? ");
10229 #endif
10230
10231 }
10232
10233
10234 template <class Prop0, class Allocator0>
10235 void GetInverse(const SeldonDiag& DiagA,
10236 Matrix<complex<float>, Prop0, RowLoTriangPacked,
10237 Allocator0>& A,
10238 LapackInfo& info = lapack_info)
10239 {
10240 int m = A.GetM();
10241 char uplo('U'); char diag = DiagA.Char();
10242 ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
10243 &info.GetInfoRef());
10244
10245 #ifdef SELDON_LAPACK_CHECK_INFO
10246 if (info.GetInfo() != 0)
10247 throw LapackError(info.GetInfo(), "GetInverse",
10248 "The matrix is inversible ? ");
10249 #endif
10250
10251 }
10252
10253
10254 template <class Prop0, class Allocator0>
10255 void GetInverse(const SeldonDiag& DiagA,
10256 Matrix<complex<double>, Prop0, RowLoTriangPacked,
10257 Allocator0>& A,
10258 LapackInfo& info = lapack_info)
10259 {
10260 int m = A.GetM();
10261 char uplo('U'); char diag = DiagA.Char();
10262 ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
10263 &info.GetInfoRef());
10264
10265 #ifdef SELDON_LAPACK_CHECK_INFO
10266 if (info.GetInfo() != 0)
10267 throw LapackError(info.GetInfo(), "GetInverse",
10268 "The matrix is inversible ? ");
10269 #endif
10270
10271 }
10272
10273
10274
10276
10277
10278
10280
10281
10282
10283
10284
10285
10286 template<class Prop0, class Allocator0,
10287 class Allocator1, class Allocator2>
10288 void GetScalingFactors(const Matrix<float, Prop0, ColMajor, Allocator0>& A,
10289 Vector<float, VectFull, Allocator1>& row_scale,
10290 Vector<float, VectFull, Allocator2>& col_scale,
10291 float& row_condition_number,
10292 float& col_condition_number, float& amax,
10293 LapackInfo& info = lapack_info)
10294 {
10295
10296 #ifdef SELDON_CHECK_DIMENSIONS
10297 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10298 + string(" rowcnd, colcnd, amax)"));
10299 #endif
10300
10301 int m = A.GetM(), n = A.GetN();
10302 int lda = A.GetLD();
10303 sgeequ_(&m, &n, A.GetData(), &lda, row_scale.GetData(),
10304 col_scale.GetData(), &row_condition_number, &col_condition_number,
10305 &amax, &info.GetInfoRef());
10306 }
10307
10308
10309 template<class Prop0, class Allocator0,
10310 class Allocator1, class Allocator2>
10311 void GetScalingFactors(const Matrix<double, Prop0, ColMajor, Allocator0>& A,
10312 Vector<double, VectFull, Allocator1>& row_scale,
10313 Vector<double, VectFull, Allocator2>& col_scale,
10314 double& row_condition_number,
10315 double& col_condition_number, double& amax,
10316 LapackInfo& info = lapack_info)
10317 {
10318
10319 #ifdef SELDON_CHECK_DIMENSIONS
10320 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10321 + string(" rowcnd, colcnd, amax)"));
10322 #endif
10323
10324 int m = A.GetM(), n = A.GetN();
10325 int lda = A.GetLD();
10326 dgeequ_(&m, &n, A.GetData(), &lda, row_scale.GetData(),
10327 col_scale.GetData(), &row_condition_number, &col_condition_number,
10328 &amax, &info.GetInfoRef());
10329 }
10330
10331
10332 template<class Prop0, class Allocator0,
10333 class Allocator1, class Allocator2>
10334 void GetScalingFactors(const Matrix<complex<float>, Prop0, ColMajor,
10335 Allocator0>& A,
10336 Vector<float, VectFull, Allocator1>& row_scale,
10337 Vector<float, VectFull, Allocator2>& col_scale,
10338 float& row_condition_number,
10339 float& col_condition_number, float& amax,
10340 LapackInfo& info = lapack_info)
10341 {
10342
10343 #ifdef SELDON_CHECK_DIMENSIONS
10344 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10345 +string("rowcnd, colcnd, amax)"));
10346 #endif
10347
10348 int m = A.GetM(), n = A.GetN();
10349 int lda = A.GetLD();
10350 cgeequ_(&m, &n, A.GetDataVoid(), &lda, row_scale.GetData(),
10351 col_scale.GetData(), &row_condition_number,
10352 &col_condition_number, &amax, &info.GetInfoRef());
10353 }
10354
10355
10356 template<class Prop0, class Allocator0,
10357 class Allocator1, class Allocator2>
10358 void GetScalingFactors(const Matrix<complex<double>, Prop0, ColMajor,
10359 Allocator0>& A,
10360 Vector<double, VectFull, Allocator1>& row_scale,
10361 Vector<double, VectFull, Allocator2>& col_scale,
10362 double& row_condition_number,
10363 double& col_condition_number, double& amax,
10364 LapackInfo& info = lapack_info)
10365 {
10366
10367 #ifdef SELDON_CHECK_DIMENSIONS
10368 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10369 + string("rowcnd, colcnd, amax)"));
10370 #endif
10371
10372 int m = A.GetM(), n = A.GetN();
10373 int lda = A.GetLD();
10374 zgeequ_(&m, &n, A.GetDataVoid(), &lda, row_scale.GetData(),
10375 col_scale.GetData(), &row_condition_number,
10376 &col_condition_number, &amax, &info.GetInfoRef());
10377 }
10378
10379
10380
10381
10382
10383 template<class Prop0, class Allocator0,
10384 class Allocator1, class Allocator2>
10385 void GetScalingFactors(const Matrix<float, Prop0, RowMajor, Allocator0>& A,
10386 Vector<float, VectFull, Allocator1>& row_scale,
10387 Vector<float, VectFull, Allocator2>& col_scale,
10388 float& row_condition_number,
10389 float& col_condition_number, float& amax,
10390 LapackInfo& info = lapack_info)
10391 {
10392
10393 #ifdef SELDON_CHECK_DIMENSIONS
10394 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10395 + string(" rowcnd, colcnd, amax)"));
10396 #endif
10397
10398 int m = A.GetM(), n = A.GetN();
10399 int lda = A.GetLD();
10400 sgeequ_(&n, &m, A.GetData(), &lda, col_scale.GetData(),
10401 row_scale.GetData(), &col_condition_number, &row_condition_number,
10402 &amax, &info.GetInfoRef());
10403 }
10404
10405
10406 template<class Prop0, class Allocator0,
10407 class Allocator1, class Allocator2>
10408 void GetScalingFactors(const Matrix<double, Prop0, RowMajor, Allocator0>& A,
10409 Vector<double, VectFull, Allocator1>& row_scale,
10410 Vector<double, VectFull, Allocator2>& col_scale,
10411 double& row_condition_number,
10412 double& col_condition_number, double& amax,
10413 LapackInfo& info = lapack_info)
10414 {
10415
10416 #ifdef SELDON_CHECK_DIMENSIONS
10417 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10418 + string(" rowcnd, colcnd, amax)"));
10419 #endif
10420
10421 int m = A.GetM(), n = A.GetN();
10422 int lda = A.GetLD();
10423 dgeequ_(&n, &m, A.GetData(), &lda, col_scale.GetData(),
10424 row_scale.GetData(), &col_condition_number, &row_condition_number,
10425 &amax, &info.GetInfoRef());
10426 }
10427
10428
10429 template<class Prop0, class Allocator0,
10430 class Allocator1, class Allocator2>
10431 void GetScalingFactors(const Matrix<complex<float>, Prop0, RowMajor,
10432 Allocator0>& A,
10433 Vector<float, VectFull, Allocator1>& row_scale,
10434 Vector<float, VectFull, Allocator2>& col_scale,
10435 float& row_condition_number,
10436 float& col_condition_number, float& amax,
10437 LapackInfo& info = lapack_info)
10438 {
10439
10440 #ifdef SELDON_CHECK_DIMENSIONS
10441 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y,")
10442 + string(" rowcnd, colcnd, amax)"));
10443 #endif
10444
10445 int m = A.GetM(), n = A.GetN();
10446 int lda = A.GetLD();
10447 cgeequ_(&n, &m, A.GetDataVoid(), &lda, col_scale.GetData(),
10448 row_scale.GetData(), &col_condition_number,
10449 &row_condition_number, &amax, &info.GetInfoRef());
10450 }
10451
10452
10453 template<class Prop0, class Allocator0,
10454 class Allocator1, class Allocator2>
10455 void GetScalingFactors(const Matrix<complex<double>, Prop0, RowMajor,
10456 Allocator0>& A,
10457 Vector<double, VectFull, Allocator1>& row_scale,
10458 Vector<double, VectFull, Allocator2>& col_scale,
10459 double& row_condition_number,
10460 double& col_condition_number, double& amax,
10461 LapackInfo& info = lapack_info)
10462 {
10463
10464 #ifdef SELDON_CHECK_DIMENSIONS
10465 CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10466 + string("rowcnd, colcnd, amax)"));
10467 #endif
10468
10469 int m = A.GetM(), n = A.GetN();
10470 int lda = A.GetLD();
10471 zgeequ_(&n, &m, A.GetDataVoid(), &lda, col_scale.GetData(),
10472 row_scale.GetData(), &col_condition_number,
10473 &row_condition_number, &amax, &info.GetInfoRef());
10474 }
10475
10476
10477
10479
10480
10482
10483
10484
10485 template<class Prop, class Allocator>
10486 void GetCholesky(Matrix<double, Prop, RowSymPacked, Allocator>& A,
10487 LapackInfo& info = lapack_info)
10488 {
10489 int n = A.GetN();
10490 #ifdef SELDON_CHECK_BOUNDS
10491 if (n <= 0)
10492 throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10493 #endif
10494
10495 char uplo('L');
10496 dpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef());
10497
10498 #ifdef SELDON_LAPACK_CHECK_INFO
10499 if (info.GetInfo() != 0)
10500 throw LapackError(info.GetInfo(), "GetCholesky",
10501 "An error occured during the factorization.");
10502 #endif
10503
10504 }
10505
10506
10507 template<class Prop, class Allocator>
10508 void GetCholesky(Matrix<double, Prop, ColSymPacked, Allocator>& A,
10509 LapackInfo& info = lapack_info)
10510 {
10511 int n = A.GetN();
10512 #ifdef SELDON_CHECK_BOUNDS
10513 if (n <= 0)
10514 throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10515 #endif
10516
10517 char uplo('U');
10518 dpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef());
10519
10520 #ifdef SELDON_LAPACK_CHECK_INFO
10521 if (info.GetInfo() != 0)
10522 throw LapackError(info.GetInfo(), "GetCholesky",
10523 "An error occured during the factorization.");
10524 #endif
10525
10526 }
10527
10528
10529
10531
10532
10534
10535
10536
10537 template<class Transp, class Prop, class Allocator, class Allocator2>
10538 void SolveCholesky(const Transp& TransA,
10539 const Matrix<double, Prop, RowSymPacked, Allocator>& A,
10540 Vector<double, VectFull, Allocator2>& X,
10541 LapackInfo& info = lapack_info)
10542 {
10543 #ifdef SELDON_CHECK_BOUNDS
10544 if (X.GetM() != A.GetM())
10545 throw WrongDim("SolveCholesky",
10546 "The vector should have a dimension compatible "
10547 "with the matrix.");
10548 #endif
10549
10550
10551 char uplo('L'); char trans(TransA.Char()); char diag('N');
10552 int n = A.GetM(); int nrhs = 1;
10553 dtptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(),
10554 &n, &info.GetInfoRef());
10555 }
10556
10557
10558 template<class Transp, class Prop, class Allocator, class Allocator2>
10559 void SolveCholesky(const Transp& TransA,
10560 const Matrix<double, Prop, ColSymPacked, Allocator>& A,
10561 Vector<double, VectFull, Allocator2>& X,
10562 LapackInfo& info = lapack_info)
10563 {
10564 #ifdef SELDON_CHECK_BOUNDS
10565 if (X.GetM() != A.GetM())
10566 throw WrongDim("SolveCholesky",
10567 "The vector should have a dimension compatible "
10568 "with the matrix.");
10569 #endif
10570
10571
10572 char uplo('U'); char trans(TransA.RevChar()); char diag('N');
10573 int n = A.GetM(); int nrhs = 1;
10574 dtptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(),
10575 &n, &info.GetInfoRef());
10576 }
10577
10578
10579
10581
10582
10584
10585
10586
10587 template<class Transp, class Prop, class Allocator, class Allocator2>
10588 void MltCholesky(const Transp& TransA,
10589 const Matrix<double, Prop, RowSymPacked, Allocator>& A,
10590 Vector<double, VectFull, Allocator2>& X,
10591 LapackInfo& info = lapack_info)
10592 {
10593 #ifdef SELDON_CHECK_BOUNDS
10594 if (X.GetM() != A.GetM())
10595 throw WrongDim("MltCholesky",
10596 "The vector should have a dimension compatible "
10597 "with the matrix.");
10598 #endif
10599
10600
10601 if (TransA.Trans())
10602 cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10603 A.GetM(), A.GetData(), X.GetData(), 1);
10604 else
10605 cblas_dtpmv(CblasRowMajor, CblasUpper, CblasTrans, CblasNonUnit,
10606 A.GetM(), A.GetData(), X.GetData(), 1);
10607 }
10608
10609
10610 template<class Transp, class Prop, class Allocator, class Allocator2>
10611 void MltCholesky(const Transp& TransA,
10612 const Matrix<double, Prop, ColSymPacked, Allocator>& A,
10613 Vector<double, VectFull, Allocator2>& X,
10614 LapackInfo& info = lapack_info)
10615 {
10616 #ifdef SELDON_CHECK_BOUNDS
10617 if (X.GetM() != A.GetM())
10618 throw WrongDim("MltCholesky",
10619 "The vector should have a dimension compatible "
10620 "with the matrix.");
10621 #endif
10622
10623
10624 if (TransA.Trans())
10625 cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10626 A.GetM(), A.GetData(), X.GetData(), 1);
10627 else
10628 cblas_dtpmv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit,
10629 A.GetM(), A.GetData(), X.GetData(), 1);
10630 }
10631
10632
10633
10635
10636
10637
10638
10639 template<class T, class Prop, class Storage, class Allocator,
10640 class Allocator1, class Allocator2>
10641 void GetAndSolveLU(Matrix<T, Prop, Storage, Allocator>& A,
10642 Vector<int, VectFull, Allocator1>& P,
10643 Vector<T, VectFull, Allocator2>& b,
10644 LapackInfo& info = lapack_info)
10645 {
10646 GetLU(A, P, info);
10647 SolveLU(A, P, b, info);
10648 }
10649
10650
10651 }
10652
10653 #define SELDON_FILE_LAPACK_LINEAREQUATIONS_CXX
10654 #endif