Lapack_LinearEquations.cxx
1 // Copyright (C) 2001-2009 Vivien Mallet
2 // Copyright (C) 2003-2009 Marc DuruflĂ©
3 //
4 // This file is part of the linear-algebra library Seldon,
5 // http://seldon.sourceforge.net/.
6 //
7 // Seldon is free software; you can redistribute it and/or modify it under the
8 // terms of the GNU Lesser General Public License as published by the Free
9 // Software Foundation; either version 2.1 of the License, or (at your option)
10 // any later version.
11 //
12 // Seldon is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15 // more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with Seldon. If not, see http://www.gnu.org/licenses/.
19 
20 
21 #ifndef SELDON_FILE_LAPACK_LINEAREQUATIONS_CXX
22 
23 
24 #include "Lapack_LinearEquations.hxx"
25 
26 
27 namespace Seldon
28 {
29 
30 
32  // GetLU //
33 
34 
35  /*** ColMajor ***/
36 
37 
38  template <class Prop0, class Allocator0,
39  class Allocator1>
40  void GetLU(Matrix<float, Prop0, ColMajor, Allocator0>& A,
41  Vector<int, VectFull, Allocator1>& P,
42  LapackInfo& info)
43  {
44  int m = A.GetM();
45  int n = A.GetN();
46 #ifdef SELDON_CHECK_BOUNDS
47  if ((m <= 0)||(n <= 0))
48  throw WrongDim("GetLU", "Provide a non-empty matrix");
49 #endif
50 
51  P.Reallocate(min(m, n));
52  sgetrf_(&m, &n, A.GetData(), &m,
53  P.GetData(), &info.GetInfoRef());
54 
55 #ifdef SELDON_LAPACK_CHECK_INFO
56  if (info.GetInfo() != 0)
57  throw LapackError(info.GetInfo(), "GetLU",
58  "An error occured during the factorization.");
59 #endif
60 
61  }
62 
63 
64  template <class Prop0, class Allocator0,
65  class Allocator1>
66  void GetLU(Matrix<double, Prop0, ColMajor, Allocator0>& A,
67  Vector<int, VectFull, Allocator1>& P,
68  LapackInfo& info)
69  {
70  int m = A.GetM();
71  int n = A.GetN();
72 
73 #ifdef SELDON_CHECK_BOUNDS
74  if ((m <= 0)||(n <= 0))
75  throw WrongDim("GetLU", "Provide a non-empty matrix");
76 #endif
77 
78  P.Reallocate(min(m, n));
79  dgetrf_(&m, &n, A.GetData(), &m,
80  P.GetData(), &info.GetInfoRef());
81 
82 #ifdef SELDON_LAPACK_CHECK_INFO
83  if (info.GetInfo() != 0)
84  throw LapackError(info.GetInfo(), "GetLU",
85  "An error occured during the factorization.");
86 #endif
87 
88  }
89 
90 
91  template <class Prop0, class Allocator0,
92  class Allocator1>
93  void GetLU(Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
94  Vector<int, VectFull, Allocator1>& P,
95  LapackInfo& info)
96  {
97  int m = A.GetM();
98  int n = A.GetN();
99 
100 #ifdef SELDON_CHECK_BOUNDS
101  if ((m <= 0)||(n <= 0))
102  throw WrongDim("GetLU", "Provide a non-empty matrix");
103 #endif
104 
105  P.Reallocate(min(m, n));
106  cgetrf_(&m, &n, A.GetDataVoid(), &m,
107  P.GetData(), &info.GetInfoRef());
108 
109 #ifdef SELDON_LAPACK_CHECK_INFO
110  if (info.GetInfo() != 0)
111  throw LapackError(info.GetInfo(), "GetLU",
112  "An error occured during the factorization.");
113 #endif
114 
115  }
116 
117 
118  template <class Prop0, class Allocator0,
119  class Allocator1>
120  void GetLU(Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
121  Vector<int, VectFull, Allocator1>& P,
122  LapackInfo& info)
123  {
124  int m = A.GetM();
125  int n = A.GetN();
126 
127 #ifdef SELDON_CHECK_BOUNDS
128  if ((m <= 0)||(n <= 0))
129  throw WrongDim("GetLU", "Provide a non-empty matrix");
130 #endif
131 
132  P.Reallocate(min(m, n));
133  zgetrf_(&m, &n, A.GetDataVoid(), &m,
134  P.GetData(), &info.GetInfoRef());
135 
136 #ifdef SELDON_LAPACK_CHECK_INFO
137  if (info.GetInfo() != 0)
138  throw LapackError(info.GetInfo(), "GetLU",
139  "An error occured during the factorization.");
140 #endif
141 
142  }
143 
144 
145  /*** RowMajor ***/
146 
147 
148  template <class Prop0, class Allocator0,
149  class Allocator1>
150  void GetLU(Matrix<float, Prop0, RowMajor, Allocator0>& A,
151  Vector<int, VectFull, Allocator1>& P,
152  LapackInfo& info)
153  {
154  int m = A.GetM();
155  int n = A.GetN();
156 
157 #ifdef SELDON_CHECK_BOUNDS
158  if ((m <= 0)||(n <= 0))
159  throw WrongDim("GetLU", "Provide a non-empty matrix");
160 #endif
161 
162  P.Reallocate(min(m, n));
163  sgetrf_(&m, &n, A.GetData(), &m,
164  P.GetData(), &info.GetInfoRef());
165 
166 #ifdef SELDON_LAPACK_CHECK_INFO
167  if (info.GetInfo() != 0)
168  throw LapackError(info.GetInfo(), "GetLU",
169  "An error occured during the factorization.");
170 #endif
171 
172  }
173 
174 
175  template <class Prop0, class Allocator0,
176  class Allocator1>
177  void GetLU(Matrix<double, Prop0, RowMajor, Allocator0>& A,
178  Vector<int, VectFull, Allocator1>& P,
179  LapackInfo& info)
180  {
181  int m = A.GetM();
182  int n = A.GetN();
183 
184 #ifdef SELDON_CHECK_BOUNDS
185  if ((m <= 0)||(n <= 0))
186  throw WrongDim("GetLU", "Provide a non-empty matrix");
187 #endif
188 
189  P.Reallocate(min(m, n));
190  dgetrf_(&m, &n, A.GetData(), &m,
191  P.GetData(), &info.GetInfoRef());
192 
193 #ifdef SELDON_LAPACK_CHECK_INFO
194  if (info.GetInfo() != 0)
195  throw LapackError(info.GetInfo(), "GetLU",
196  "An error occured during the factorization.");
197 #endif
198 
199  }
200 
201 
202  template <class Prop0, class Allocator0,
203  class Allocator1>
204  void GetLU(Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
205  Vector<int, VectFull, Allocator1>& P,
206  LapackInfo& info)
207  {
208  int m = A.GetM();
209  int n = A.GetN();
210 
211 #ifdef SELDON_CHECK_BOUNDS
212  if ((m <= 0)||(n <= 0))
213  throw WrongDim("GetLU", "Provide a non-empty matrix");
214 #endif
215 
216  P.Reallocate(min(m, n));
217  cgetrf_(&m, &n, A.GetDataVoid(), &m,
218  P.GetData(), &info.GetInfoRef());
219 
220 #ifdef SELDON_LAPACK_CHECK_INFO
221  if (info.GetInfo() != 0)
222  throw LapackError(info.GetInfo(), "GetLU",
223  "An error occured during the factorization.");
224 #endif
225 
226  }
227 
228 
229  template <class Prop0, class Allocator0,
230  class Allocator1>
231  void GetLU(Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
232  Vector<int, VectFull, Allocator1>& P,
233  LapackInfo& info)
234  {
235  int m = A.GetM();
236  int n = A.GetN();
237 
238 #ifdef SELDON_CHECK_BOUNDS
239  if ((m <= 0)||(n <= 0))
240  throw WrongDim("GetLU", "Provide a non-empty matrix");
241 #endif
242 
243  P.Reallocate(min(m, n));
244  zgetrf_(&m, &n, A.GetDataVoid(), &m,
245  P.GetData(), &info.GetInfoRef());
246 
247 #ifdef SELDON_LAPACK_CHECK_INFO
248  if (info.GetInfo() != 0)
249  throw LapackError(info.GetInfo(), "GetLU",
250  "An error occured during the factorization.");
251 #endif
252 
253  }
254 
255 
256  /*** ColSym and Upper ***/
257 
258 
259  template <class Prop0, class Allocator0,
260  class Allocator1>
261  void GetLU(Matrix<float, Prop0, ColSym, Allocator0>& A,
262  Vector<int, VectFull, Allocator1>& P,
263  LapackInfo& info)
264  {
265  int m = A.GetM();
266 
267 #ifdef SELDON_CHECK_BOUNDS
268  if (m <= 0)
269  throw WrongDim("GetLU", "Provide a non-empty matrix");
270 #endif
271 
272  int lwork = m;
273  char uplo('U');
274  Vector<float,VectFull,Allocator0> work(lwork);
275  P.Reallocate(m);
276  ssytrf_(&uplo, &m, A.GetData(), &m,
277  P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
278 
279 #ifdef SELDON_LAPACK_CHECK_INFO
280  if (info.GetInfo() != 0)
281  throw LapackError(info.GetInfo(), "GetLU",
282  "An error occured during the factorization.");
283 #endif
284 
285  }
286 
287 
288  template <class Prop0, class Allocator0,
289  class Allocator1>
290  void GetLU(Matrix<double, Prop0, ColSym, Allocator0>& A,
291  Vector<int, VectFull, Allocator1>& P,
292  LapackInfo& info)
293  {
294  int m = A.GetM();
295  int lwork = m;
296 
297 #ifdef SELDON_CHECK_BOUNDS
298  if (m <= 0)
299  throw WrongDim("GetLU", "Provide a non-empty matrix");
300 #endif
301 
302  char uplo('U');
303  Vector<double,VectFull,Allocator0> work(lwork);
304  P.Reallocate(m);
305  dsytrf_(&uplo, &m, A.GetData(), &m,
306  P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
307 
308 #ifdef SELDON_LAPACK_CHECK_INFO
309  if (info.GetInfo() != 0)
310  throw LapackError(info.GetInfo(), "GetLU",
311  "An error occured during the factorization.");
312 #endif
313 
314  }
315 
316 
317  template <class Prop0, class Allocator0,
318  class Allocator1>
319  void GetLU(Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
320  Vector<int, VectFull, Allocator1>& P,
321  LapackInfo& info)
322  {
323  int m = A.GetM();
324  int lwork = m;
325 
326 #ifdef SELDON_CHECK_BOUNDS
327  if (m <= 0)
328  throw WrongDim("GetLU", "Provide a non-empty matrix");
329 #endif
330 
331  char uplo('U');
332  Vector<complex<float>,VectFull,Allocator0> work(lwork);
333  P.Reallocate(m);
334  csytrf_(&uplo, &m, A.GetDataVoid(), &m,
335  P.GetData(), work.GetDataVoid(),
336  &lwork, &info.GetInfoRef());
337 
338 #ifdef SELDON_LAPACK_CHECK_INFO
339  if (info.GetInfo() != 0)
340  throw LapackError(info.GetInfo(), "GetLU",
341  "An error occured during the factorization.");
342 #endif
343 
344  }
345 
346 
347  template <class Prop0, class Allocator0,
348  class Allocator1>
349  void GetLU(Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
350  Vector<int, VectFull, Allocator1>& P,
351  LapackInfo& info)
352  {
353  int m = A.GetM();
354  int lwork = m;
355 
356 #ifdef SELDON_CHECK_BOUNDS
357  if (m <= 0)
358  throw WrongDim("GetLU", "Provide a non-empty matrix");
359 #endif
360 
361  char uplo('U');
362  Vector<complex<double>,VectFull,Allocator0> work(lwork);
363  P.Reallocate(m);
364  zsytrf_(&uplo, &m, A.GetDataVoid(), &m,
365  P.GetData(), work.GetDataVoid(),
366  &lwork, &info.GetInfoRef());
367 
368 #ifdef SELDON_LAPACK_CHECK_INFO
369  if (info.GetInfo() != 0)
370  throw LapackError(info.GetInfo(), "GetLU",
371  "An error occured during the factorization.");
372 #endif
373 
374  }
375 
376 
377  /*** ColSymPacked and Upper ***/
378 
379 
380  template <class Prop0, class Allocator0,
381  class Allocator1>
382  void GetLU(Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
383  Vector<int, VectFull, Allocator1>& P,
384  LapackInfo& info)
385  {
386  int m = A.GetM();
387 
388 #ifdef SELDON_CHECK_BOUNDS
389  if (m <= 0)
390  throw WrongDim("GetLU", "Provide a non-empty matrix");
391 #endif
392 
393  char uplo('U');
394  P.Reallocate(m);
395  ssptrf_(&uplo, &m, A.GetData(),
396  P.GetData(), &info.GetInfoRef());
397 
398 #ifdef SELDON_LAPACK_CHECK_INFO
399  if (info.GetInfo() != 0)
400  throw LapackError(info.GetInfo(), "GetLU",
401  "An error occured during the factorization.");
402 #endif
403 
404  }
405 
406 
407  template <class Prop0, class Allocator0,
408  class Allocator1>
409  void GetLU(Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
410  Vector<int, VectFull, Allocator1>& P,
411  LapackInfo& info)
412  {
413  int m = A.GetM();
414 
415 #ifdef SELDON_CHECK_BOUNDS
416  if (m <= 0)
417  throw WrongDim("GetLU", "Provide a non-empty matrix");
418 #endif
419 
420  char uplo('U');
421  P.Reallocate(m);
422  dsptrf_(&uplo, &m, A.GetData(),
423  P.GetData(), &info.GetInfoRef());
424 
425 #ifdef SELDON_LAPACK_CHECK_INFO
426  if (info.GetInfo() != 0)
427  throw LapackError(info.GetInfo(), "GetLU",
428  "An error occured during the factorization.");
429 #endif
430 
431  }
432 
433 
434  template <class Prop0, class Allocator0,
435  class Allocator1>
436  void GetLU(Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A,
437  Vector<int, VectFull, Allocator1>& P,
438  LapackInfo& info)
439  {
440  int m = A.GetM();
441 
442 #ifdef SELDON_CHECK_BOUNDS
443  if (m <= 0)
444  throw WrongDim("GetLU", "Provide a non-empty matrix");
445 #endif
446 
447  char uplo('U');
448  P.Reallocate(m);
449  csptrf_(&uplo, &m, A.GetDataVoid(),
450  P.GetData(), &info.GetInfoRef());
451 
452 #ifdef SELDON_LAPACK_CHECK_INFO
453  if (info.GetInfo() != 0)
454  throw LapackError(info.GetInfo(), "GetLU",
455  "An error occured during the factorization.");
456 #endif
457 
458  }
459 
460 
461  template <class Prop0, class Allocator0,
462  class Allocator1>
463  void GetLU(Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A,
464  Vector<int, VectFull, Allocator1>& P,
465  LapackInfo& info)
466  {
467  int m = A.GetM();
468 
469 #ifdef SELDON_CHECK_BOUNDS
470  if (m <= 0)
471  throw WrongDim("GetLU", "Provide a non-empty matrix");
472 #endif
473 
474  char uplo('U');
475  P.Reallocate(m);
476  zsptrf_(&uplo, &m, A.GetDataVoid(),
477  P.GetData(), &info.GetInfoRef());
478 
479 #ifdef SELDON_LAPACK_CHECK_INFO
480  if (info.GetInfo() != 0)
481  throw LapackError(info.GetInfo(), "GetLU",
482  "An error occured during the factorization.");
483 #endif
484 
485  }
486 
487 
488  /*** ColSymPacked and Uplo ***/
489 
490 
491  template <class Prop0, class Allocator0,
492  class Allocator1>
493  void GetLU(SeldonUplo Uplo,
494  Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
495  Vector<int, VectFull, Allocator1>& P,
496  LapackInfo& info)
497  {
498  int m = A.GetM();
499 
500 #ifdef SELDON_CHECK_BOUNDS
501  if (m <= 0)
502  throw WrongDim("GetLU", "Provide a non-empty matrix");
503 #endif
504 
505  char uplo(Uplo.Char());
506  P.Reallocate(m);
507  ssptrf_(&uplo, &m, A.GetData(),
508  P.GetData(), &info.GetInfoRef());
509 
510 #ifdef SELDON_LAPACK_CHECK_INFO
511  if (info.GetInfo() != 0)
512  throw LapackError(info.GetInfo(), "GetLU",
513  "An error occured during the factorization.");
514 #endif
515 
516  }
517 
518 
519  template <class Prop0, class Allocator0,
520  class Allocator1>
521  void GetLU(SeldonUplo Uplo,
522  Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
523  Vector<int, VectFull, Allocator1>& P,
524  LapackInfo& info)
525  {
526  int m = A.GetM();
527 
528 #ifdef SELDON_CHECK_BOUNDS
529  if (m <= 0)
530  throw WrongDim("GetLU", "Provide a non-empty matrix");
531 #endif
532 
533  char uplo(Uplo.Char());
534  P.Reallocate(m);
535  dsptrf_(&uplo, &m, A.GetData(),
536  P.GetData(), &info.GetInfoRef());
537 
538 #ifdef SELDON_LAPACK_CHECK_INFO
539  if (info.GetInfo() != 0)
540  throw LapackError(info.GetInfo(), "GetLU",
541  "An error occured during the factorization.");
542 #endif
543 
544  }
545 
546 
547  template <class Prop0, class Allocator0,
548  class Allocator1>
549  void GetLU(SeldonUplo Uplo,
550  Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A,
551  Vector<int, VectFull, Allocator1>& P,
552  LapackInfo& info)
553  {
554  int m = A.GetM();
555 
556 #ifdef SELDON_CHECK_BOUNDS
557  if (m <= 0)
558  throw WrongDim("GetLU", "Provide a non-empty matrix");
559 #endif
560 
561  char uplo(Uplo.Char());
562  P.Reallocate(m);
563  csptrf_(&uplo, &m, A.GetDataVoid(),
564  P.GetData(), &info.GetInfoRef());
565 
566 #ifdef SELDON_LAPACK_CHECK_INFO
567  if (info.GetInfo() != 0)
568  throw LapackError(info.GetInfo(), "GetLU",
569  "An error occured during the factorization.");
570 #endif
571 
572  }
573 
574 
575  template <class Prop0, class Allocator0,
576  class Allocator1>
577  void GetLU(SeldonUplo Uplo,
578  Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A,
579  Vector<int, VectFull, Allocator1>& P,
580  LapackInfo& info)
581  {
582  int m = A.GetM();
583 
584 #ifdef SELDON_CHECK_BOUNDS
585  if (m <= 0)
586  throw WrongDim("GetLU", "Provide a non-empty matrix");
587 #endif
588 
589  char uplo(Uplo.Char());
590  P.Reallocate(m);
591  zsptrf_(&uplo, &m, A.GetDataVoid(),
592  P.GetData(), &info.GetInfoRef());
593 
594 #ifdef SELDON_LAPACK_CHECK_INFO
595  if (info.GetInfo() != 0)
596  throw LapackError(info.GetInfo(), "GetLU",
597  "An error occured during the factorization.");
598 #endif
599 
600  }
601 
602 
603  /*** RowSym and Upper ***/
604 
605 
606  template <class Prop0, class Allocator0,
607  class Allocator1>
608  void GetLU(Matrix<float, Prop0, RowSym, Allocator0>& A,
609  Vector<int, VectFull, Allocator1>& P,
610  LapackInfo& info)
611  {
612  int m = A.GetM();
613 
614 #ifdef SELDON_CHECK_BOUNDS
615  if (m <= 0)
616  throw WrongDim("GetLU", "Provide a non-empty matrix");
617 #endif
618 
619  int lwork = m;
620  char uplo('L');
621  Vector<float, VectFull, Allocator0> work(lwork);
622  P.Reallocate(m);
623  ssytrf_(&uplo, &m, A.GetData(), &m,
624  P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
625 
626 #ifdef SELDON_LAPACK_CHECK_INFO
627  if (info.GetInfo() != 0)
628  throw LapackError(info.GetInfo(), "GetLU",
629  "An error occured during the factorization.");
630 #endif
631 
632  }
633 
634 
635  template <class Prop0, class Allocator0,
636  class Allocator1>
637  void GetLU(Matrix<double, Prop0, RowSym, Allocator0>& A,
638  Vector<int, VectFull, Allocator1>& P,
639  LapackInfo& info)
640  {
641  int m = A.GetM();
642 
643 #ifdef SELDON_CHECK_BOUNDS
644  if (m <= 0)
645  throw WrongDim("GetLU", "Provide a non-empty matrix");
646 #endif
647 
648  int lwork = m;
649  char uplo('L');
650  Vector<double, VectFull, Allocator0> work(lwork);
651  P.Reallocate(m);
652  dsytrf_(&uplo, &m, A.GetData(), &m,
653  P.GetData(), work.GetData(), &lwork, &info.GetInfoRef());
654 
655 #ifdef SELDON_LAPACK_CHECK_INFO
656  if (info.GetInfo() != 0)
657  throw LapackError(info.GetInfo(), "GetLU",
658  "An error occured during the factorization.");
659 #endif
660 
661  }
662 
663 
664  template <class Prop0, class Allocator0,
665  class Allocator1>
666  void GetLU(Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
667  Vector<int, VectFull, Allocator1>& P,
668  LapackInfo& info)
669  {
670  int m = A.GetM();
671 
672 #ifdef SELDON_CHECK_BOUNDS
673  if (m <= 0)
674  throw WrongDim("GetLU", "Provide a non-empty matrix");
675 #endif
676 
677  int lwork = m;
678  char uplo('L');
679  Vector<complex<float>, VectFull, Allocator0> work(lwork);
680  P.Reallocate(m);
681  csytrf_(&uplo, &m, A.GetDataVoid(), &m,
682  P.GetData(), work.GetDataVoid(),
683  &lwork, &info.GetInfoRef());
684 
685 #ifdef SELDON_LAPACK_CHECK_INFO
686  if (info.GetInfo() != 0)
687  throw LapackError(info.GetInfo(), "GetLU",
688  "An error occured during the factorization.");
689 #endif
690 
691  }
692 
693 
694  template <class Prop0, class Allocator0,
695  class Allocator1>
696  void GetLU(Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
697  Vector<int, VectFull, Allocator1>& P,
698  LapackInfo& info)
699  {
700  int m = A.GetM();
701 
702 #ifdef SELDON_CHECK_BOUNDS
703  if (m <= 0)
704  throw WrongDim("GetLU", "Provide a non-empty matrix");
705 #endif
706 
707  int lwork = m;
708  char uplo('L');
709  Vector<complex<double>, VectFull, Allocator0> work(lwork);
710  P.Reallocate(m);
711  zsytrf_(&uplo, &m, A.GetDataVoid(), &m,
712  P.GetData(), work.GetDataVoid(),
713  &lwork, &info.GetInfoRef());
714 
715 #ifdef SELDON_LAPACK_CHECK_INFO
716  if (info.GetInfo() != 0)
717  throw LapackError(info.GetInfo(), "GetLU",
718  "An error occured during the factorization.");
719 #endif
720 
721  }
722 
723 
724  /*** RowSymPacked and Upper ***/
725 
726 
727  template <class Prop0, class Allocator0,
728  class Allocator1>
729  void GetLU(Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
730  Vector<int, VectFull, Allocator1>& P,
731  LapackInfo& info)
732  {
733  int m = A.GetM();
734 
735 #ifdef SELDON_CHECK_BOUNDS
736  if (m <= 0)
737  throw WrongDim("GetLU", "Provide a non-empty matrix");
738 #endif
739 
740  char uplo('L');
741  P.Reallocate(m);
742  ssptrf_(&uplo, &m, A.GetData(),
743  P.GetData(), &info.GetInfoRef());
744 
745 #ifdef SELDON_LAPACK_CHECK_INFO
746  if (info.GetInfo() != 0)
747  throw LapackError(info.GetInfo(), "GetLU",
748  "An error occured during the factorization.");
749 #endif
750 
751  }
752 
753 
754  template <class Prop0, class Allocator0,
755  class Allocator1>
756  void GetLU(Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
757  Vector<int, VectFull, Allocator1>& P,
758  LapackInfo& info)
759  {
760  int m = A.GetM();
761 
762 #ifdef SELDON_CHECK_BOUNDS
763  if (m <= 0)
764  throw WrongDim("GetLU", "Provide a non-empty matrix");
765 #endif
766 
767  char uplo('L');
768  P.Reallocate(m);
769  dsptrf_(&uplo, &m, A.GetData(),
770  P.GetData(), &info.GetInfoRef());
771 
772 #ifdef SELDON_LAPACK_CHECK_INFO
773  if (info.GetInfo() != 0)
774  throw LapackError(info.GetInfo(), "GetLU",
775  "An error occured during the factorization.");
776 #endif
777 
778  }
779 
780 
781  template <class Prop0, class Allocator0,
782  class Allocator1>
783  void GetLU(Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A,
784  Vector<int, VectFull, Allocator1>& P,
785  LapackInfo& info)
786  {
787  int m = A.GetM();
788 
789 #ifdef SELDON_CHECK_BOUNDS
790  if (m <= 0)
791  throw WrongDim("GetLU", "Provide a non-empty matrix");
792 #endif
793 
794  char uplo('L');
795  P.Reallocate(m);
796  csptrf_(&uplo, &m, A.GetDataVoid(),
797  P.GetData(), &info.GetInfoRef());
798 
799 #ifdef SELDON_LAPACK_CHECK_INFO
800  if (info.GetInfo() != 0)
801  throw LapackError(info.GetInfo(), "GetLU",
802  "An error occured during the factorization.");
803 #endif
804 
805  }
806 
807 
808  template <class Prop0, class Allocator0,
809  class Allocator1>
810  void GetLU(Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A,
811  Vector<int, VectFull, Allocator1>& P,
812  LapackInfo& info)
813  {
814  int m = A.GetM();
815 
816 #ifdef SELDON_CHECK_BOUNDS
817  if (m <= 0)
818  throw WrongDim("GetLU", "Provide a non-empty matrix");
819 #endif
820 
821  char uplo('L');
822  P.Reallocate(m);
823  zsptrf_(&uplo, &m, A.GetDataVoid(),
824  P.GetData(), &info.GetInfoRef());
825 
826 #ifdef SELDON_LAPACK_CHECK_INFO
827  if (info.GetInfo() != 0)
828  throw LapackError(info.GetInfo(), "GetLU",
829  "An error occured during the factorization.");
830 #endif
831 
832  }
833 
834 
835  /*** RowSymPacked and Uplo ***/
836 
837 
838  template <class Prop0, class Allocator0,
839  class Allocator1>
840  void GetLU(SeldonUplo Uplo,
841  Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
842  Vector<int, VectFull, Allocator1>& P,
843  LapackInfo& info)
844  {
845  int m = A.GetM();
846 
847 #ifdef SELDON_CHECK_BOUNDS
848  if (m <= 0)
849  throw WrongDim("GetLU", "Provide a non-empty matrix");
850 #endif
851 
852  char uplo(Uplo.RevChar());
853  P.Reallocate(m);
854  ssptrf_(&uplo, &m, A.GetData(),
855  P.GetData(), &info.GetInfoRef());
856 
857 #ifdef SELDON_LAPACK_CHECK_INFO
858  if (info.GetInfo() != 0)
859  throw LapackError(info.GetInfo(), "GetLU",
860  "An error occured during the factorization.");
861 #endif
862 
863  }
864 
865 
866  template <class Prop0, class Allocator0,
867  class Allocator1>
868  void GetLU(SeldonUplo Uplo,
869  Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
870  Vector<int, VectFull, Allocator1>& P,
871  LapackInfo& info)
872  {
873  int m = A.GetM();
874 
875 #ifdef SELDON_CHECK_BOUNDS
876  if (m <= 0)
877  throw WrongDim("GetLU", "Provide a non-empty matrix");
878 #endif
879 
880  char uplo(Uplo.RevChar());
881  P.Reallocate(m);
882  dsptrf_(&uplo, &m, A.GetData(),
883  P.GetData(), &info.GetInfoRef());
884 
885 #ifdef SELDON_LAPACK_CHECK_INFO
886  if (info.GetInfo() != 0)
887  throw LapackError(info.GetInfo(), "GetLU",
888  "An error occured during the factorization.");
889 #endif
890 
891  }
892 
893 
894  template <class Prop0, class Allocator0,
895  class Allocator1>
896  void GetLU(SeldonUplo Uplo,
897  Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A,
898  Vector<int, VectFull, Allocator1>& P,
899  LapackInfo& info)
900  {
901  int m = A.GetM();
902 
903 #ifdef SELDON_CHECK_BOUNDS
904  if (m <= 0)
905  throw WrongDim("GetLU", "Provide a non-empty matrix");
906 #endif
907 
908  char uplo(Uplo.RevChar());
909  P.Reallocate(m);
910  csptrf_(&uplo, &m, A.GetDataVoid(),
911  P.GetData(), &info.GetInfoRef());
912 
913 #ifdef SELDON_LAPACK_CHECK_INFO
914  if (info.GetInfo() != 0)
915  throw LapackError(info.GetInfo(), "GetLU",
916  "An error occured during the factorization.");
917 #endif
918 
919  }
920 
921 
922  template <class Prop0, class Allocator0,
923  class Allocator1>
924  void GetLU(SeldonUplo Uplo,
925  Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A,
926  Vector<int, VectFull, Allocator1>& P,
927  LapackInfo& info)
928  {
929  int m = A.GetM();
930 
931 #ifdef SELDON_CHECK_BOUNDS
932  if (m <= 0)
933  throw WrongDim("GetLU", "Provide a non-empty matrix");
934 #endif
935 
936  char uplo(Uplo.RevChar());
937  P.Reallocate(m);
938  zsptrf_(&uplo, &m, A.GetDataVoid(),
939  P.GetData(), &info.GetInfoRef());
940 
941 #ifdef SELDON_LAPACK_CHECK_INFO
942  if (info.GetInfo() != 0)
943  throw LapackError(info.GetInfo(), "GetLU",
944  "An error occured during the factorization.");
945 #endif
946 
947  }
948 
949 
950  /*** ColHerm and Upper ***/
951 
952 
953  template <class Prop0, class Allocator0,
954  class Allocator1>
955  void GetLU(Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
956  Vector<int, VectFull, Allocator1>& P,
957  LapackInfo& info)
958  {
959  int m = A.GetM();
960 
961 #ifdef SELDON_CHECK_BOUNDS
962  if (m <= 0)
963  throw WrongDim("GetLU", "Provide a non-empty matrix");
964 #endif
965 
966  int lwork = m;
967  char uplo('U');
968  Vector<complex<float>, VectFull, Allocator0> work(lwork);
969  P.Reallocate(m);
970  chetrf_(&uplo, &m, A.GetDataVoid(), &m,
971  P.GetData(), work.GetDataVoid(),
972  &lwork, &info.GetInfoRef());
973 
974 #ifdef SELDON_LAPACK_CHECK_INFO
975  if (info.GetInfo() != 0)
976  throw LapackError(info.GetInfo(), "GetLU",
977  "An error occured during the factorization.");
978 #endif
979 
980  }
981 
982 
983  template <class Prop0, class Allocator0,
984  class Allocator1>
985  void GetLU(Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
986  Vector<int, VectFull, Allocator1>& P,
987  LapackInfo& info)
988  {
989  int m = A.GetM();
990 
991 #ifdef SELDON_CHECK_BOUNDS
992  if (m <= 0)
993  throw WrongDim("GetLU", "Provide a non-empty matrix");
994 #endif
995 
996  int lwork = m;
997  char uplo('U');
998  Vector<complex<double>, VectFull, Allocator0> work(lwork);
999  P.Reallocate(m);
1000  zhetrf_(&uplo, &m, A.GetDataVoid(), &m,
1001  P.GetData(), work.GetDataVoid(),
1002  &lwork, &info.GetInfoRef());
1003 
1004 #ifdef SELDON_LAPACK_CHECK_INFO
1005  if (info.GetInfo() != 0)
1006  throw LapackError(info.GetInfo(), "GetLU",
1007  "An error occured during the factorization.");
1008 #endif
1009 
1010  }
1011 
1012 
1013  /*** ColHermPacked and Upper ***/
1014 
1015 
1016  template <class Prop0, class Allocator0,
1017  class Allocator1>
1018  void GetLU(Matrix<complex<float>, Prop0, ColHermPacked, Allocator0>& A,
1019  Vector<int, VectFull, Allocator1>& P,
1020  LapackInfo& info)
1021  {
1022  int m = A.GetM();
1023 
1024 #ifdef SELDON_CHECK_BOUNDS
1025  if (m <= 0)
1026  throw WrongDim("GetLU", "Provide a non-empty matrix");
1027 #endif
1028 
1029  char uplo('U');
1030  P.Reallocate(m);
1031  chptrf_(&uplo, &m, A.GetDataVoid(),
1032  P.GetData(), &info.GetInfoRef());
1033 
1034 #ifdef SELDON_LAPACK_CHECK_INFO
1035  if (info.GetInfo() != 0)
1036  throw LapackError(info.GetInfo(), "GetLU",
1037  "An error occured during the factorization.");
1038 #endif
1039 
1040  }
1041 
1042 
1043  template <class Prop0, class Allocator0,
1044  class Allocator1>
1045  void GetLU(Matrix<complex<double>, Prop0, ColHermPacked, Allocator0>& A,
1046  Vector<int, VectFull, Allocator1>& P,
1047  LapackInfo& info)
1048  {
1049  int m = A.GetM();
1050 
1051 #ifdef SELDON_CHECK_DIMENSIONS
1052  if (m <= 0)
1053  throw WrongDim("GetLU", "Provide a non-empty matrix");
1054 #endif
1055 
1056  char uplo('U');
1057  P.Reallocate(m);
1058  zhptrf_(&uplo, &m, A.GetDataVoid(),
1059  P.GetData(), &info.GetInfoRef());
1060 
1061 #ifdef SELDON_LAPACK_CHECK_INFO
1062  if (info.GetInfo() != 0)
1063  throw LapackError(info.GetInfo(), "GetLU",
1064  "An error occured during the factorization.");
1065 #endif
1066 
1067  }
1068 
1069 
1070  /*** RowHerm and Upper ***/
1071 
1072 
1073  template <class Prop0, class Allocator0,
1074  class Allocator1>
1075  void GetLU(Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
1076  Vector<int, VectFull, Allocator1>& P,
1077  LapackInfo& info)
1078  {
1079  int m = A.GetM();
1080 
1081 #ifdef SELDON_CHECK_DIMENSIONS
1082  if (m <= 0)
1083  throw WrongDim("GetLU", "Provide a non-empty matrix");
1084 #endif
1085 
1086  int lwork = m;
1087  char uplo('L');
1088  Vector<complex<float>, VectFull, Allocator0> work(lwork);
1089  P.Reallocate(m);
1090  chetrf_(&uplo, &m, A.GetDataVoid(), &m,
1091  P.GetData(), work.GetDataVoid(),
1092  &lwork, &info.GetInfoRef());
1093 
1094 #ifdef SELDON_LAPACK_CHECK_INFO
1095  if (info.GetInfo() != 0)
1096  throw LapackError(info.GetInfo(), "GetLU",
1097  "An error occured during the factorization.");
1098 #endif
1099 
1100  }
1101 
1102 
1103  template <class Prop0, class Allocator0,
1104  class Allocator1>
1105  void GetLU(Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
1106  Vector<int, VectFull, Allocator1>& P,
1107  LapackInfo& info)
1108  {
1109  int m = A.GetM();
1110 
1111 #ifdef SELDON_CHECK_DIMENSIONS
1112  if (m <= 0)
1113  throw WrongDim("GetLU", "Provide a non-empty matrix");
1114 #endif
1115 
1116  int lwork = m;
1117  char uplo('L');
1118  Vector<complex<double>, VectFull, Allocator0> work(lwork);
1119  P.Reallocate(m);
1120  zhetrf_(&uplo, &m, A.GetDataVoid(), &m,
1121  P.GetData(), work.GetDataVoid(),
1122  &lwork, &info.GetInfoRef());
1123 
1124 #ifdef SELDON_LAPACK_CHECK_INFO
1125  if (info.GetInfo() != 0)
1126  throw LapackError(info.GetInfo(), "GetLU",
1127  "An error occured during the factorization.");
1128 #endif
1129 
1130  }
1131 
1132 
1133  /*** RowSymPacked and Upper ***/
1134 
1135 
1136  template <class Prop0, class Allocator0,
1137  class Allocator1>
1138  void GetLU(Matrix<complex<float>, Prop0, RowHermPacked, Allocator0>& A,
1139  Vector<int, VectFull, Allocator1>& P,
1140  LapackInfo& info)
1141  {
1142  int m = A.GetM();
1143 
1144 #ifdef SELDON_CHECK_DIMENSIONS
1145  if (m <= 0)
1146  throw WrongDim("GetLU", "Provide a non-empty matrix");
1147 #endif
1148 
1149  char uplo('L');
1150  P.Reallocate(m);
1151  chptrf_(&uplo, &m, A.GetDataVoid(),
1152  P.GetData(), &info.GetInfoRef());
1153 
1154 #ifdef SELDON_LAPACK_CHECK_INFO
1155  if (info.GetInfo() != 0)
1156  throw LapackError(info.GetInfo(), "GetLU",
1157  "An error occured during the factorization.");
1158 #endif
1159 
1160  }
1161 
1162 
1163  template <class Prop0, class Allocator0,
1164  class Allocator1>
1165  void GetLU(Matrix<complex<double>, Prop0, RowHermPacked, Allocator0>& A,
1166  Vector<int, VectFull, Allocator1>& P,
1167  LapackInfo& info)
1168  {
1169  int m = A.GetM();
1170 
1171 #ifdef SELDON_CHECK_DIMENSIONS
1172  if (m <= 0)
1173  throw WrongDim("GetLU", "Provide a non-empty matrix");
1174 #endif
1175 
1176  char uplo('L');
1177  P.Reallocate(m);
1178  zhptrf_(&uplo, &m, A.GetDataVoid(),
1179  P.GetData(), &info.GetInfoRef());
1180 
1181 #ifdef SELDON_LAPACK_CHECK_INFO
1182  if (info.GetInfo() != 0)
1183  throw LapackError(info.GetInfo(), "GetLU",
1184  "An error occured during the factorization.");
1185 #endif
1186 
1187  }
1188 
1189 
1190  // GetLU //
1192 
1193 
1194 
1196  // SolveLU //
1197 
1198 
1199  /*** ColMajor and NoTrans ***/
1200 
1201 
1202  template <class Prop0, class Allocator0,
1203  class Allocator1,class Allocator2>
1204  void SolveLuVector(const Matrix<float, Prop0, ColMajor, Allocator0>& A,
1205  const Vector<int, VectFull, Allocator1>& P,
1206  Vector<float, VectFull, Allocator2>& b,
1207  LapackInfo& info)
1208  {
1209 
1210 #ifdef SELDON_CHECK_DIMENSIONS
1211  CheckDim(A, b, "SolveLU(A, pivot, X)");
1212 #endif
1213 
1214  int m = A.GetM();
1215  int nrhs = 1;
1216  char trans('N');
1217  sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
1218  b.GetData(), &m, &info.GetInfoRef() );
1219  }
1220 
1221 
1222  template <class Prop0, class Allocator0,
1223  class Allocator1, class Allocator2>
1224  void SolveLuVector(const Matrix<double, Prop0, ColMajor, Allocator0>& A,
1225  const Vector<int, VectFull, Allocator1>& P,
1226  Vector<double, VectFull, Allocator2>& b,
1227  LapackInfo& info)
1228  {
1229 
1230 #ifdef SELDON_CHECK_DIMENSIONS
1231  CheckDim(A, b, "SolveLU(A, pivot, X)");
1232 #endif
1233 
1234  int m = A.GetM();
1235  int nrhs = 1;
1236  char trans('N');
1237  dgetrs_(&trans, &m, &nrhs, A.GetData(), &m,P.GetData(),
1238  b.GetData(), &m, &info.GetInfoRef() );
1239  }
1240 
1241 
1242  template <class Prop0, class Allocator0,
1243  class Allocator1, class Allocator2>
1244  void SolveLuVector(const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
1245  const Vector<int, VectFull, Allocator1>& P,
1246  Vector<complex<float>, VectFull, Allocator2>& b,
1247  LapackInfo& info)
1248  {
1249 
1250 #ifdef SELDON_CHECK_DIMENSIONS
1251  CheckDim(A, b, "SolveLU(A, pivot, X)");
1252 #endif
1253 
1254  int m = A.GetM();
1255  int nrhs = 1;
1256  char trans('N');
1257  cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m,
1258  P.GetData(), b.GetDataVoid(),
1259  &m, &info.GetInfoRef() );
1260  }
1261 
1262 
1263  template <class Prop0, class Allocator0,
1264  class Allocator1, class Allocator2>
1265  void SolveLuVector(const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
1266  const Vector<int, VectFull, Allocator1>& P,
1267  Vector<complex<double>, VectFull, Allocator2>& b,
1268  LapackInfo& info)
1269  {
1270 
1271 #ifdef SELDON_CHECK_DIMENSIONS
1272  CheckDim(A, b, "SolveLU(A, pivot, X)");
1273 #endif
1274 
1275  int m = A.GetM();
1276  int nrhs = 1;
1277  char trans('N');
1278  zgetrs_(&trans, &m, &nrhs, A.GetData(), &m,
1279  P.GetData(), b.GetDataVoid(),
1280  &m, &info.GetInfoRef() );
1281  }
1282 
1283 
1284  /*** ColMajor ***/
1285 
1286 
1287  template <class Prop0, class Allocator0,
1288  class Allocator1,class Allocator2>
1289  void SolveLuVector(const SeldonTranspose& TransA,
1290  const Matrix<float, Prop0, ColMajor, Allocator0>& A,
1291  const Vector<int, VectFull, Allocator1>& P,
1292  Vector<float, VectFull, Allocator2>& b,
1293  LapackInfo& info)
1294  {
1295 
1296 #ifdef SELDON_CHECK_DIMENSIONS
1297  CheckDim(A, b, "SolveLU(A, pivot, X)");
1298 #endif
1299 
1300  int m = A.GetM();
1301  int nrhs = 1;
1302  char trans = TransA.Char();
1303  sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
1304  b.GetData(), &m, &info.GetInfoRef());
1305  }
1306 
1307  template <class Prop0, class Allocator0,
1308  class Allocator1,class Allocator2>
1309  void SolveLuVector(const SeldonTranspose& TransA,
1310  const Matrix<double, Prop0, ColMajor, Allocator0>& A,
1311  const Vector<int, VectFull, Allocator1>& P,
1312  Vector<double, VectFull, Allocator2>& b,
1313  LapackInfo& info)
1314  {
1315 
1316 #ifdef SELDON_CHECK_DIMENSIONS
1317  CheckDim(A, b, "SolveLU(A, pivot, X)");
1318 #endif
1319 
1320  int m = A.GetM();
1321  int nrhs = 1;
1322  char trans = TransA.Char();
1323  dgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
1324  b.GetData(), &m, &info.GetInfoRef());
1325  }
1326 
1327  template <class Prop0, class Allocator0,
1328  class Allocator1,class Allocator2>
1329  void SolveLuVector(const SeldonTranspose& TransA,
1330  const Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
1331  const Vector<int, VectFull, Allocator1>& P,
1332  Vector<complex<float>, VectFull, Allocator2>& b,
1333  LapackInfo& info)
1334  {
1335 
1336 #ifdef SELDON_CHECK_DIMENSIONS
1337  CheckDim(A, b, "SolveLU(A, pivot, X)");
1338 #endif
1339 
1340  int m = A.GetM();
1341  int nrhs = 1;
1342  char trans = TransA.Char();
1343  cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
1344  b.GetDataVoid(), &m, &info.GetInfoRef());
1345  }
1346 
1347  template <class Prop0, class Allocator0,
1348  class Allocator1,class Allocator2>
1349  void SolveLuVector(const SeldonTranspose& TransA,
1350  const Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
1351  const Vector<int, VectFull, Allocator1>& P,
1352  Vector<complex<double>, VectFull, Allocator2>& b,
1353  LapackInfo& info)
1354  {
1355 
1356 #ifdef SELDON_CHECK_DIMENSIONS
1357  CheckDim(A, b, "SolveLU(A, pivot, X)");
1358 #endif
1359 
1360  int m = A.GetM();
1361  int nrhs = 1;
1362  char trans = TransA.Char();
1363  zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
1364  b.GetDataVoid(), &m, &info.GetInfoRef());
1365  }
1366 
1367  /*** RowMajor and NoTrans***/
1368 
1369 
1370  template <class Prop0, class Allocator0,
1371  class Allocator1,class Allocator2>
1372  void SolveLuVector(const Matrix<float, Prop0, RowMajor, Allocator0>& A,
1373  const Vector<int, VectFull, Allocator1>& P,
1374  Vector<float, VectFull, Allocator2>& b,
1375  LapackInfo& info)
1376  {
1377 
1378 #ifdef SELDON_CHECK_DIMENSIONS
1379  CheckDim(A, b, "SolveLU(A, pivot, X)");
1380 #endif
1381 
1382  int m = A.GetM();
1383  int nrhs = 1;
1384  char trans('T');
1385  sgetrs_(&trans, &m, &nrhs, A.GetData(), &m,
1386  P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
1387  }
1388 
1389 
1390  template <class Prop0, class Allocator0,
1391  class Allocator1,class Allocator2>
1392  void SolveLuVector(const Matrix<double, Prop0, RowMajor, Allocator0>& A,
1393  const Vector<int, VectFull, Allocator1>& P,
1394  Vector<double, VectFull, Allocator2>& b,
1395  LapackInfo& info)
1396  {
1397 
1398 #ifdef SELDON_CHECK_DIMENSIONS
1399  CheckDim(A, b, "SolveLU(A, pivot, X)");
1400 #endif
1401 
1402  int m = A.GetM();
1403  int nrhs = 1;
1404  char trans('T');
1405  dgetrs_(&trans, &m, &nrhs, A.GetData(), &m,
1406  P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
1407  }
1408 
1409 
1410  template <class Prop0, class Allocator0,
1411  class Allocator1,class Allocator2>
1412  void SolveLuVector(const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
1413  const Vector<int, VectFull, Allocator1>& P,
1414  Vector<complex<float>, VectFull, Allocator2>& b,
1415  LapackInfo& info)
1416  {
1417 
1418 #ifdef SELDON_CHECK_DIMENSIONS
1419  CheckDim(A, b, "SolveLU(A, pivot, X)");
1420 #endif
1421 
1422  int m = A.GetM();
1423  int nrhs = 1;
1424  char trans('T');
1425  cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m,
1426  P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
1427  }
1428 
1429 
1430  template <class Prop0, class Allocator0,
1431  class Allocator1,class Allocator2>
1432  void SolveLuVector(const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
1433  const Vector<int, VectFull, Allocator1>& P,
1434  Vector<complex<double>, VectFull, Allocator2>& b,
1435  LapackInfo& info)
1436  {
1437 
1438 #ifdef SELDON_CHECK_DIMENSIONS
1439  CheckDim(A, b, "SolveLU(A, pivot, X)");
1440 #endif
1441 
1442  int m = A.GetM();
1443  int nrhs = 1;
1444  char trans('T');
1445  zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m,
1446  P.GetData(), b.GetData(), &m, &info.GetInfoRef() );
1447  }
1448 
1449 
1450  /*** RowMajor ***/
1451 
1452 
1453  template <class Prop0, class Allocator0,
1454  class Allocator1,class Allocator2>
1455  void SolveLuVector(const SeldonTranspose& TransA,
1456  const Matrix<float, Prop0, RowMajor, Allocator0>& A,
1457  const Vector<int, VectFull, Allocator1>& P,
1458  Vector<float, VectFull, Allocator2>& b,
1459  LapackInfo& info)
1460  {
1461 
1462 #ifdef SELDON_CHECK_DIMENSIONS
1463  CheckDim(A, b, "SolveLU(A, pivot, X)");
1464 #endif
1465 
1466  int m = A.GetM();
1467  int nrhs = 1;
1468  char trans = TransA.RevChar();
1469  sgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
1470  b.GetData(), &m, &info.GetInfoRef());
1471  }
1472 
1473  template <class Prop0, class Allocator0,
1474  class Allocator1,class Allocator2>
1475  void SolveLuVector(const SeldonTranspose& TransA,
1476  const Matrix<double, Prop0, RowMajor, Allocator0>& A,
1477  const Vector<int, VectFull, Allocator1>& P,
1478  Vector<double, VectFull, Allocator2>& b,
1479  LapackInfo& info)
1480  {
1481 
1482 #ifdef SELDON_CHECK_DIMENSIONS
1483  CheckDim(A, b, "SolveLU(A, pivot, X)");
1484 #endif
1485 
1486  int m = A.GetM();
1487  int nrhs = 1;
1488  char trans = TransA.RevChar();
1489  dgetrs_(&trans, &m, &nrhs, A.GetData(), &m, P.GetData(),
1490  b.GetData(), &m, &info.GetInfoRef());
1491  }
1492 
1493  template <class Prop0, class Allocator0,
1494  class Allocator1,class Allocator2>
1495  void SolveLuVector(const SeldonTranspose& TransA,
1496  const Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
1497  const Vector<int, VectFull, Allocator1>& P,
1498  Vector<complex<float>, VectFull, Allocator2>& b,
1499  LapackInfo& info)
1500  {
1501 
1502 #ifdef SELDON_CHECK_DIMENSIONS
1503  CheckDim(A, b, "SolveLU(A, pivot, X)");
1504 #endif
1505 
1506  int m = A.GetM();
1507  int nrhs = 1;
1508  char trans = TransA.RevChar();
1509  if (TransA.ConjTrans())
1510  Conjugate(b);
1511 
1512  cgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
1513  b.GetDataVoid(), &m, &info.GetInfoRef());
1514 
1515  if (TransA.ConjTrans())
1516  Conjugate(b);
1517  }
1518 
1519  template <class Prop0, class Allocator0,
1520  class Allocator1,class Allocator2>
1521  void SolveLuVector(const SeldonTranspose& TransA,
1522  const Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
1523  const Vector<int, VectFull, Allocator1>& P,
1524  Vector<complex<double>, VectFull, Allocator2>& b,
1525  LapackInfo& info)
1526  {
1527 
1528 #ifdef SELDON_CHECK_DIMENSIONS
1529  CheckDim(A, b, "SolveLU(A, pivot, X)");
1530 #endif
1531 
1532  int m = A.GetM();
1533  int nrhs = 1;
1534  char trans = TransA.RevChar();
1535  if (TransA.ConjTrans())
1536  Conjugate(b);
1537 
1538  zgetrs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, P.GetData(),
1539  b.GetDataVoid(), &m, &info.GetInfoRef());
1540 
1541  if (TransA.ConjTrans())
1542  Conjugate(b);
1543  }
1544 
1545 
1546  /*** ColSym and Upper ***/
1547 
1548 
1549  template <class Prop0, class Allocator0,
1550  class Allocator1, class Allocator2>
1551  void SolveLuVector(const Matrix<float, Prop0, ColSym, Allocator0>& A,
1552  const Vector<int, VectFull, Allocator1>& P,
1553  Vector<float, VectFull, Allocator2>& b,
1554  LapackInfo& info)
1555  {
1556 
1557 #ifdef SELDON_CHECK_DIMENSIONS
1558  CheckDim(A, b, "SolveLU(A, pivot, X)");
1559 #endif
1560 
1561  int m = A.GetM(); int nrhs = 1;
1562  char uplo('U');
1563  ssytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
1564  P.GetData(), b.GetData(), &m, &info.GetInfoRef());
1565  }
1566 
1567 
1568  template <class Prop0, class Allocator0,
1569  class Allocator1, class Allocator2>
1570  void SolveLuVector(const Matrix<double, Prop0, ColSym, Allocator0>& A,
1571  const Vector<int, VectFull, Allocator1>& P,
1572  Vector<double, VectFull, Allocator2>& b,
1573  LapackInfo& info)
1574  {
1575 
1576 #ifdef SELDON_CHECK_DIMENSIONS
1577  CheckDim(A, b, "SolveLU(A, pivot, X)");
1578 #endif
1579 
1580  int m = A.GetM(); int nrhs = 1;
1581  char uplo('U');
1582  dsytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
1583  P.GetData(), b.GetData(), &m, &info.GetInfoRef());
1584  }
1585 
1586 
1587  template <class Prop0, class Allocator0,
1588  class Allocator1, class Allocator2>
1589  void SolveLuVector(const Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
1590  const Vector<int, VectFull, Allocator1>& P,
1591  Vector<complex<float>, VectFull, Allocator2>& b,
1592  LapackInfo& info)
1593  {
1594 
1595 #ifdef SELDON_CHECK_DIMENSIONS
1596  CheckDim(A, b, "SolveLU(A, pivot, X)");
1597 #endif
1598 
1599  int m = A.GetM(); int nrhs = 1;
1600  char uplo('U');
1601  csytrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
1602  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1603  }
1604 
1605 
1606  template <class Prop0, class Allocator0,
1607  class Allocator1, class Allocator2>
1608  void SolveLuVector(const Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
1609  const Vector<int, VectFull, Allocator1>& P,
1610  Vector<complex<double>, VectFull, Allocator2>& b,
1611  LapackInfo& info)
1612  {
1613 
1614 #ifdef SELDON_CHECK_DIMENSIONS
1615  CheckDim(A, b, "SolveLU(A, pivot, X)");
1616 #endif
1617 
1618  int m = A.GetM(); int nrhs = 1;
1619  char uplo('U');
1620  zsytrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
1621  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1622  }
1623 
1624 
1625  /*** ColSymPacked and Upper ***/
1626 
1627 
1628  template <class Prop0, class Allocator0,
1629  class Allocator1, class Allocator2>
1630  void SolveLuVector(const Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
1631  const Vector<int, VectFull, Allocator1>& P,
1632  Vector<float, VectFull, Allocator2>& b,
1633  LapackInfo& info)
1634  {
1635 
1636 #ifdef SELDON_CHECK_DIMENSIONS
1637  CheckDim(A, b, "SolveLU(A, pivot, X)");
1638 #endif
1639 
1640  int m = A.GetM();
1641  int nrhs = 1;
1642  char uplo('U');
1643  ssptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
1644  b.GetData(), &m, &info.GetInfoRef() );
1645  }
1646 
1647 
1648  template <class Prop0, class Allocator0,
1649  class Allocator1, class Allocator2>
1650  void SolveLuVector(const Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
1651  const Vector<int, VectFull, Allocator1>& P,
1652  Vector<double, VectFull, Allocator2>& b,
1653  LapackInfo& info)
1654  {
1655 
1656 #ifdef SELDON_CHECK_DIMENSIONS
1657  CheckDim(A, b, "SolveLU(A, pivot, X)");
1658 #endif
1659 
1660  int m = A.GetM();
1661  int nrhs = 1;
1662  char uplo('U');
1663  dsptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
1664  b.GetData(), &m, &info.GetInfoRef() );
1665  }
1666 
1667 
1668  template <class Prop0, class Allocator0,
1669  class Allocator1,class Allocator2>
1670  void SolveLuVector(const Matrix<complex<float>, Prop0, ColSymPacked,
1671  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
1672  Vector<complex<float>, VectFull, Allocator2>& b,
1673  LapackInfo& info)
1674  {
1675 
1676 #ifdef SELDON_CHECK_DIMENSIONS
1677  CheckDim(A, b, "SolveLU(A, pivot, X)");
1678 #endif
1679 
1680  int m = A.GetM();
1681  int nrhs = 1;
1682  char uplo('U');
1683  csptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
1684  b.GetData(), &m, &info.GetInfoRef() );
1685  }
1686 
1687 
1688  template <class Prop0, class Allocator0,
1689  class Allocator1, class Allocator2>
1690  void SolveLuVector(const Matrix<complex<double>, Prop0, ColSymPacked,
1691  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
1692  Vector<complex<double>, VectFull, Allocator2>& b,
1693  LapackInfo& info)
1694  {
1695 
1696 #ifdef SELDON_CHECK_DIMENSIONS
1697  CheckDim(A, b, "SolveLU(A, pivot, X)");
1698 #endif
1699 
1700  int m = A.GetM();
1701  int nrhs = 1;
1702  char uplo('U');
1703  zsptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
1704  b.GetData(), &m, &info.GetInfoRef() );
1705  }
1706 
1707 
1708  /*** RowSym and Upper ***/
1709 
1710 
1711  template <class Prop0, class Allocator0,
1712  class Allocator1, class Allocator2>
1713  void SolveLuVector(const Matrix<float, Prop0, RowSym, Allocator0>& A,
1714  const Vector<int, VectFull, Allocator1>& P,
1715  Vector<float, VectFull, Allocator2>& b,
1716  LapackInfo& info)
1717  {
1718 
1719 #ifdef SELDON_CHECK_DIMENSIONS
1720  CheckDim(A, b, "SolveLU(A, pivot, X)");
1721 #endif
1722 
1723  int m = A.GetM(); int nrhs = 1;
1724  char uplo('L');
1725  ssytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
1726  P.GetData(), b.GetData(), &m, &info.GetInfoRef());
1727  }
1728 
1729 
1730  template <class Prop0, class Allocator0,
1731  class Allocator1, class Allocator2>
1732  void SolveLuVector(const Matrix<double, Prop0, RowSym, Allocator0>& A,
1733  const Vector<int, VectFull, Allocator1>& P,
1734  Vector<double, VectFull, Allocator2>& b,
1735  LapackInfo& info)
1736  {
1737 
1738 #ifdef SELDON_CHECK_DIMENSIONS
1739  CheckDim(A, b, "SolveLU(A, pivot, X)");
1740 #endif
1741 
1742  int m = A.GetM(); int nrhs = 1;
1743  char uplo('L');
1744  dsytrs_(&uplo, &m, &nrhs, A.GetData(), &m,
1745  P.GetData(), b.GetData(), &m, &info.GetInfoRef());
1746  }
1747 
1748 
1749  template <class Prop0, class Allocator0,
1750  class Allocator1, class Allocator2>
1751  void SolveLuVector(const Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
1752  const Vector<int, VectFull, Allocator1>& P,
1753  Vector<complex<float>, VectFull, Allocator2>& b,
1754  LapackInfo& info)
1755  {
1756 
1757 #ifdef SELDON_CHECK_DIMENSIONS
1758  CheckDim(A, b, "SolveLU(A, pivot, X)");
1759 #endif
1760 
1761  int m = A.GetM(); int nrhs = 1;
1762  char uplo('L');
1763  csytrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
1764  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1765  }
1766 
1767 
1768  template <class Prop0, class Allocator0,
1769  class Allocator1, class Allocator2>
1770  void SolveLuVector(const Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
1771  const Vector<int, VectFull, Allocator1>& P,
1772  Vector<complex<double>, VectFull, Allocator2>& b,
1773  LapackInfo& info)
1774  {
1775 
1776 #ifdef SELDON_CHECK_DIMENSIONS
1777  CheckDim(A, b, "SolveLU(A, pivot, X)");
1778 #endif
1779 
1780  int m = A.GetM(); int nrhs = 1;
1781  char uplo('L');
1782  zsytrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
1783  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1784  }
1785 
1786 
1787  /*** RowSymPacked and Upper ***/
1788 
1789 
1790  template <class Prop0, class Allocator0,
1791  class Allocator1, class Allocator2>
1792  void SolveLuVector(const Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
1793  const Vector<int, VectFull, Allocator1>& P,
1794  Vector<float, VectFull, Allocator2>& b,
1795  LapackInfo& info)
1796  {
1797 
1798 #ifdef SELDON_CHECK_DIMENSIONS
1799  CheckDim(A, b, "SolveLU(A, pivot, X)");
1800 #endif
1801 
1802  int m = A.GetM();
1803  int nrhs = 1;
1804  char uplo('L');
1805  ssptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
1806  b.GetData(), &m, &info.GetInfoRef() );
1807  }
1808 
1809 
1810  template <class Prop0, class Allocator0,
1811  class Allocator1, class Allocator2>
1812  void SolveLuVector(const Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
1813  const Vector<int, VectFull, Allocator1>& P,
1814  Vector<double, VectFull, Allocator2>& b,
1815  LapackInfo& info)
1816  {
1817 
1818 #ifdef SELDON_CHECK_DIMENSIONS
1819  CheckDim(A, b, "SolveLU(A, pivot, X)");
1820 #endif
1821 
1822  int m = A.GetM();
1823  int nrhs = 1;
1824  char uplo('L');
1825  dsptrs_(&uplo, &m, &nrhs, A.GetData(), P.GetData(),
1826  b.GetData(), &m, &info.GetInfoRef() );
1827  }
1828 
1829 
1830  template <class Prop0, class Allocator0,
1831  class Allocator1, class Allocator2>
1832  void SolveLuVector(const Matrix<complex<float>, Prop0, RowSymPacked,
1833  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
1834  Vector<complex<float>, VectFull, Allocator2>& b,
1835  LapackInfo& info)
1836  {
1837 
1838 #ifdef SELDON_CHECK_DIMENSIONS
1839  CheckDim(A, b, "SolveLU(A, pivot, X)");
1840 #endif
1841 
1842  int m = A.GetM();
1843  int nrhs = 1;
1844  char uplo('L');
1845  csptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
1846  b.GetData(), &m, &info.GetInfoRef() );
1847  }
1848 
1849 
1850  template <class Prop0, class Allocator0,
1851  class Allocator1, class Allocator2>
1852  void SolveLuVector(const Matrix<complex<double>, Prop0, RowSymPacked,
1853  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
1854  Vector<complex<double>, VectFull, Allocator2>& b,
1855  LapackInfo& info)
1856  {
1857 
1858 #ifdef SELDON_CHECK_DIMENSIONS
1859  CheckDim(A, b, "SolveLU(A, pivot, X)");
1860 #endif
1861 
1862  int m = A.GetM();
1863  int nrhs = 1;
1864  char uplo('L');
1865  zsptrs_(&uplo, &m, &nrhs, A.GetDataVoid(), P.GetData(),
1866  b.GetData(), &m, &info.GetInfoRef() );
1867  }
1868 
1869 
1870  /*** ColHerm and Upper ***/
1871 
1872 
1873  template <class Prop0, class Allocator0,
1874  class Allocator1, class Allocator2>
1875  void SolveLuVector(const Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
1876  const Vector<int, VectFull, Allocator1>& P,
1877  Vector<complex<float>, VectFull, Allocator2>& b,
1878  LapackInfo& info)
1879  {
1880 
1881 #ifdef SELDON_CHECK_DIMENSIONS
1882  CheckDim(A, b, "SolveLU(A, pivot, X)");
1883 #endif
1884 
1885  int m = A.GetM(); int nrhs = 1;
1886  char uplo('U');
1887  chetrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
1888  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1889  }
1890 
1891 
1892  template <class Prop0, class Allocator0,
1893  class Allocator1, class Allocator2>
1894  void SolveLuVector(const Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
1895  const Vector<int, VectFull, Allocator1>& P,
1896  Vector<complex<double>, VectFull, Allocator2>& b,
1897  LapackInfo& info)
1898  {
1899 
1900 #ifdef SELDON_CHECK_DIMENSIONS
1901  CheckDim(A, b, "SolveLU(A, pivot, X)");
1902 #endif
1903 
1904  int m = A.GetM(); int nrhs = 1;
1905  char uplo('U');
1906  zhetrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
1907  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1908  }
1909 
1910 
1911  /*** ColHermPacked and Upper ***/
1912 
1913 
1914  template <class Prop0, class Allocator0,
1915  class Allocator1, class Allocator2>
1916  void SolveLuVector(const Matrix<complex<float>, Prop0, ColHermPacked,
1917  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
1918  Vector<complex<float>, VectFull, Allocator2>& b,
1919  LapackInfo& info)
1920  {
1921 
1922 #ifdef SELDON_CHECK_DIMENSIONS
1923  CheckDim(A, b, "SolveLU(A, pivot, X)");
1924 #endif
1925 
1926  int m = A.GetM(); int nrhs = 1;
1927  char uplo('U');
1928  chptrs_(&uplo, &m, & nrhs, A.GetDataVoid(),
1929  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1930  }
1931 
1932 
1933  template <class Prop0, class Allocator0,
1934  class Allocator1, class Allocator2>
1935  void SolveLuVector(const Matrix<complex<double>, Prop0, ColHermPacked,
1936  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
1937  Vector<complex<double>, VectFull, Allocator2>& b,
1938  LapackInfo& info)
1939  {
1940 
1941 #ifdef SELDON_CHECK_DIMENSIONS
1942  CheckDim(A, b, "SolveLU(A, pivot, X)");
1943 #endif
1944 
1945  int m = A.GetM(); int nrhs = 1;
1946  char uplo('U');
1947  zhptrs_(&uplo, &m, &nrhs, A.GetDataVoid(),
1948  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1949  }
1950 
1951 
1952  /*** RowHerm and Upper ***/
1953 
1954 
1955  template <class Prop0, class Allocator0,
1956  class Allocator1, class Allocator2>
1957  void SolveLuVector(const Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
1958  const Vector<int, VectFull, Allocator1>& P,
1959  Vector<complex<float>, VectFull, Allocator2>& b,
1960  LapackInfo& info)
1961  {
1962 
1963 #ifdef SELDON_CHECK_DIMENSIONS
1964  CheckDim(A, b, "SolveLU(A, pivot, X)");
1965 #endif
1966 
1967  int m = A.GetM(); int nrhs = 1;
1968  char uplo('L');
1969  Conjugate(b);
1970  chetrs_(&uplo, &m, & nrhs, A.GetDataVoid(), &m,
1971  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1972  Conjugate(b);
1973  }
1974 
1975 
1976  template <class Prop0, class Allocator0,
1977  class Allocator1, class Allocator2>
1978  void SolveLuVector(const Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
1979  const Vector<int, VectFull, Allocator1>& P,
1980  Vector<complex<double>, VectFull, Allocator2>& b,
1981  LapackInfo& info)
1982  {
1983 
1984 #ifdef SELDON_CHECK_DIMENSIONS
1985  CheckDim(A, b, "SolveLU(A, pivot, X)");
1986 #endif
1987 
1988  int m = A.GetM(); int nrhs = 1;
1989  char uplo('L');
1990  Conjugate(b);
1991  zhetrs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m,
1992  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
1993  Conjugate(b);
1994  }
1995 
1996 
1997  /*** RowHermPacked and Upper ***/
1998 
1999 
2000  template <class Prop0, class Allocator0,
2001  class Allocator1, class Allocator2>
2002  void SolveLuVector(const Matrix<complex<float>, Prop0, RowHermPacked,
2003  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
2004  Vector<complex<float>, VectFull, Allocator2>& b,
2005  LapackInfo& info)
2006  {
2007 
2008 #ifdef SELDON_CHECK_DIMENSIONS
2009  CheckDim(A, b, "SolveLU(A, pivot, X)");
2010 #endif
2011 
2012  int m = A.GetM(); int nrhs = 1;
2013  char uplo('L');
2014  Conjugate(b);
2015  chptrs_(&uplo, &m, & nrhs, A.GetDataVoid(),
2016  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
2017  Conjugate(b);
2018  }
2019 
2020 
2021  template <class Prop0, class Allocator0,
2022  class Allocator1, class Allocator2>
2023  void SolveLuVector(const Matrix<complex<double>, Prop0, RowHermPacked,
2024  Allocator0>& A, const Vector<int, VectFull, Allocator1>& P,
2025  Vector<complex<double>, VectFull, Allocator2>& b,
2026  LapackInfo& info)
2027  {
2028 
2029 #ifdef SELDON_CHECK_DIMENSIONS
2030  CheckDim(A, b, "SolveLU(A, pivot, X)");
2031 #endif
2032 
2033  int m = A.GetM(); int nrhs = 1;
2034  char uplo('L');
2035  Conjugate(b);
2036  zhptrs_(&uplo, &m, &nrhs, A.GetDataVoid(),
2037  P.GetData(), b.GetDataVoid(), &m, &info.GetInfoRef());
2038  Conjugate(b);
2039  }
2040 
2041 
2042  /*** ColUpTriang, NoTrans and NonUnit ***/
2043 
2044 
2045  template <class Prop0, class Allocator0, class Allocator2>
2046  void SolveLU(const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
2047  Vector<float, VectFull, Allocator2>& b,
2048  LapackInfo& info)
2049  {
2050 
2051 #ifdef SELDON_CHECK_DIMENSIONS
2052  CheckDim(A, b, "SolveLU(A, X)");
2053 #endif
2054 
2055  int m = A.GetM(); int nrhs = 1;
2056  char uplo('U'); char trans('N'); char diag('N');
2057  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2058  b.GetData(), &m, &info.GetInfoRef());
2059  }
2060 
2061 
2062  template <class Prop0, class Allocator0, class Allocator2>
2063  void SolveLU(const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
2064  Vector<double, VectFull, Allocator2>& b,
2065  LapackInfo& info)
2066  {
2067 
2068 #ifdef SELDON_CHECK_DIMENSIONS
2069  CheckDim(A, b, "SolveLU(A, X)");
2070 #endif
2071 
2072  int m = A.GetM(); int nrhs = 1;
2073  char uplo('U'); char trans('N'); char diag('N');
2074  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2075  b.GetData(), &m, &info.GetInfoRef());
2076  }
2077 
2078 
2079  template <class Prop0, class Allocator0, class Allocator2>
2080  void SolveLU(const Matrix<complex<float>, Prop0, ColUpTriang,
2081  Allocator0>& A,
2082  Vector<complex<float>, VectFull, Allocator2>& b,
2083  LapackInfo& info)
2084  {
2085 
2086 #ifdef SELDON_CHECK_DIMENSIONS
2087  CheckDim(A, b, "SolveLU(A, X)");
2088 #endif
2089 
2090  int m = A.GetM(); int nrhs = 1;
2091  char uplo('U'); char trans('N'); char diag('N');
2092  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2093  b.GetDataVoid(), &m, &info.GetInfoRef());
2094  }
2095 
2096 
2097  template <class Prop0, class Allocator0, class Allocator2>
2098  void SolveLU(const Matrix<complex<double>, Prop0, ColUpTriang,
2099  Allocator0>& A,
2100  Vector<complex<double>, VectFull, Allocator2>& b,
2101  LapackInfo& info)
2102  {
2103 
2104 #ifdef SELDON_CHECK_DIMENSIONS
2105  CheckDim(A, b, "SolveLU(A, X)");
2106 #endif
2107 
2108  int m = A.GetM(); int nrhs = 1;
2109  char uplo('U'); char trans('N'); char diag('N');
2110  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2111  b.GetDataVoid(), &m, &info.GetInfoRef());
2112 
2113  }
2114 
2115 
2116  /*** ColUpTriang ***/
2117 
2118 
2119  template <class Prop0, class Allocator0, class Allocator2>
2120  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2121  const Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
2122  Vector<float, VectFull, Allocator2>& b,
2123  LapackInfo& info)
2124  {
2125 
2126 #ifdef SELDON_CHECK_DIMENSIONS
2127  CheckDim(A, b, "SolveLU(A, X)");
2128 #endif
2129 
2130  int m = A.GetM(); int nrhs = 1;
2131  char uplo('U');
2132  char trans = TransA.Char(); char diag = DiagA.Char();
2133  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2134  b.GetData(), &m, &info.GetInfoRef());
2135  }
2136 
2137 
2138  template <class Prop0, class Allocator0, class Allocator2>
2139  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2140  const Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
2141  Vector<double, VectFull, Allocator2>& b,
2142  LapackInfo& info)
2143  {
2144 
2145 #ifdef SELDON_CHECK_DIMENSIONS
2146  CheckDim(A, b, "SolveLU(A, X)");
2147 #endif
2148 
2149  int m = A.GetM(); int nrhs = 1;
2150  char uplo('U');
2151  char trans = TransA.Char(); char diag = DiagA.Char();
2152  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2153  b.GetData(), &m, &info.GetInfoRef());
2154  }
2155 
2156 
2157  template <class Prop0, class Allocator0, class Allocator2>
2158  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2159  const Matrix<complex<float>, Prop0, ColUpTriang,
2160  Allocator0>& A,
2161  Vector<complex<float>, VectFull, Allocator2>& b,
2162  LapackInfo& info)
2163  {
2164 
2165 #ifdef SELDON_CHECK_DIMENSIONS
2166  CheckDim(A, b, "SolveLU(A, X)");
2167 #endif
2168 
2169  int m = A.GetM(); int nrhs = 1;
2170  char uplo('U');
2171  char trans = TransA.Char(); char diag = DiagA.Char();
2172  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2173  b.GetDataVoid(), &m, &info.GetInfoRef());
2174  }
2175 
2176 
2177  template <class Prop0, class Allocator0, class Allocator2>
2178  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2179  const Matrix<complex<double>, Prop0, ColUpTriang,
2180  Allocator0>& A,
2181  Vector<complex<double>, VectFull, Allocator2>& b,
2182  LapackInfo& info)
2183  {
2184 
2185 #ifdef SELDON_CHECK_DIMENSIONS
2186  CheckDim(A, b, "SolveLU(A, X)");
2187 #endif
2188 
2189  int m = A.GetM(); int nrhs = 1;
2190  char uplo('U');
2191  char trans = TransA.Char(); char diag = DiagA.Char();
2192  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2193  b.GetDataVoid(), &m, &info.GetInfoRef());
2194 
2195  }
2196 
2197 
2198  /*** ColLoTriang, NoTrans and NonUnit ***/
2199 
2200 
2201  template <class Prop0, class Allocator0, class Allocator2>
2202  void SolveLU(const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
2203  Vector<float, VectFull, Allocator2>& b,
2204  LapackInfo& info)
2205  {
2206 
2207 #ifdef SELDON_CHECK_DIMENSIONS
2208  CheckDim(A, b, "SolveLU(A, X)");
2209 #endif
2210 
2211  int m = A.GetM(); int nrhs = 1;
2212  char uplo('L'); char trans('N'); char diag('N');
2213  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2214  b.GetData(), &m, &info.GetInfoRef());
2215  }
2216 
2217 
2218  template <class Prop0, class Allocator0, class Allocator2>
2219  void SolveLU(const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
2220  Vector<double, VectFull, Allocator2>& b,
2221  LapackInfo& info)
2222  {
2223 
2224 #ifdef SELDON_CHECK_DIMENSIONS
2225  CheckDim(A, b, "SolveLU(A, X)");
2226 #endif
2227 
2228  int m = A.GetM(); int nrhs = 1;
2229  char uplo('L'); char trans('N'); char diag('N');
2230  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2231  b.GetData(), &m, &info.GetInfoRef());
2232 
2233  }
2234 
2235 
2236  template <class Prop0, class Allocator0, class Allocator2>
2237  void SolveLU(const Matrix<complex<float>, Prop0, ColLoTriang,
2238  Allocator0>& A,
2239  Vector<complex<float>, VectFull, Allocator2>& b,
2240  LapackInfo& info)
2241  {
2242 
2243 #ifdef SELDON_CHECK_DIMENSIONS
2244  CheckDim(A, b, "SolveLU(A, X)");
2245 #endif
2246 
2247  int m = A.GetM(); int nrhs = 1;
2248  char uplo('L'); char trans('N'); char diag('N');
2249  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2250  b.GetDataVoid(), &m, &info.GetInfoRef());
2251  }
2252 
2253 
2254  template <class Prop0, class Allocator0, class Allocator2>
2255  void SolveLU(const Matrix<complex<double>, Prop0, ColLoTriang,
2256  Allocator0>& A,
2257  Vector<complex<double>, VectFull, Allocator2>& b,
2258  LapackInfo& info)
2259  {
2260 
2261 #ifdef SELDON_CHECK_DIMENSIONS
2262  CheckDim(A, b, "SolveLU(A, X)");
2263 #endif
2264 
2265  int m = A.GetM(); int nrhs = 1;
2266  char uplo('L'); char trans('N'); char diag('N');
2267  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2268  b.GetDataVoid(), &m, &info.GetInfoRef());
2269 
2270  }
2271 
2272 
2273  /*** ColLoTriang ***/
2274 
2275 
2276  template <class Prop0, class Allocator0, class Allocator2>
2277  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2278  const Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
2279  Vector<float, VectFull, Allocator2>& b,
2280  LapackInfo& info)
2281  {
2282 
2283 #ifdef SELDON_CHECK_DIMENSIONS
2284  CheckDim(A, b, "SolveLU(A, X)");
2285 #endif
2286 
2287  int m = A.GetM(); int nrhs = 1;
2288  char uplo('L');
2289  char trans = TransA.Char(); char diag = DiagA.Char();
2290  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2291  b.GetData(), &m, &info.GetInfoRef());
2292  }
2293 
2294 
2295  template <class Prop0, class Allocator0, class Allocator2>
2296  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2297  const Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
2298  Vector<double, VectFull, Allocator2>& b,
2299  LapackInfo& info)
2300  {
2301 
2302 #ifdef SELDON_CHECK_DIMENSIONS
2303  CheckDim(A, b, "SolveLU(A, X)");
2304 #endif
2305 
2306  int m = A.GetM(); int nrhs = 1;
2307  char uplo('L');
2308  char trans = TransA.Char(); char diag = DiagA.Char();
2309  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2310  b.GetData(), &m, &info.GetInfoRef());
2311 
2312  }
2313 
2314 
2315  template <class Prop0, class Allocator0, class Allocator2>
2316  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2317  const Matrix<complex<float>, Prop0, ColLoTriang,
2318  Allocator0>& A,
2319  Vector<complex<float>, VectFull, Allocator2>& b,
2320  LapackInfo& info)
2321  {
2322 
2323 #ifdef SELDON_CHECK_DIMENSIONS
2324  CheckDim(A, b, "SolveLU(A, X)");
2325 #endif
2326 
2327  int m = A.GetM(); int nrhs = 1;
2328  char uplo('L');
2329  char trans = TransA.Char(); char diag = DiagA.Char();
2330  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2331  b.GetDataVoid(), &m, &info.GetInfoRef());
2332  }
2333 
2334 
2335  template <class Prop0, class Allocator0, class Allocator2>
2336  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2337  const Matrix<complex<double>, Prop0, ColLoTriang,
2338  Allocator0>& A,
2339  Vector<complex<double>, VectFull, Allocator2>& b,
2340  LapackInfo& info)
2341  {
2342 
2343 #ifdef SELDON_CHECK_DIMENSIONS
2344  CheckDim(A, b, "SolveLU(A, X)");
2345 #endif
2346 
2347  int m = A.GetM(); int nrhs = 1;
2348  char uplo('L');
2349  char trans = TransA.Char(); char diag = DiagA.Char();
2350  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2351  b.GetDataVoid(), &m, &info.GetInfoRef());
2352 
2353  }
2354 
2355 
2356  /*** ColUpTriangPacked, NoTrans, and NonUnit ***/
2357 
2358 
2359  template <class Prop0, class Allocator0, class Allocator2>
2360  void SolveLU(const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
2361  Vector<float, VectFull, Allocator2>& b,
2362  LapackInfo& info)
2363  {
2364 
2365 #ifdef SELDON_CHECK_DIMENSIONS
2366  CheckDim(A, b, "SolveLU(A, X)");
2367 #endif
2368 
2369  int m = A.GetM(); int nrhs = 1;
2370  char uplo('U'); char trans('N'); char diag('N');
2371  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2372  b.GetData(), &m, &info.GetInfoRef());
2373  }
2374 
2375 
2376  template <class Prop0, class Allocator0, class Allocator2>
2377  void SolveLU(const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
2378  Vector<double, VectFull, Allocator2>& b,
2379  LapackInfo& info)
2380  {
2381 
2382 #ifdef SELDON_CHECK_DIMENSIONS
2383  CheckDim(A, b, "SolveLU(A, X)");
2384 #endif
2385 
2386  int m = A.GetM(); int nrhs = 1;
2387  char uplo('U'); char trans('N'); char diag('N');
2388  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2389  b.GetData(), &m, &info.GetInfoRef());
2390 
2391  }
2392 
2393 
2394  template <class Prop0, class Allocator0, class Allocator2>
2395  void SolveLU(const Matrix<complex<float>, Prop0, ColUpTriangPacked,
2396  Allocator0>& A,
2397  Vector<complex<float>, VectFull, Allocator2>& b,
2398  LapackInfo& info)
2399  {
2400 
2401 #ifdef SELDON_CHECK_DIMENSIONS
2402  CheckDim(A, b, "SolveLU(A, X)");
2403 #endif
2404 
2405  int m = A.GetM(); int nrhs = 1;
2406  char uplo('U'); char trans('N'); char diag('N');
2407  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2408  b.GetDataVoid(), &m, &info.GetInfoRef());
2409  }
2410 
2411 
2412  template <class Prop0, class Allocator0, class Allocator2>
2413  void SolveLU(const Matrix<complex<double>, Prop0, ColUpTriangPacked,
2414  Allocator0>& A,
2415  Vector<complex<double>, VectFull, Allocator2>& b,
2416  LapackInfo& info)
2417  {
2418 
2419 #ifdef SELDON_CHECK_DIMENSIONS
2420  CheckDim(A, b, "SolveLU(A, X)");
2421 #endif
2422 
2423  int m = A.GetM(); int nrhs = 1;
2424  char uplo('U'); char trans('N'); char diag('N');
2425  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2426  b.GetDataVoid(), &m, &info.GetInfoRef());
2427 
2428  }
2429 
2430 
2431  /*** ColUpTriangPacked ***/
2432 
2433 
2434  template <class Prop0, class Allocator0, class Allocator2>
2435  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2436  const Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
2437  Vector<float, VectFull, Allocator2>& b,
2438  LapackInfo& info)
2439  {
2440 
2441 #ifdef SELDON_CHECK_DIMENSIONS
2442  CheckDim(A, b, "SolveLU(A, X)");
2443 #endif
2444 
2445  int m = A.GetM(); int nrhs = 1;
2446  char uplo('U');
2447  char trans = TransA.Char(); char diag = DiagA.Char();
2448  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2449  b.GetData(), &m, &info.GetInfoRef());
2450  }
2451 
2452 
2453  template <class Prop0, class Allocator0, class Allocator2>
2454  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2455  const Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
2456  Vector<double, VectFull, Allocator2>& b,
2457  LapackInfo& info)
2458  {
2459 
2460 #ifdef SELDON_CHECK_DIMENSIONS
2461  CheckDim(A, b, "SolveLU(A, X)");
2462 #endif
2463 
2464  int m = A.GetM(); int nrhs = 1;
2465  char uplo('U');
2466  char trans = TransA.Char(); char diag = DiagA.Char();
2467  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2468  b.GetData(), &m, &info.GetInfoRef());
2469 
2470  }
2471 
2472 
2473  template <class Prop0, class Allocator0, class Allocator2>
2474  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2475  const Matrix<complex<float>, Prop0, ColUpTriangPacked,
2476  Allocator0>& A,
2477  Vector<complex<float>, VectFull, Allocator2>& b,
2478  LapackInfo& info)
2479  {
2480 
2481 #ifdef SELDON_CHECK_DIMENSIONS
2482  CheckDim(A, b, "SolveLU(A, X)");
2483 #endif
2484 
2485  int m = A.GetM(); int nrhs = 1;
2486  char uplo('U');
2487  char trans = TransA.Char(); char diag = DiagA.Char();
2488  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2489  b.GetDataVoid(), &m, &info.GetInfoRef());
2490  }
2491 
2492 
2493  template <class Prop0, class Allocator0, class Allocator2>
2494  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2495  const Matrix<complex<double>, Prop0, ColUpTriangPacked,
2496  Allocator0>& A,
2497  Vector<complex<double>, VectFull, Allocator2>& b,
2498  LapackInfo& info)
2499  {
2500 
2501 #ifdef SELDON_CHECK_DIMENSIONS
2502  CheckDim(A, b, "SolveLU(A, X)");
2503 #endif
2504 
2505  int m = A.GetM(); int nrhs = 1;
2506  char uplo('U');
2507  char trans = TransA.Char(); char diag = DiagA.Char();
2508  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2509  b.GetDataVoid(), &m, &info.GetInfoRef());
2510 
2511  }
2512 
2513 
2514  /*** ColLoTriangPacked, NoTrans and NonUnit ***/
2515 
2516 
2517  template <class Prop0, class Allocator0, class Allocator2>
2518  void SolveLU(const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
2519  Vector<float, VectFull, Allocator2>& b,
2520  LapackInfo& info)
2521  {
2522 
2523 #ifdef SELDON_CHECK_DIMENSIONS
2524  CheckDim(A, b, "SolveLU(A, X)");
2525 #endif
2526 
2527  int m = A.GetM(); int nrhs = 1;
2528  char uplo('L'); char trans('N'); char diag('N');
2529  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2530  b.GetData(), &m, &info.GetInfoRef());
2531  }
2532 
2533 
2534  template <class Prop0, class Allocator0, class Allocator2>
2535  void SolveLU(const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
2536  Vector<double, VectFull, Allocator2>& b,
2537  LapackInfo& info)
2538  {
2539 
2540 #ifdef SELDON_CHECK_DIMENSIONS
2541  CheckDim(A, b, "SolveLU(A, X)");
2542 #endif
2543 
2544  int m = A.GetM(); int nrhs = 1;
2545  char uplo('L'); char trans('N'); char diag('N');
2546  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2547  b.GetData(), &m, &info.GetInfoRef());
2548 
2549  }
2550 
2551 
2552  template <class Prop0, class Allocator0, class Allocator2>
2553  void SolveLU(const Matrix<complex<float>, Prop0, ColLoTriangPacked,
2554  Allocator0>& A,
2555  Vector<complex<float>, VectFull, Allocator2>& b,
2556  LapackInfo& info)
2557  {
2558 
2559 #ifdef SELDON_CHECK_DIMENSIONS
2560  CheckDim(A, b, "SolveLU(A, X)");
2561 #endif
2562 
2563  int m = A.GetM(); int nrhs = 1;
2564  char uplo('L'); char trans('N'); char diag('N');
2565  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2566  b.GetDataVoid(), &m, &info.GetInfoRef());
2567  }
2568 
2569 
2570  template <class Prop0, class Allocator0, class Allocator2>
2571  void SolveLU(const Matrix<complex<double>, Prop0, ColLoTriangPacked,
2572  Allocator0>& A,
2573  Vector<complex<double>, VectFull, Allocator2>& b,
2574  LapackInfo& info)
2575  {
2576 
2577 #ifdef SELDON_CHECK_DIMENSIONS
2578  CheckDim(A, b, "SolveLU(A, X)");
2579 #endif
2580 
2581  int m = A.GetM(); int nrhs = 1;
2582  char uplo('L'); char trans('N'); char diag('N');
2583  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2584  b.GetDataVoid(), &m, &info.GetInfoRef());
2585 
2586  }
2587 
2588 
2589  /*** ColLoTriangPacked ***/
2590 
2591 
2592  template <class Prop0, class Allocator0, class Allocator2>
2593  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2594  const Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
2595  Vector<float, VectFull, Allocator2>& b,
2596  LapackInfo& info)
2597  {
2598 
2599 #ifdef SELDON_CHECK_DIMENSIONS
2600  CheckDim(A, b, "SolveLU(A, X)");
2601 #endif
2602 
2603  int m = A.GetM(); int nrhs = 1;
2604  char uplo('L');
2605  char trans = TransA.Char(); char diag = DiagA.Char();
2606  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2607  b.GetData(), &m, &info.GetInfoRef());
2608  }
2609 
2610 
2611  template <class Prop0, class Allocator0, class Allocator2>
2612  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2613  const Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
2614  Vector<double, VectFull, Allocator2>& b,
2615  LapackInfo& info)
2616  {
2617 
2618 #ifdef SELDON_CHECK_DIMENSIONS
2619  CheckDim(A, b, "SolveLU(A, X)");
2620 #endif
2621 
2622  int m = A.GetM(); int nrhs = 1;
2623  char uplo('L');
2624  char trans = TransA.Char(); char diag = DiagA.Char();
2625  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
2626  b.GetData(), &m, &info.GetInfoRef());
2627 
2628  }
2629 
2630 
2631  template <class Prop0, class Allocator0, class Allocator2>
2632  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2633  const Matrix<complex<float>, Prop0, ColLoTriangPacked,
2634  Allocator0>& A,
2635  Vector<complex<float>, VectFull, Allocator2>& b,
2636  LapackInfo& info)
2637  {
2638 
2639 #ifdef SELDON_CHECK_DIMENSIONS
2640  CheckDim(A, b, "SolveLU(A, X)");
2641 #endif
2642 
2643  int m = A.GetM(); int nrhs = 1;
2644  char uplo('L');
2645  char trans = TransA.Char(); char diag = DiagA.Char();
2646  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2647  b.GetDataVoid(), &m, &info.GetInfoRef());
2648  }
2649 
2650 
2651  template <class Prop0, class Allocator0, class Allocator2>
2652  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2653  const Matrix<complex<double>, Prop0, ColLoTriangPacked,
2654  Allocator0>& A,
2655  Vector<complex<double>, VectFull, Allocator2>& b,
2656  LapackInfo& info)
2657  {
2658 
2659 #ifdef SELDON_CHECK_DIMENSIONS
2660  CheckDim(A, b, "SolveLU(A, X)");
2661 #endif
2662 
2663  int m = A.GetM(); int nrhs = 1;
2664  char uplo('L');
2665  char trans = TransA.Char(); char diag = DiagA.Char();
2666  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
2667  b.GetDataVoid(), &m, &info.GetInfoRef());
2668 
2669  }
2670 
2671 
2672  /*** RowUpTriang, NoTrans and NonUnit ***/
2673 
2674 
2675  template <class Prop0, class Allocator0, class Allocator2>
2676  void SolveLU(const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
2677  Vector<float, VectFull, Allocator2>& b,
2678  LapackInfo& info)
2679  {
2680 
2681 #ifdef SELDON_CHECK_DIMENSIONS
2682  CheckDim(A, b, "SolveLU(A, X)");
2683 #endif
2684 
2685  int m = A.GetM(); int nrhs = 1;
2686  char uplo('L'); char trans('T'); char diag('N');
2687  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2688  b.GetData(), &m, &info.GetInfoRef());
2689  }
2690 
2691 
2692  template <class Prop0, class Allocator0, class Allocator2>
2693  void SolveLU(const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
2694  Vector<double, VectFull, Allocator2>& b,
2695  LapackInfo& info)
2696  {
2697 
2698 #ifdef SELDON_CHECK_DIMENSIONS
2699  CheckDim(A, b, "SolveLU(A, X)");
2700 #endif
2701 
2702  int m = A.GetM(); int nrhs = 1;
2703  char uplo('L'); char trans('T'); char diag('N');
2704  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2705  b.GetData(), &m, &info.GetInfoRef());
2706 
2707  }
2708 
2709 
2710  template <class Prop0, class Allocator0, class Allocator2>
2711  void
2712  SolveLU(const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
2713  Vector<complex<float>, VectFull, Allocator2>& b,
2714  LapackInfo& info)
2715  {
2716 
2717 #ifdef SELDON_CHECK_DIMENSIONS
2718  CheckDim(A, b, "SolveLU(A, X)");
2719 #endif
2720 
2721  int m = A.GetM(); int nrhs = 1;
2722  char uplo('L'); char trans('T'); char diag('N');
2723  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2724  b.GetDataVoid(), &m, &info.GetInfoRef());
2725  }
2726 
2727 
2728  template <class Prop0, class Allocator0, class Allocator2>
2729  void
2730  SolveLU(const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
2731  Vector<complex<double>, VectFull, Allocator2>& b,
2732  LapackInfo& info)
2733  {
2734 
2735 #ifdef SELDON_CHECK_DIMENSIONS
2736  CheckDim(A, b, "SolveLU(A, X)");
2737 #endif
2738 
2739  int m = A.GetM(); int nrhs = 1;
2740  char uplo('L'); char trans('T'); char diag('N');
2741  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2742  b.GetDataVoid(), &m, &info.GetInfoRef());
2743 
2744  }
2745 
2746 
2747  /*** RowUpTriang ***/
2748 
2749 
2750  template <class Prop0, class Allocator0, class Allocator2>
2751  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2752  const Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
2753  Vector<float, VectFull, Allocator2>& b,
2754  LapackInfo& info)
2755  {
2756 
2757 #ifdef SELDON_CHECK_DIMENSIONS
2758  CheckDim(A, b, "SolveLU(A, X)");
2759 #endif
2760 
2761  int m = A.GetM(); int nrhs = 1;
2762  char uplo('L');
2763  char trans = TransA.RevChar(); char diag = DiagA.Char();
2764  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2765  b.GetData(), &m, &info.GetInfoRef());
2766  }
2767 
2768 
2769  template <class Prop0, class Allocator0, class Allocator2>
2770  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2771  const Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
2772  Vector<double, VectFull, Allocator2>& b,
2773  LapackInfo& info)
2774  {
2775 
2776 #ifdef SELDON_CHECK_DIMENSIONS
2777  CheckDim(A, b, "SolveLU(A, X)");
2778 #endif
2779 
2780  int m = A.GetM(); int nrhs = 1;
2781  char uplo('L');
2782  char trans = TransA.RevChar(); char diag = DiagA.Char();
2783  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2784  b.GetData(), &m, &info.GetInfoRef());
2785 
2786  }
2787 
2788 
2789  template <class Prop0, class Allocator0, class Allocator2>
2790  void
2791  SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2792  const Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
2793  Vector<complex<float>, VectFull, Allocator2>& b,
2794  LapackInfo& info)
2795  {
2796 
2797 #ifdef SELDON_CHECK_DIMENSIONS
2798  CheckDim(A, b, "SolveLU(A, X)");
2799 #endif
2800 
2801  int m = A.GetM(); int nrhs = 1;
2802  char uplo('L');
2803  char trans = TransA.RevChar(); char diag = DiagA.Char();
2804  if (TransA.ConjTrans())
2805  Conjugate(b);
2806  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2807  b.GetDataVoid(), &m, &info.GetInfoRef());
2808  if (TransA.ConjTrans())
2809  Conjugate(b);
2810  }
2811 
2812 
2813  template <class Prop0, class Allocator0, class Allocator2>
2814  void
2815  SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2816  const Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
2817  Vector<complex<double>, VectFull, Allocator2>& b,
2818  LapackInfo& info)
2819  {
2820 
2821 #ifdef SELDON_CHECK_DIMENSIONS
2822  CheckDim(A, b, "SolveLU(A, X)");
2823 #endif
2824 
2825  int m = A.GetM(); int nrhs = 1;
2826  char uplo('L');
2827  char trans = TransA.RevChar(); char diag = DiagA.Char();
2828  if (TransA.ConjTrans())
2829  Conjugate(b);
2830  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2831  b.GetDataVoid(), &m, &info.GetInfoRef());
2832  if (TransA.ConjTrans())
2833  Conjugate(b);
2834 
2835  }
2836 
2837 
2838  /*** RowLoTriang, NoTrans and NonUnit ***/
2839 
2840 
2841  template <class Prop0, class Allocator0, class Allocator2>
2842  void SolveLU(const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
2843  Vector<float, VectFull, Allocator2>& b,
2844  LapackInfo& info)
2845  {
2846 
2847 #ifdef SELDON_CHECK_DIMENSIONS
2848  CheckDim(A, b, "SolveLU(A, X)");
2849 #endif
2850 
2851  int m = A.GetM(); int nrhs = 1;
2852  char uplo('U'); char trans('T'); char diag('N');
2853  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2854  b.GetData(), &m, &info.GetInfoRef());
2855  }
2856 
2857 
2858  template <class Prop0, class Allocator0, class Allocator2>
2859  void SolveLU(const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
2860  Vector<double, VectFull, Allocator2>& b,
2861  LapackInfo& info)
2862  {
2863 
2864 #ifdef SELDON_CHECK_DIMENSIONS
2865  CheckDim(A, b, "SolveLU(A, X)");
2866 #endif
2867 
2868  int m = A.GetM(); int nrhs = 1;
2869  char uplo('U'); char trans('T'); char diag('N');
2870  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2871  b.GetData(), &m, &info.GetInfoRef());
2872 
2873  }
2874 
2875 
2876  template <class Prop0, class Allocator0, class Allocator2>
2877  void
2878  SolveLU(const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
2879  Vector<complex<float>, VectFull, Allocator2>& b,
2880  LapackInfo& info)
2881  {
2882 
2883 #ifdef SELDON_CHECK_DIMENSIONS
2884  CheckDim(A, b, "SolveLU(A, X)");
2885 #endif
2886 
2887  int m = A.GetM(); int nrhs = 1;
2888  char uplo('U'); char trans('T'); char diag('N');
2889  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2890  b.GetDataVoid(), &m, &info.GetInfoRef());
2891  }
2892 
2893 
2894  template <class Prop0, class Allocator0, class Allocator2>
2895  void
2896  SolveLU(const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
2897  Vector<complex<double>, VectFull, Allocator2>& b,
2898  LapackInfo& info)
2899  {
2900 
2901 #ifdef SELDON_CHECK_DIMENSIONS
2902  CheckDim(A, b, "SolveLU(A, X)");
2903 #endif
2904 
2905  int m = A.GetM(); int nrhs = 1;
2906  char uplo('U'); char trans('T'); char diag('N');
2907  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2908  b.GetDataVoid(), &m, &info.GetInfoRef());
2909 
2910  }
2911 
2912 
2913  /*** RowLoTriang ***/
2914 
2915 
2916  template <class Prop0, class Allocator0, class Allocator2>
2917  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2918  const Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
2919  Vector<float, VectFull, Allocator2>& b,
2920  LapackInfo& info)
2921  {
2922 
2923 #ifdef SELDON_CHECK_DIMENSIONS
2924  CheckDim(A, b, "SolveLU(A, X)");
2925 #endif
2926 
2927  int m = A.GetM(); int nrhs = 1;
2928  char uplo('U');
2929  char trans = TransA.RevChar(); char diag = DiagA.Char();
2930  strtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2931  b.GetData(), &m, &info.GetInfoRef());
2932  }
2933 
2934 
2935  template <class Prop0, class Allocator0, class Allocator2>
2936  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2937  const Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
2938  Vector<double, VectFull, Allocator2>& b,
2939  LapackInfo& info)
2940  {
2941 
2942 #ifdef SELDON_CHECK_DIMENSIONS
2943  CheckDim(A, b, "SolveLU(A, X)");
2944 #endif
2945 
2946  int m = A.GetM(); int nrhs = 1;
2947  char uplo('U');
2948  char trans = TransA.RevChar(); char diag = DiagA.Char();
2949  dtrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(), &m,
2950  b.GetData(), &m, &info.GetInfoRef());
2951 
2952  }
2953 
2954 
2955  template <class Prop0, class Allocator0, class Allocator2>
2956  void
2957  SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2958  const Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
2959  Vector<complex<float>, VectFull, Allocator2>& b,
2960  LapackInfo& info)
2961  {
2962 
2963 #ifdef SELDON_CHECK_DIMENSIONS
2964  CheckDim(A, b, "SolveLU(A, X)");
2965 #endif
2966 
2967  int m = A.GetM(); int nrhs = 1;
2968  char uplo('U');
2969  char trans = TransA.RevChar(); char diag = DiagA.Char();
2970  if (TransA.ConjTrans())
2971  Conjugate(b);
2972  ctrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2973  b.GetDataVoid(), &m, &info.GetInfoRef());
2974  if (TransA.ConjTrans())
2975  Conjugate(b);
2976  }
2977 
2978 
2979  template <class Prop0, class Allocator0, class Allocator2>
2980  void
2981  SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
2982  const Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
2983  Vector<complex<double>, VectFull, Allocator2>& b,
2984  LapackInfo& info)
2985  {
2986 
2987 #ifdef SELDON_CHECK_DIMENSIONS
2988  CheckDim(A, b, "SolveLU(A, X)");
2989 #endif
2990 
2991  int m = A.GetM(); int nrhs = 1;
2992  char uplo('U');
2993  char trans = TransA.RevChar(); char diag = DiagA.Char();
2994  if (TransA.ConjTrans())
2995  Conjugate(b);
2996  ztrtrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(), &m,
2997  b.GetDataVoid(), &m, &info.GetInfoRef());
2998  if (TransA.ConjTrans())
2999  Conjugate(b);
3000  }
3001 
3002 
3003  /*** RowUpTriangPacked, NoTrans and NonUnit ***/
3004 
3005 
3006  template <class Prop0, class Allocator0, class Allocator2>
3007  void SolveLU(const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
3008  Vector<float, VectFull, Allocator2>& b,
3009  LapackInfo& info)
3010  {
3011 
3012 #ifdef SELDON_CHECK_DIMENSIONS
3013  CheckDim(A, b, "SolveLU(A, X)");
3014 #endif
3015 
3016  int m = A.GetM(); int nrhs = 1;
3017  char uplo('L'); char trans('T'); char diag('N');
3018  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3019  b.GetData(), &m, &info.GetInfoRef());
3020  }
3021 
3022 
3023  template <class Prop0, class Allocator0, class Allocator2>
3024  void SolveLU(const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
3025  Vector<double, VectFull, Allocator2>& b,
3026  LapackInfo& info)
3027  {
3028 
3029 #ifdef SELDON_CHECK_DIMENSIONS
3030  CheckDim(A, b, "SolveLU(A, X)");
3031 #endif
3032 
3033  int m = A.GetM(); int nrhs = 1;
3034  char uplo('L'); char trans('T'); char diag('N');
3035  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3036  b.GetData(), &m, &info.GetInfoRef());
3037 
3038  }
3039 
3040 
3041  template <class Prop0, class Allocator0, class Allocator2>
3042  void SolveLU(const Matrix<complex<float>, Prop0, RowUpTriangPacked,
3043  Allocator0>& A,
3044  Vector<complex<float>, VectFull, Allocator2>& b,
3045  LapackInfo& info)
3046  {
3047 
3048 #ifdef SELDON_CHECK_DIMENSIONS
3049  CheckDim(A, b, "SolveLU(A, X)");
3050 #endif
3051 
3052  int m = A.GetM(); int nrhs = 1;
3053  char uplo('L'); char trans('T'); char diag('N');
3054  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3055  b.GetDataVoid(), &m, &info.GetInfoRef());
3056  }
3057 
3058 
3059  template <class Prop0, class Allocator0, class Allocator2>
3060  void SolveLU(const Matrix<complex<double>, Prop0, RowUpTriangPacked,
3061  Allocator0>& A,
3062  Vector<complex<double>, VectFull, Allocator2>& b,
3063  LapackInfo& info)
3064  {
3065 
3066 #ifdef SELDON_CHECK_DIMENSIONS
3067  CheckDim(A, b, "SolveLU(A, X)");
3068 #endif
3069 
3070  int m = A.GetM(); int nrhs = 1;
3071  char uplo('L'); char trans('T'); char diag('N');
3072  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3073  b.GetDataVoid(), &m, &info.GetInfoRef());
3074 
3075  }
3076 
3077 
3078  /*** RowUpTriangPacked ***/
3079 
3080 
3081  template <class Prop0, class Allocator0, class Allocator2>
3082  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3083  const Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
3084  Vector<float, VectFull, Allocator2>& b,
3085  LapackInfo& info)
3086  {
3087 
3088 #ifdef SELDON_CHECK_DIMENSIONS
3089  CheckDim(A, b, "SolveLU(A, X)");
3090 #endif
3091 
3092  int m = A.GetM(); int nrhs = 1;
3093  char uplo('L');
3094  char trans = TransA.RevChar(); char diag = DiagA.Char();
3095  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3096  b.GetData(), &m, &info.GetInfoRef());
3097  }
3098 
3099 
3100  template <class Prop0, class Allocator0, class Allocator2>
3101  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3102  const Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
3103  Vector<double, VectFull, Allocator2>& b,
3104  LapackInfo& info)
3105  {
3106 
3107 #ifdef SELDON_CHECK_DIMENSIONS
3108  CheckDim(A, b, "SolveLU(A, X)");
3109 #endif
3110 
3111  int m = A.GetM(); int nrhs = 1;
3112  char uplo('L');
3113  char trans = TransA.RevChar(); char diag = DiagA.Char();
3114  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3115  b.GetData(), &m, &info.GetInfoRef());
3116 
3117  }
3118 
3119 
3120  template <class Prop0, class Allocator0, class Allocator2>
3121  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3122  const Matrix<complex<float>, Prop0, RowUpTriangPacked,
3123  Allocator0>& A,
3124  Vector<complex<float>, VectFull, Allocator2>& b,
3125  LapackInfo& info)
3126  {
3127 
3128 #ifdef SELDON_CHECK_DIMENSIONS
3129  CheckDim(A, b, "SolveLU(A, X)");
3130 #endif
3131 
3132  int m = A.GetM(); int nrhs = 1;
3133  char uplo('L');
3134  char trans = TransA.RevChar(); char diag = DiagA.Char();
3135  if (TransA.ConjTrans())
3136  Conjugate(b);
3137  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3138  b.GetDataVoid(), &m, &info.GetInfoRef());
3139  if (TransA.ConjTrans())
3140  Conjugate(b);
3141  }
3142 
3143 
3144  template <class Prop0, class Allocator0, class Allocator2>
3145  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3146  const Matrix<complex<double>, Prop0, RowUpTriangPacked,
3147  Allocator0>& A,
3148  Vector<complex<double>, VectFull, Allocator2>& b,
3149  LapackInfo& info)
3150  {
3151 
3152 #ifdef SELDON_CHECK_DIMENSIONS
3153  CheckDim(A, b, "SolveLU(A, X)");
3154 #endif
3155 
3156  int m = A.GetM(); int nrhs = 1;
3157  char uplo('L');
3158  char trans = TransA.RevChar(); char diag = DiagA.Char();
3159  if (TransA.ConjTrans())
3160  Conjugate(b);
3161  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3162  b.GetDataVoid(), &m, &info.GetInfoRef());
3163  if (TransA.ConjTrans())
3164  Conjugate(b);
3165  }
3166 
3167 
3168  /*** RowLoTriangPacked, NoTrans and NonUnit ***/
3169 
3170 
3171  template <class Prop0, class Allocator0, class Allocator2>
3172  void SolveLU(const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
3173  Vector<float, VectFull, Allocator2>& b,
3174  LapackInfo& info)
3175  {
3176 
3177 #ifdef SELDON_CHECK_DIMENSIONS
3178  CheckDim(A, b, "SolveLU(A, X)");
3179 #endif
3180 
3181  int m = A.GetM(); int nrhs = 1;
3182  char uplo('U'); char trans('T'); char diag('N');
3183  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3184  b.GetData(), &m, &info.GetInfoRef());
3185  }
3186 
3187 
3188  template <class Prop0, class Allocator0, class Allocator2>
3189  void SolveLU(const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
3190  Vector<double, VectFull, Allocator2>& b,
3191  LapackInfo& info)
3192  {
3193 
3194 #ifdef SELDON_CHECK_DIMENSIONS
3195  CheckDim(A, b, "SolveLU(A, X)");
3196 #endif
3197 
3198  int m = A.GetM(); int nrhs = 1;
3199  char uplo('U'); char trans('T'); char diag('N');
3200  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3201  b.GetData(), &m, &info.GetInfoRef());
3202 
3203  }
3204 
3205 
3206  template <class Prop0, class Allocator0, class Allocator2>
3207  void SolveLU(const Matrix<complex<float>, Prop0, RowLoTriangPacked,
3208  Allocator0>& A,
3209  Vector<complex<float>, VectFull, Allocator2>& b,
3210  LapackInfo& info)
3211  {
3212 
3213 #ifdef SELDON_CHECK_DIMENSIONS
3214  CheckDim(A, b, "SolveLU(A, X)");
3215 #endif
3216 
3217  int m = A.GetM(); int nrhs = 1;
3218  char uplo('U'); char trans('T'); char diag('N');
3219 
3220 
3221  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3222  b.GetDataVoid(), &m, &info.GetInfoRef());
3223  }
3224 
3225 
3226  template <class Prop0, class Allocator0, class Allocator2>
3227  void SolveLU(const Matrix<complex<double>, Prop0, RowLoTriangPacked,
3228  Allocator0>& A,
3229  Vector<complex<double>, VectFull, Allocator2>& b,
3230  LapackInfo& info)
3231  {
3232 
3233 #ifdef SELDON_CHECK_DIMENSIONS
3234  CheckDim(A, b, "SolveLU(A, X)");
3235 #endif
3236 
3237  int m = A.GetM(); int nrhs = 1;
3238  char uplo('U'); char trans('T'); char diag('N');
3239  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3240  b.GetDataVoid(), &m, &info.GetInfoRef());
3241 
3242  }
3243 
3244 
3245  /*** RowLoTriangPacked ***/
3246 
3247 
3248  template <class Prop0, class Allocator0, class Allocator2>
3249  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3250  const Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
3251  Vector<float, VectFull, Allocator2>& b,
3252  LapackInfo& info)
3253  {
3254 
3255 #ifdef SELDON_CHECK_DIMENSIONS
3256  CheckDim(A, b, "SolveLU(A, X)");
3257 #endif
3258 
3259  int m = A.GetM(); int nrhs = 1;
3260  char uplo('U');
3261  char trans = TransA.RevChar(); char diag = DiagA.Char();
3262  stptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3263  b.GetData(), &m, &info.GetInfoRef());
3264  }
3265 
3266 
3267  template <class Prop0, class Allocator0, class Allocator2>
3268  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3269  const Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
3270  Vector<double, VectFull, Allocator2>& b,
3271  LapackInfo& info)
3272  {
3273 
3274 #ifdef SELDON_CHECK_DIMENSIONS
3275  CheckDim(A, b, "SolveLU(A, X)");
3276 #endif
3277 
3278  int m = A.GetM(); int nrhs = 1;
3279  char uplo('U');
3280  char trans = TransA.RevChar(); char diag = DiagA.Char();
3281  dtptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetData(),
3282  b.GetData(), &m, &info.GetInfoRef());
3283 
3284  }
3285 
3286 
3287  template <class Prop0, class Allocator0, class Allocator2>
3288  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3289  const Matrix<complex<float>, Prop0, RowLoTriangPacked,
3290  Allocator0>& A,
3291  Vector<complex<float>, VectFull, Allocator2>& b,
3292  LapackInfo& info)
3293  {
3294 
3295 #ifdef SELDON_CHECK_DIMENSIONS
3296  CheckDim(A, b, "SolveLU(A, X)");
3297 #endif
3298 
3299  int m = A.GetM(); int nrhs = 1;
3300  char uplo('U');
3301  char trans = TransA.RevChar(); char diag = DiagA.Char();
3302  if (TransA.ConjTrans())
3303  Conjugate(b);
3304  ctptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3305  b.GetDataVoid(), &m, &info.GetInfoRef());
3306  if (TransA.ConjTrans())
3307  Conjugate(b);
3308  }
3309 
3310 
3311  template <class Prop0, class Allocator0, class Allocator2>
3312  void SolveLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
3313  const Matrix<complex<double>, Prop0, RowLoTriangPacked,
3314  Allocator0>& A,
3315  Vector<complex<double>, VectFull, Allocator2>& b,
3316  LapackInfo& info)
3317  {
3318 
3319 #ifdef SELDON_CHECK_DIMENSIONS
3320  CheckDim(A, b, "SolveLU(A, X)");
3321 #endif
3322 
3323  int m = A.GetM(); int nrhs = 1;
3324  char uplo('U');
3325  char trans = TransA.RevChar(); char diag = DiagA.Char();
3326  if (TransA.ConjTrans())
3327  Conjugate(b);
3328  ztptrs_(&uplo, &trans, &diag, &m, & nrhs, A.GetDataVoid(),
3329  b.GetDataVoid(), &m, &info.GetInfoRef());
3330  if (TransA.ConjTrans())
3331  Conjugate(b);
3332  }
3333 
3334 
3335  // SolveLU //
3337 
3338 
3339 
3341  // ReciprocalConditionNumber //
3342 
3343 
3344  /*** ColMajor ***/
3345 
3346 
3347  template<class Prop0, class Allocator0, class Allocator1>
3348  float ReciprocalConditionNumber(const Matrix<float, Prop0, ColMajor,
3349  Allocator0>& A,
3350  Vector<int, VectFull, Allocator1>& P,
3351  SeldonNorm norm, float anorm,
3352  LapackInfo& info)
3353  {
3354  char norm_type = norm.Char();
3355 
3356  int n = A.GetM(); float rcond(0);
3357  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(4*n);
3358  sgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
3359  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3360  return rcond;
3361  }
3362 
3363 
3364  template<class Prop0, class Allocator0, class Allocator1>
3365  double ReciprocalConditionNumber(const Matrix<double, Prop0, ColMajor,
3366  Allocator0>& A,
3367  Vector<int, VectFull, Allocator1>& P,
3368  SeldonNorm norm, double anorm,
3369  LapackInfo& info)
3370  {
3371  char norm_type = norm.Char();
3372 
3373  int n = A.GetM(); double rcond(0);
3374  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(4*n);
3375  dgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
3376  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3377  return rcond;
3378  }
3379 
3380 
3381  template<class Prop0, class Allocator0, class Allocator1>
3382  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3383  ColMajor, Allocator0>& A,
3384  Vector<int, VectFull, Allocator1>& P,
3385  SeldonNorm norm, float anorm,
3386  LapackInfo& info)
3387  {
3388  char norm_type = norm.Char();
3389 
3390  int n = A.GetM(); float rcond(0);
3391  Vector<float> rwork(2*n);
3392  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3393  cgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
3394  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
3395  return rcond;
3396  }
3397 
3398 
3399  template<class Prop0, class Allocator0, class Allocator1>
3400  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3401  ColMajor, Allocator0>& A,
3402  Vector<int, VectFull, Allocator1>& P,
3403  SeldonNorm norm, double anorm,
3404  LapackInfo& info)
3405  {
3406  char norm_type = norm.Char();
3407 
3408  int n = A.GetM(); double rcond(0);
3409  Vector<double> rwork(2*n);
3410  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3411  zgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
3412  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
3413  return rcond;
3414  }
3415 
3416 
3417  /*** RowMajor ***/
3418 
3419 
3420  template<class Prop0, class Allocator0, class Allocator1>
3421  float ReciprocalConditionNumber(const Matrix<float, Prop0, RowMajor,
3422  Allocator0>& A,
3423  Vector<int, VectFull, Allocator1>& P,
3424  SeldonNorm norm, float anorm,
3425  LapackInfo& info)
3426  {
3427  char norm_type = norm.RevChar();
3428 
3429  int n = A.GetM(); float rcond(0);
3430  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(4*n);
3431  sgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
3432  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3433  return rcond;
3434  }
3435 
3436 
3437  template<class Prop0, class Allocator0, class Allocator1>
3438  double ReciprocalConditionNumber(const Matrix<double, Prop0, RowMajor,
3439  Allocator0>& A,
3440  Vector<int, VectFull, Allocator1>& P,
3441  SeldonNorm norm, double anorm,
3442  LapackInfo& info)
3443  {
3444  char norm_type = norm.RevChar();
3445 
3446  int n = A.GetM(); double rcond(0);
3447  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(4*n);
3448  dgecon_(&norm_type, &n, A.GetData(), &n, &anorm, &rcond,
3449  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3450  return rcond;
3451  }
3452 
3453 
3454  template<class Prop0, class Allocator0, class Allocator1>
3455  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3456  RowMajor, Allocator0>& A,
3457  Vector<int, VectFull, Allocator1>& P,
3458  SeldonNorm norm, float anorm,
3459  LapackInfo& info)
3460  {
3461  char norm_type = norm.RevChar();
3462 
3463  int n = A.GetM(); float rcond(0);
3464  Vector<float> rwork(2*n);
3465  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3466  cgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
3467  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
3468  return rcond;
3469  }
3470 
3471 
3472  template<class Prop0, class Allocator0, class Allocator1>
3473  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3474  RowMajor, Allocator0>& A,
3475  Vector<int, VectFull, Allocator1>& P,
3476  SeldonNorm norm, double anorm,
3477  LapackInfo& info)
3478  {
3479  char norm_type = norm.RevChar();
3480 
3481  int n = A.GetM(); double rcond(0);
3482  Vector<double> rwork(2*n);
3483  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3484  zgecon_(&norm_type, &n, A.GetDataVoid(), &n, &anorm, &rcond,
3485  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
3486  return rcond;
3487  }
3488 
3489 
3490  /*** ColSym and Upper ***/
3491 
3492 
3493  template<class Prop0, class Allocator0, class Allocator1>
3494  float ReciprocalConditionNumber(const Matrix<float, Prop0, ColSym,
3495  Allocator0>& A,
3496  Vector<int, VectFull, Allocator1>& P,
3497  SeldonNorm norm, float anorm,
3498  LapackInfo& info)
3499  {
3500  char uplo('U');
3501 
3502  int n = A.GetM(); float rcond(0);
3503  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
3504  ssycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3505  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3506  return rcond;
3507  }
3508 
3509 
3510  template<class Prop0, class Allocator0, class Allocator1>
3511  double ReciprocalConditionNumber(const Matrix<double, Prop0, ColSym,
3512  Allocator0>& A,
3513  Vector<int, VectFull, Allocator1>& P,
3514  SeldonNorm norm, double anorm,
3515  LapackInfo& info)
3516  {
3517  char uplo('U');
3518 
3519  int n = A.GetM(); double rcond(0);
3520  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
3521  dsycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3522  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3523  return rcond;
3524  }
3525 
3526 
3527  template<class Prop0, class Allocator0, class Allocator1>
3528  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3529  ColSym, Allocator0>& A,
3530  Vector<int, VectFull, Allocator1>& P,
3531  SeldonNorm norm, float anorm,
3532  LapackInfo& info)
3533  {
3534  char uplo('U');
3535 
3536  int n = A.GetM(); float rcond(0);
3537  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3538  csycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
3539  work.GetDataVoid(), &info.GetInfoRef());
3540  return rcond;
3541  }
3542 
3543 
3544  template<class Prop0, class Allocator0, class Allocator1>
3545  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3546  ColSym, Allocator0>& A,
3547  Vector<int, VectFull, Allocator1>& P,
3548  SeldonNorm norm, double anorm,
3549  LapackInfo& info)
3550  {
3551  char uplo('U');
3552 
3553  int n = A.GetM(); double rcond(0);
3554  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3555  zsycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
3556  work.GetDataVoid(), &info.GetInfoRef());
3557  return rcond;
3558  }
3559 
3560 
3561  /*** ColSymPacked and Upper ***/
3562 
3563 
3564  template<class Prop0, class Allocator0, class Allocator1>
3565  float ReciprocalConditionNumber(const Matrix<float, Prop0,
3566  ColSymPacked, Allocator0>& A,
3567  Vector<int, VectFull, Allocator1>& P,
3568  SeldonNorm norm, float anorm,
3569  LapackInfo& info)
3570  {
3571  char uplo('U');
3572 
3573  int n = A.GetM(); float rcond(0);
3574  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
3575  sspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3576  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3577  return rcond;
3578  }
3579 
3580 
3581  template<class Prop0, class Allocator0, class Allocator1>
3582  double ReciprocalConditionNumber(const Matrix<double, Prop0, ColSymPacked,
3583  Allocator0>& A,
3584  Vector<int, VectFull, Allocator1>& P,
3585  SeldonNorm norm, double anorm,
3586  LapackInfo& info)
3587  {
3588  char uplo('U');
3589 
3590  int n = A.GetM(); double rcond(0);
3591  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
3592  dspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3593  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3594  return rcond;
3595  }
3596 
3597 
3598  template<class Prop0, class Allocator0, class Allocator1>
3599  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3600  ColSymPacked, Allocator0>& A,
3601  Vector<int, VectFull, Allocator1>& P,
3602  SeldonNorm norm, float anorm,
3603  LapackInfo& info)
3604  {
3605  char uplo('U');
3606 
3607  int n = A.GetM(); float rcond(0);
3608  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3609  cspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3610  work.GetData(), &info.GetInfoRef());
3611  return rcond;
3612  }
3613 
3614 
3615  template<class Prop0, class Allocator0, class Allocator1>
3616  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3617  ColSymPacked, Allocator0>& A,
3618  Vector<int, VectFull, Allocator1>& P,
3619  SeldonNorm norm, double anorm,
3620  LapackInfo& info)
3621  {
3622  char uplo('U');
3623 
3624  int n = A.GetM(); double rcond(0);
3625  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3626  zspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3627  work.GetData(), &info.GetInfoRef());
3628  return rcond;
3629  }
3630 
3631 
3632  /*** RowSym and Upper ***/
3633 
3634 
3635  template<class Prop0, class Allocator0, class Allocator1>
3636  float ReciprocalConditionNumber(const Matrix<float, Prop0, RowSym,
3637  Allocator0>& A,
3638  Vector<int, VectFull, Allocator1>& P,
3639  SeldonNorm norm, float anorm,
3640  LapackInfo& info)
3641  {
3642  char uplo('L');
3643 
3644  int n = A.GetM(); float rcond(0);
3645  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
3646  ssycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3647  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3648  return rcond;
3649  }
3650 
3651 
3652  template<class Prop0, class Allocator0, class Allocator1>
3653  double ReciprocalConditionNumber(const Matrix<double, Prop0, RowSym,
3654  Allocator0>& A,
3655  Vector<int, VectFull, Allocator1>& P,
3656  SeldonNorm norm, double anorm,
3657  LapackInfo& info)
3658  {
3659  char uplo('L');
3660 
3661  int n = A.GetM(); double rcond(0);
3662  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
3663  dsycon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3664  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3665  return rcond;
3666  }
3667 
3668 
3669  template<class Prop0, class Allocator0, class Allocator1>
3670  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0, RowSym,
3671  Allocator0>& A,
3672  Vector<int, VectFull, Allocator1>& P,
3673  SeldonNorm norm, float anorm,
3674  LapackInfo& info)
3675  {
3676  char uplo('L');
3677 
3678  int n = A.GetM(); float rcond(0);
3679  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3680  csycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
3681  work.GetDataVoid(), &info.GetInfoRef());
3682  return rcond;
3683  }
3684 
3685 
3686  template<class Prop0, class Allocator0, class Allocator1>
3687  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3688  RowSym, Allocator0>& A,
3689  Vector<int, VectFull, Allocator1>& P,
3690  SeldonNorm norm, double anorm,
3691  LapackInfo& info)
3692  {
3693  char uplo('L');
3694 
3695  int n = A.GetM(); double rcond(0);
3696  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3697  zsycon_(&uplo, &n, A.GetDataVoid(), &n, P.GetData(), &anorm, &rcond,
3698  work.GetDataVoid(), &info.GetInfoRef());
3699  return rcond;
3700  }
3701 
3702 
3703  /*** RowSymPacked and Upper ***/
3704 
3705 
3706  template<class Prop0, class Allocator0, class Allocator1>
3707  float ReciprocalConditionNumber(const Matrix<float, Prop0, RowSymPacked,
3708  Allocator0>& A,
3709  Vector<int, VectFull, Allocator1>& P,
3710  SeldonNorm norm, float anorm,
3711  LapackInfo& info)
3712  {
3713  char uplo('L');
3714 
3715  int n = A.GetM(); float rcond(0);
3716  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(2*n);
3717  sspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3718  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3719  return rcond;
3720  }
3721 
3722 
3723  template<class Prop0, class Allocator0, class Allocator1>
3724  double ReciprocalConditionNumber(const Matrix<double, Prop0, RowSymPacked,
3725  Allocator0>& A,
3726  Vector<int, VectFull, Allocator1>& P,
3727  SeldonNorm norm, double anorm,
3728  LapackInfo& info)
3729  {
3730  char uplo('L');
3731 
3732  int n = A.GetM(); double rcond(0);
3733  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(2*n);
3734  dspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3735  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3736  return rcond;
3737  }
3738 
3739 
3740  template<class Prop0, class Allocator0, class Allocator1>
3741  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3742  RowSymPacked, Allocator0>& A,
3743  Vector<int, VectFull, Allocator1>& P,
3744  SeldonNorm norm, float anorm,
3745  LapackInfo& info)
3746  {
3747  char uplo('L');
3748 
3749  int n = A.GetM(); float rcond(0);
3750  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3751  cspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3752  work.GetData(), &info.GetInfoRef());
3753  return rcond;
3754  }
3755 
3756 
3757  template<class Prop0, class Allocator0, class Allocator1>
3758  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3759  RowSymPacked, Allocator0>& A,
3760  Vector<int, VectFull, Allocator1>& P,
3761  SeldonNorm norm, double anorm,
3762  LapackInfo& info)
3763  {
3764  char uplo('L');
3765 
3766  int n = A.GetM(); double rcond(0);
3767  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3768  zspcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3769  work.GetData(), &info.GetInfoRef());
3770  return rcond;
3771  }
3772 
3773 
3774  /*** ColHerm and Upper ***/
3775 
3776 
3777  template<class Prop0, class Allocator0, class Allocator1>
3778  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3779  ColHerm, Allocator0>& A,
3780  Vector<int, VectFull, Allocator1>& P,
3781  SeldonNorm norm, float anorm,
3782  LapackInfo& info)
3783  {
3784  char uplo('U');
3785 
3786  int n = A.GetM(); float rcond(0);
3787  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3788  checon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3789  work.GetData(), &info.GetInfoRef());
3790  return rcond;
3791  }
3792 
3793 
3794  template<class Prop0, class Allocator0, class Allocator1>
3795  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3796  ColHerm, Allocator0>& A,
3797  Vector<int, VectFull, Allocator1>& P,
3798  SeldonNorm norm, double anorm,
3799  LapackInfo& info)
3800  {
3801  char uplo('U');
3802 
3803  int n = A.GetM(); double rcond(0);
3804  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3805  zhecon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3806  work.GetData(), &info.GetInfoRef());
3807  return rcond;
3808  }
3809 
3810 
3811  /*** ColHermPacked and Upper ***/
3812 
3813 
3814  template<class Prop0, class Allocator0, class Allocator1>
3815  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3816  ColHermPacked, Allocator0>& A,
3817  Vector<int, VectFull, Allocator1>& P,
3818  SeldonNorm norm, float anorm,
3819  LapackInfo& info)
3820  {
3821  char uplo('U');
3822 
3823  int n = A.GetM(); float rcond(0);
3824  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3825  chpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3826  work.GetData(), &info.GetInfoRef());
3827  return rcond;
3828  }
3829 
3830 
3831  template<class Prop0, class Allocator0, class Allocator1>
3832  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3833  ColHermPacked, Allocator0>& A,
3834  Vector<int, VectFull, Allocator1>& P,
3835  SeldonNorm norm, double anorm,
3836  LapackInfo& info)
3837  {
3838  char uplo('U');
3839 
3840  int n = A.GetM(); double rcond(0);
3841  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3842  zhpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3843  work.GetData(), &info.GetInfoRef());
3844  return rcond;
3845  }
3846 
3847 
3848  /*** RowHerm and Upper ***/
3849 
3850 
3851  template<class Prop0, class Allocator0, class Allocator1>
3852  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3853  RowHerm, Allocator0>& A,
3854  Vector<int, VectFull, Allocator1>& P,
3855  SeldonNorm norm, float anorm,
3856  LapackInfo& info)
3857  {
3858  char uplo('L');
3859 
3860  int n = A.GetM(); float rcond(0);
3861  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3862  checon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3863  work.GetData(), &info.GetInfoRef());
3864  return rcond;
3865  }
3866 
3867 
3868  template<class Prop0, class Allocator0, class Allocator1>
3869  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3870  RowHerm, Allocator0>& A,
3871  Vector<int, VectFull, Allocator1>& P,
3872  SeldonNorm norm, double anorm,
3873  LapackInfo& info)
3874  {
3875  char uplo('L');
3876 
3877  int n = A.GetM(); double rcond(0);
3878  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3879  zhecon_(&uplo, &n, A.GetData(), &n, P.GetData(), &anorm, &rcond,
3880  work.GetData(), &info.GetInfoRef());
3881  return rcond;
3882  }
3883 
3884 
3885  /*** RowHermPacked and Upper ***/
3886 
3887 
3888  template<class Prop0, class Allocator0, class Allocator1>
3889  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3890  RowHermPacked, Allocator0>& A,
3891  Vector<int, VectFull, Allocator1>& P,
3892  SeldonNorm norm, float anorm,
3893  LapackInfo& info)
3894  {
3895  char uplo('L');
3896 
3897  int n = A.GetM(); float rcond(0);
3898  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3899  chpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3900  work.GetData(), &info.GetInfoRef());
3901  return rcond;
3902  }
3903 
3904 
3905  template<class Prop0, class Allocator0, class Allocator1>
3906  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3907  RowHermPacked, Allocator0>& A,
3908  Vector<int, VectFull, Allocator1>& P,
3909  SeldonNorm norm, double anorm,
3910  LapackInfo& info)
3911  {
3912  char uplo('L');
3913 
3914  int n = A.GetM(); double rcond(0);
3915  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3916  zhpcon_(&uplo, &n, A.GetData(), P.GetData(), &anorm, &rcond,
3917  work.GetData(), &info.GetInfoRef());
3918  return rcond;
3919  }
3920 
3921 
3922  /*** ColUpTriang and NonUnit ***/
3923 
3924 
3925  template<class Prop0, class Allocator0>
3926  float ReciprocalConditionNumber(const Matrix<float, Prop0, ColUpTriang,
3927  Allocator0>& A, SeldonNorm norm,
3928  LapackInfo& info)
3929  {
3930  char uplo('U'); char norm_type = norm.Char(); char diag('N');
3931 
3932  int n = A.GetM(); float rcond(0);
3933  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
3934  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
3935  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3936  return rcond;
3937  }
3938 
3939 
3940  template<class Prop0, class Allocator0>
3941  double ReciprocalConditionNumber(const Matrix<double, Prop0, ColUpTriang,
3942  Allocator0>& A, SeldonNorm norm,
3943  LapackInfo& info)
3944  {
3945  char uplo('U'); char norm_type = norm.Char(); char diag('N');
3946 
3947  int n = A.GetM(); double rcond(0);
3948  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
3949  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
3950  work.GetData(), iwork.GetData(), &info.GetInfoRef());
3951  return rcond;
3952  }
3953 
3954 
3955  template<class Prop0, class Allocator0>
3956  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
3957  ColUpTriang, Allocator0>& A,
3958  SeldonNorm norm,
3959  LapackInfo& info)
3960  {
3961  char uplo('U'); char norm_type = norm.Char(); char diag('N');
3962 
3963  int n = A.GetM(); float rcond(0);
3964  Vector<float> rwork(n);
3965  Vector<complex<float>, VectFull, Allocator0> work(2*n);
3966  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
3967  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
3968  return rcond;
3969  }
3970 
3971 
3972  template<class Prop0, class Allocator0>
3973  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
3974  ColUpTriang, Allocator0>& A,
3975  SeldonNorm norm,
3976  LapackInfo& info)
3977  {
3978  char uplo('U'); char norm_type = norm.Char(); char diag('N');
3979 
3980  int n = A.GetM(); double rcond(0);
3981  Vector<double> rwork(n);
3982  Vector<complex<double>, VectFull, Allocator0> work(2*n);
3983  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
3984  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
3985  return rcond;
3986  }
3987 
3988 
3989  /*** ColUpTriang ***/
3990 
3991 
3992  template<class Prop0, class Allocator0>
3993  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
3994  const Matrix<float, Prop0, ColUpTriang,
3995  Allocator0>& A, SeldonNorm norm,
3996  LapackInfo& info)
3997  {
3998  char uplo('U'); char norm_type = norm.Char();
3999  char diag = DiagA.Char();
4000  int n = A.GetM(); float rcond(0);
4001  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4002  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4003  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4004  return rcond;
4005  }
4006 
4007 
4008  template<class Prop0, class Allocator0>
4009  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4010  const Matrix<double, Prop0, ColUpTriang,
4011  Allocator0>& A, SeldonNorm norm,
4012  LapackInfo& info)
4013  {
4014  char uplo('U'); char norm_type = norm.Char();
4015 
4016  int n = A.GetM(); double rcond(0);
4017  char diag = DiagA.Char();
4018  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4019  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4020  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4021  return rcond;
4022  }
4023 
4024 
4025  template<class Prop0, class Allocator0>
4026  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4027  const Matrix<complex<float>, Prop0,
4028  ColUpTriang, Allocator0>& A,
4029  SeldonNorm norm,
4030  LapackInfo& info)
4031  {
4032  char uplo('U'); char norm_type = norm.Char();
4033  char diag = DiagA.Char();
4034  int n = A.GetM(); float rcond(0);
4035  Vector<float> rwork(n);
4036  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4037  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4038  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4039  return rcond;
4040  }
4041 
4042 
4043  template<class Prop0, class Allocator0>
4044  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4045  const Matrix<complex<double>, Prop0,
4046  ColUpTriang, Allocator0>& A,
4047  SeldonNorm norm,
4048  LapackInfo& info)
4049  {
4050  char uplo('U'); char norm_type = norm.Char();
4051  char diag = DiagA.Char();
4052  int n = A.GetM(); double rcond(0);
4053  Vector<double> rwork(n);
4054  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4055  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4056  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4057  return rcond;
4058  }
4059 
4060 
4061  /*** ColLoTriang and NonUnit ***/
4062 
4063 
4064  template<class Prop0, class Allocator0>
4065  float ReciprocalConditionNumber(const Matrix<float, Prop0,
4066  ColLoTriang, Allocator0>& A,
4067  SeldonNorm norm,
4068  LapackInfo& info)
4069  {
4070  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4071 
4072  int n = A.GetM(); float rcond(0);
4073  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4074  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4075  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4076  return rcond;
4077  }
4078 
4079 
4080  template<class Prop0, class Allocator0>
4081  double ReciprocalConditionNumber(const Matrix<double, Prop0, ColLoTriang,
4082  Allocator0>& A, SeldonNorm norm,
4083  LapackInfo& info)
4084  {
4085  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4086 
4087  int n = A.GetM(); double rcond(0);
4088  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4089  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4090  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4091  return rcond;
4092  }
4093 
4094 
4095  template<class Prop0, class Allocator0>
4096  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
4097  ColLoTriang, Allocator0>& A,
4098  SeldonNorm norm,
4099  LapackInfo& info)
4100  {
4101  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4102 
4103  int n = A.GetM(); float rcond(0);
4104  Vector<float> rwork(n);
4105  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4106  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4107  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4108  return rcond;
4109  }
4110 
4111 
4112  template<class Prop0, class Allocator0>
4113  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
4114  ColLoTriang, Allocator0>& A,
4115  SeldonNorm norm,
4116  LapackInfo& info)
4117  {
4118  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4119 
4120  int n = A.GetM(); double rcond(0);
4121  Vector<double> rwork(n);
4122  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4123  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4124  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4125  return rcond;
4126  }
4127 
4128 
4129  /*** ColLoTriang ***/
4130 
4131 
4132  template<class Prop0, class Allocator0>
4133  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4134  const Matrix<float, Prop0,
4135  ColLoTriang, Allocator0>& A,
4136  SeldonNorm norm,
4137  LapackInfo& info)
4138  {
4139  char uplo('L'); char norm_type = norm.Char();
4140  char diag = DiagA.Char();
4141  int n = A.GetM(); float rcond(0);
4142  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4143  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4144  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4145  return rcond;
4146  }
4147 
4148 
4149  template<class Prop0, class Allocator0>
4150  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4151  const Matrix<double, Prop0, ColLoTriang,
4152  Allocator0>& A, SeldonNorm norm,
4153  LapackInfo& info)
4154  {
4155  char uplo('L'); char norm_type = norm.Char();
4156  char diag = DiagA.Char();
4157  int n = A.GetM(); double rcond(0);
4158  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4159  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4160  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4161  return rcond;
4162  }
4163 
4164 
4165  template<class Prop0, class Allocator0>
4166  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4167  const Matrix<complex<float>, Prop0,
4168  ColLoTriang, Allocator0>& A,
4169  SeldonNorm norm,
4170  LapackInfo& info)
4171  {
4172  char uplo('L'); char norm_type = norm.Char();
4173  char diag = DiagA.Char();
4174  int n = A.GetM(); float rcond(0);
4175  Vector<float> rwork(n);
4176  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4177  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4178  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4179  return rcond;
4180  }
4181 
4182 
4183  template<class Prop0, class Allocator0>
4184  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4185  const Matrix<complex<double>, Prop0,
4186  ColLoTriang, Allocator0>& A,
4187  SeldonNorm norm,
4188  LapackInfo& info)
4189  {
4190  char uplo('L'); char norm_type = norm.Char();
4191  char diag = DiagA.Char();
4192  int n = A.GetM(); double rcond(0);
4193  Vector<double> rwork(n);
4194  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4195  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4196  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4197  return rcond;
4198  }
4199 
4200 
4201  /*** ColUpTriangPacked and NonUnit ***/
4202 
4203 
4204  template<class Prop0, class Allocator0>
4205  float ReciprocalConditionNumber(const Matrix<float, Prop0,
4206  ColUpTriangPacked, Allocator0>& A,
4207  SeldonNorm norm,
4208  LapackInfo& info)
4209  {
4210  char uplo('U'); char norm_type = norm.Char(); char diag('N');
4211 
4212  int n = A.GetM(); float rcond(0);
4213  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4214  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4215  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4216  return rcond;
4217  }
4218 
4219 
4220  template<class Prop0, class Allocator0>
4221  double ReciprocalConditionNumber(const Matrix<double, Prop0,
4222  ColUpTriangPacked, Allocator0>& A,
4223  SeldonNorm norm,
4224  LapackInfo& info)
4225  {
4226  char uplo('U'); char norm_type = norm.Char(); char diag('N');
4227 
4228  int n = A.GetM(); double rcond(0);
4229  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4230  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4231  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4232  return rcond;
4233  }
4234 
4235 
4236  template<class Prop0, class Allocator0>
4237  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
4238  ColUpTriangPacked, Allocator0>& A,
4239  SeldonNorm norm,
4240  LapackInfo& info)
4241  {
4242  char uplo('U'); char norm_type = norm.Char(); char diag('N');
4243 
4244  int n = A.GetM(); float rcond(0);
4245  Vector<float> rwork(n);
4246  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4247  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4248  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4249  return rcond;
4250  }
4251 
4252 
4253  template<class Prop0, class Allocator0>
4254  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
4255  ColUpTriangPacked, Allocator0>& A,
4256  SeldonNorm norm,
4257  LapackInfo& info)
4258  {
4259  char uplo('U'); char norm_type = norm.Char(); char diag('N');
4260 
4261  int n = A.GetM(); double rcond(0);
4262  Vector<double> rwork(n);
4263  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4264  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4265  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4266  return rcond;
4267  }
4268 
4269 
4270  /*** ColUpTriangPacked ***/
4271 
4272 
4273  template<class Prop0, class Allocator0>
4274  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4275  const Matrix<float, Prop0,
4276  ColUpTriangPacked, Allocator0>& A,
4277  SeldonNorm norm,
4278  LapackInfo& info)
4279  {
4280  char uplo('U'); char norm_type = norm.Char();
4281  char diag = DiagA.Char();
4282  int n = A.GetM(); float rcond(0);
4283  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4284  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4285  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4286  return rcond;
4287  }
4288 
4289 
4290  template<class Prop0, class Allocator0>
4291  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4292  const Matrix<double, Prop0,
4293  ColUpTriangPacked, Allocator0>& A,
4294  SeldonNorm norm,
4295  LapackInfo& info)
4296  {
4297  char uplo('U'); char norm_type = norm.Char();
4298  char diag = DiagA.Char();
4299  int n = A.GetM(); double rcond(0);
4300  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4301  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4302  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4303  return rcond;
4304  }
4305 
4306 
4307  template<class Prop0, class Allocator0>
4308  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4309  const Matrix<complex<float>, Prop0,
4310  ColUpTriangPacked, Allocator0>& A,
4311  SeldonNorm norm,
4312  LapackInfo& info)
4313  {
4314  char uplo('U'); char norm_type = norm.Char();
4315  char diag = DiagA.Char();
4316  int n = A.GetM(); float rcond(0);
4317  Vector<float> rwork(n);
4318  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4319  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4320  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4321  return rcond;
4322  }
4323 
4324 
4325  template<class Prop0, class Allocator0>
4326  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4327  const Matrix<complex<double>, Prop0,
4328  ColUpTriangPacked, Allocator0>& A,
4329  SeldonNorm norm,
4330  LapackInfo& info)
4331  {
4332  char uplo('U'); char norm_type = norm.Char();
4333  char diag = DiagA.Char();
4334  int n = A.GetM(); double rcond(0);
4335  Vector<double> rwork(n);
4336  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4337  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4338  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4339  return rcond;
4340  }
4341 
4342 
4343  /*** ColLoTriangPacked and NonUnit ***/
4344 
4345 
4346  template<class Prop0, class Allocator0>
4347  float ReciprocalConditionNumber(const Matrix<float, Prop0,
4348  ColLoTriangPacked, Allocator0>& A,
4349  SeldonNorm norm,
4350  LapackInfo& info)
4351  {
4352  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4353 
4354  int n = A.GetM(); float rcond(0);
4355  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4356  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4357  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4358  return rcond;
4359  }
4360 
4361 
4362  template<class Prop0, class Allocator0>
4363  double ReciprocalConditionNumber(const Matrix<double, Prop0,
4364  ColLoTriangPacked, Allocator0>& A,
4365  SeldonNorm norm,
4366  LapackInfo& info)
4367  {
4368  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4369 
4370  int n = A.GetM(); double rcond(0);
4371  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4372  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4373  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4374  return rcond;
4375  }
4376 
4377 
4378  template<class Prop0, class Allocator0>
4379  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
4380  ColLoTriangPacked, Allocator0>& A,
4381  SeldonNorm norm,
4382  LapackInfo& info)
4383  {
4384  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4385 
4386  int n = A.GetM(); float rcond(0);
4387  Vector<float> rwork(n);
4388  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4389  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4390  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4391  return rcond;
4392  }
4393 
4394 
4395  template<class Prop0, class Allocator0>
4396  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
4397  ColLoTriangPacked, Allocator0>& A,
4398  SeldonNorm norm,
4399  LapackInfo& info)
4400  {
4401  char uplo('L'); char norm_type = norm.Char(); char diag('N');
4402 
4403  int n = A.GetM(); double rcond(0);
4404  Vector<double> rwork(n);
4405  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4406  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4407  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4408  return rcond;
4409  }
4410 
4411 
4412  /*** ColLoTriangPacked ***/
4413 
4414 
4415  template<class Prop0, class Allocator0>
4416  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4417  const Matrix<float, Prop0,
4418  ColLoTriangPacked, Allocator0>& A,
4419  SeldonNorm norm,
4420  LapackInfo& info)
4421  {
4422  char uplo('L'); char norm_type = norm.Char();
4423  char diag = DiagA.Char();
4424  int n = A.GetM(); float rcond(0);
4425  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4426  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4427  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4428  return rcond;
4429  }
4430 
4431 
4432  template<class Prop0, class Allocator0>
4433  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4434  const Matrix<double, Prop0,
4435  ColLoTriangPacked, Allocator0>& A,
4436  SeldonNorm norm,
4437  LapackInfo& info)
4438  {
4439  char uplo('L'); char norm_type = norm.Char();
4440  char diag = DiagA.Char();
4441  int n = A.GetM(); double rcond(0);
4442  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4443  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4444  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4445  return rcond;
4446  }
4447 
4448 
4449  template<class Prop0, class Allocator0>
4450  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4451  const Matrix<complex<float>, Prop0,
4452  ColLoTriangPacked, Allocator0>& A,
4453  SeldonNorm norm,
4454  LapackInfo& info)
4455  {
4456  char uplo('L'); char norm_type = norm.Char();
4457  char diag = DiagA.Char();
4458  int n = A.GetM(); float rcond(0);
4459  Vector<float> rwork(n);
4460  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4461  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4462  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4463  return rcond;
4464  }
4465 
4466 
4467  template<class Prop0, class Allocator0>
4468  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4469  const Matrix<complex<double>, Prop0,
4470  ColLoTriangPacked, Allocator0>& A,
4471  SeldonNorm norm,
4472  LapackInfo& info)
4473  {
4474  char uplo('L'); char norm_type = norm.Char();
4475  char diag = DiagA.Char();
4476  int n = A.GetM(); double rcond(0);
4477  Vector<double> rwork(n);
4478  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4479  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4480  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4481  return rcond;
4482  }
4483 
4484 
4485  /*** RowUpTriang and NonUnit ***/
4486 
4487 
4488  template<class Prop0, class Allocator0>
4489  float ReciprocalConditionNumber(const Matrix<float, Prop0, RowUpTriang,
4490  Allocator0>& A, SeldonNorm norm,
4491  LapackInfo& info)
4492  {
4493  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4494 
4495  int n = A.GetM(); float rcond(0);
4496  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4497  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4498  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4499  return rcond;
4500  }
4501 
4502 
4503  template<class Prop0, class Allocator0>
4504  double ReciprocalConditionNumber(const Matrix<double, Prop0, RowUpTriang,
4505  Allocator0>& A, SeldonNorm norm,
4506  LapackInfo& info)
4507  {
4508  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4509 
4510  int n = A.GetM(); double rcond(0);
4511  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4512  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4513  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4514  return rcond;
4515  }
4516 
4517 
4518  template<class Prop0, class Allocator0>
4519  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
4520  RowUpTriang, Allocator0>& A,
4521  SeldonNorm norm,
4522  LapackInfo& info)
4523  {
4524  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4525 
4526  int n = A.GetM(); float rcond(0);
4527  Vector<float> rwork(n);
4528  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4529  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4530  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4531  return rcond;
4532  }
4533 
4534 
4535  template<class Prop0, class Allocator0>
4536  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
4537  RowUpTriang, Allocator0>& A,
4538  SeldonNorm norm,
4539  LapackInfo& info)
4540  {
4541  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4542 
4543  int n = A.GetM(); double rcond(0);
4544  Vector<double> rwork(n);
4545  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4546  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4547  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4548  return rcond;
4549  }
4550 
4551 
4552  /*** RowUpTriang ***/
4553 
4554 
4555  template<class Prop0, class Allocator0>
4556  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4557  const Matrix<float, Prop0, RowUpTriang,
4558  Allocator0>& A, SeldonNorm norm,
4559  LapackInfo& info)
4560  {
4561  char uplo('L'); char norm_type = norm.RevChar();
4562  char diag = DiagA.Char();
4563  int n = A.GetM(); float rcond(0);
4564  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4565  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4566  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4567  return rcond;
4568  }
4569 
4570 
4571  template<class Prop0, class Allocator0>
4572  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4573  const Matrix<double, Prop0, RowUpTriang,
4574  Allocator0>& A, SeldonNorm norm,
4575  LapackInfo& info)
4576  {
4577  char uplo('L'); char norm_type = norm.RevChar();
4578  char diag = DiagA.Char();
4579  int n = A.GetM(); double rcond(0);
4580  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4581  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4582  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4583  return rcond;
4584  }
4585 
4586 
4587  template<class Prop0, class Allocator0>
4588  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4589  const Matrix<complex<float>, Prop0,
4590  RowUpTriang, Allocator0>& A,
4591  SeldonNorm norm,
4592  LapackInfo& info)
4593  {
4594  char uplo('L'); char norm_type = norm.RevChar();
4595  char diag = DiagA.Char();
4596  int n = A.GetM(); float rcond(0);
4597  Vector<float> rwork(n);
4598  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4599  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4600  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4601  return rcond;
4602  }
4603 
4604 
4605  template<class Prop0, class Allocator0>
4606  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4607  const Matrix<complex<double>, Prop0,
4608  RowUpTriang, Allocator0>& A,
4609  SeldonNorm norm,
4610  LapackInfo& info)
4611  {
4612  char uplo('L'); char norm_type = norm.RevChar();
4613  char diag = DiagA.Char();
4614  int n = A.GetM(); double rcond(0);
4615  Vector<double> rwork(n);
4616  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4617  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4618  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4619  return rcond;
4620  }
4621 
4622 
4623  /*** RowLoTriang and NonUnit ***/
4624 
4625 
4626  template<class Prop0, class Allocator0>
4627  float ReciprocalConditionNumber(const Matrix<float, Prop0,
4628  RowLoTriang, Allocator0>& A,
4629  SeldonNorm norm,
4630  LapackInfo& info)
4631  {
4632  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4633 
4634  int n = A.GetM(); float rcond(0);
4635  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4636  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4637  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4638  return rcond;
4639  }
4640 
4641 
4642  template<class Prop0, class Allocator0>
4643  double ReciprocalConditionNumber(const Matrix<double, Prop0,
4644  RowLoTriang, Allocator0>& A,
4645  SeldonNorm norm,
4646  LapackInfo& info)
4647  {
4648  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4649 
4650  int n = A.GetM(); double rcond(0);
4651  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4652  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4653  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4654  return rcond;
4655  }
4656 
4657 
4658  template<class Prop0, class Allocator0>
4659  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
4660  RowLoTriang, Allocator0>& A,
4661  SeldonNorm norm,
4662  LapackInfo& info)
4663  {
4664  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4665 
4666  int n = A.GetM(); float rcond(0);
4667  Vector<float> rwork(n);
4668  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4669  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4670  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4671  return rcond;
4672  }
4673 
4674 
4675  template<class Prop0, class Allocator0>
4676  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
4677  RowLoTriang, Allocator0>& A,
4678  SeldonNorm norm,
4679  LapackInfo& info)
4680  {
4681  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4682 
4683  int n = A.GetM(); double rcond(0);
4684  Vector<double> rwork(n);
4685  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4686  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4687  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4688  return rcond;
4689  }
4690 
4691 
4692  /*** RowLoTriang ***/
4693 
4694 
4695  template<class Prop0, class Allocator0>
4696  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4697  const Matrix<float, Prop0,
4698  RowLoTriang, Allocator0>& A,
4699  SeldonNorm norm,
4700  LapackInfo& info)
4701  {
4702  char uplo('U'); char norm_type = norm.RevChar();
4703  char diag = DiagA.Char();
4704  int n = A.GetM(); float rcond(0);
4705  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4706  strcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4707  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4708  return rcond;
4709  }
4710 
4711 
4712  template<class Prop0, class Allocator0>
4713  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4714  const Matrix<double, Prop0,
4715  RowLoTriang, Allocator0>& A,
4716  SeldonNorm norm,
4717  LapackInfo& info)
4718  {
4719  char uplo('U'); char norm_type = norm.RevChar();
4720  char diag = DiagA.Char();
4721  int n = A.GetM(); double rcond(0);
4722  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4723  dtrcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &n, &rcond,
4724  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4725  return rcond;
4726  }
4727 
4728 
4729  template<class Prop0, class Allocator0>
4730  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4731  const Matrix<complex<float>, Prop0,
4732  RowLoTriang, Allocator0>& A,
4733  SeldonNorm norm,
4734  LapackInfo& info)
4735  {
4736  char uplo('U'); char norm_type = norm.RevChar();
4737  char diag = DiagA.Char();
4738  int n = A.GetM(); float rcond(0);
4739  Vector<float> rwork(n);
4740  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4741  ctrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4742  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4743  return rcond;
4744  }
4745 
4746 
4747  template<class Prop0, class Allocator0>
4748  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4749  const Matrix<complex<double>, Prop0,
4750  RowLoTriang, Allocator0>& A,
4751  SeldonNorm norm,
4752  LapackInfo& info)
4753  {
4754  char uplo('U'); char norm_type = norm.RevChar();
4755  char diag = DiagA.Char();
4756  int n = A.GetM(); double rcond(0);
4757  Vector<double> rwork(n);
4758  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4759  ztrcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &n, &rcond,
4760  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4761  return rcond;
4762  }
4763 
4764 
4765  /*** RowUpTriangPacked and NonUnit ***/
4766 
4767 
4768  template<class Prop0, class Allocator0>
4769  float ReciprocalConditionNumber(const Matrix<float, Prop0,
4770  RowUpTriangPacked, Allocator0>& A,
4771  SeldonNorm norm,
4772  LapackInfo& info)
4773  {
4774  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4775 
4776  int n = A.GetM(); float rcond(0);
4777  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4778  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4779  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4780  return rcond;
4781  }
4782 
4783 
4784  template<class Prop0, class Allocator0>
4785  double ReciprocalConditionNumber(const Matrix<double, Prop0,
4786  RowUpTriangPacked, Allocator0>& A,
4787  SeldonNorm norm,
4788  LapackInfo& info)
4789  {
4790  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4791 
4792  int n = A.GetM(); double rcond(0);
4793  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4794  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4795  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4796  return rcond;
4797  }
4798 
4799 
4800  template<class Prop0, class Allocator0>
4801  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
4802  RowUpTriangPacked, Allocator0>& A,
4803  SeldonNorm norm,
4804  LapackInfo& info)
4805  {
4806  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4807 
4808  int n = A.GetM(); float rcond(0);
4809  Vector<float> rwork(n);
4810  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4811  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4812  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4813  return rcond;
4814  }
4815 
4816 
4817  template<class Prop0, class Allocator0>
4818  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
4819  RowUpTriangPacked, Allocator0>& A,
4820  SeldonNorm norm,
4821  LapackInfo& info)
4822  {
4823  char uplo('L'); char norm_type = norm.RevChar(); char diag('N');
4824 
4825  int n = A.GetM(); double rcond(0);
4826  Vector<double> rwork(n);
4827  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4828  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4829  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4830  return rcond;
4831  }
4832 
4833 
4834  /*** RowUpTriangPacked ***/
4835 
4836 
4837  template<class Prop0, class Allocator0>
4838  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4839  const Matrix<float, Prop0,
4840  RowUpTriangPacked, Allocator0>& A,
4841  SeldonNorm norm,
4842  LapackInfo& info)
4843  {
4844  char uplo('L'); char norm_type = norm.RevChar();
4845  char diag = DiagA.Char();
4846  int n = A.GetM(); float rcond(0);
4847  Vector<int> iwork(n); Vector<float, VectFull, Allocator0> work(3*n);
4848  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4849  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4850  return rcond;
4851  }
4852 
4853 
4854  template<class Prop0, class Allocator0>
4855  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4856  const Matrix<double, Prop0,
4857  RowUpTriangPacked, Allocator0>& A,
4858  SeldonNorm norm,
4859  LapackInfo& info)
4860  {
4861  char uplo('L'); char norm_type = norm.RevChar();
4862  char diag = DiagA.Char();
4863  int n = A.GetM(); double rcond(0);
4864  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4865  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4866  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4867  return rcond;
4868  }
4869 
4870 
4871  template<class Prop0, class Allocator0>
4872  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4873  const Matrix<complex<float>, Prop0,
4874  RowUpTriangPacked, Allocator0>& A,
4875  SeldonNorm norm,
4876  LapackInfo& info)
4877  {
4878  char uplo('L'); char norm_type = norm.RevChar();
4879  char diag = DiagA.Char();
4880  int n = A.GetM(); float rcond(0);
4881  Vector<float> rwork(n);
4882  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4883  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4884  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4885  return rcond;
4886  }
4887 
4888 
4889  template<class Prop0, class Allocator0>
4890  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
4891  const Matrix<complex<double>, Prop0,
4892  RowUpTriangPacked, Allocator0>& A,
4893  SeldonNorm norm,
4894  LapackInfo& info)
4895  {
4896  char uplo('L'); char norm_type = norm.RevChar();
4897  char diag = DiagA.Char();
4898  int n = A.GetM(); double rcond(0);
4899  Vector<double> rwork(n);
4900  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4901  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4902  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4903  return rcond;
4904  }
4905 
4906 
4907  /*** RowLoTriangPacked and NonUnit ***/
4908 
4909 
4910  template<class Prop0, class Allocator0>
4911  float ReciprocalConditionNumber(const Matrix<float, Prop0,
4912  RowLoTriangPacked, Allocator0>& A,
4913  SeldonNorm norm,
4914  LapackInfo& info)
4915  {
4916  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4917 
4918  int n = A.GetM(); float rcond(0);
4919  Vector<int> iwork(n);
4920  Vector<float, VectFull, Allocator0> work(3*n);
4921  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4922  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4923  return rcond;
4924  }
4925 
4926 
4927  template<class Prop0, class Allocator0>
4928  double ReciprocalConditionNumber(const Matrix<double, Prop0,
4929  RowLoTriangPacked, Allocator0>& A,
4930  SeldonNorm norm,
4931  LapackInfo& info)
4932  {
4933  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4934 
4935  int n = A.GetM(); double rcond(0);
4936  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
4937  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4938  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4939  return rcond;
4940  }
4941 
4942 
4943  template<class Prop0, class Allocator0>
4944  float ReciprocalConditionNumber(const Matrix<complex<float>, Prop0,
4945  RowLoTriangPacked, Allocator0>& A,
4946  SeldonNorm norm,
4947  LapackInfo& info)
4948  {
4949  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4950 
4951  int n = A.GetM(); float rcond(0);
4952  Vector<float> rwork(n);
4953  Vector<complex<float>, VectFull, Allocator0> work(2*n);
4954  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4955  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4956  return rcond;
4957  }
4958 
4959 
4960  template<class Prop0, class Allocator0>
4961  double ReciprocalConditionNumber(const Matrix<complex<double>, Prop0,
4962  RowLoTriangPacked, Allocator0>& A,
4963  SeldonNorm norm,
4964  LapackInfo& info)
4965  {
4966  char uplo('U'); char norm_type = norm.RevChar(); char diag('N');
4967 
4968  int n = A.GetM(); double rcond(0);
4969  Vector<double> rwork(n);
4970  Vector<complex<double>, VectFull, Allocator0> work(2*n);
4971  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
4972  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
4973  return rcond;
4974  }
4975 
4976 
4977  /*** RowLoTriangPacked ***/
4978 
4979 
4980  template<class Prop0, class Allocator0>
4981  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
4982  const Matrix<float, Prop0,
4983  RowLoTriangPacked, Allocator0>& A,
4984  SeldonNorm norm,
4985  LapackInfo& info)
4986  {
4987  char uplo('U'); char norm_type = norm.RevChar();
4988  char diag = DiagA.Char();
4989  int n = A.GetM(); float rcond(0);
4990  Vector<int> iwork(n);
4991  Vector<float, VectFull, Allocator0> work(3*n);
4992  stpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
4993  work.GetData(), iwork.GetData(), &info.GetInfoRef());
4994  return rcond;
4995  }
4996 
4997 
4998  template<class Prop0, class Allocator0>
4999  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
5000  const Matrix<double, Prop0,
5001  RowLoTriangPacked, Allocator0>& A,
5002  SeldonNorm norm,
5003  LapackInfo& info)
5004  {
5005  char uplo('U'); char norm_type = norm.RevChar();
5006  char diag = DiagA.Char();
5007  int n = A.GetM(); double rcond(0);
5008  Vector<int> iwork(n); Vector<double, VectFull, Allocator0> work(3*n);
5009  dtpcon_(&norm_type, &uplo, &diag, &n, A.GetData(), &rcond,
5010  work.GetData(), iwork.GetData(), &info.GetInfoRef());
5011  return rcond;
5012  }
5013 
5014 
5015  template<class Prop0, class Allocator0>
5016  float ReciprocalConditionNumber(const SeldonDiag& DiagA,
5017  const Matrix<complex<float>, Prop0,
5018  RowLoTriangPacked, Allocator0>& A,
5019  SeldonNorm norm,
5020  LapackInfo& info)
5021  {
5022  char uplo('U'); char norm_type = norm.RevChar();
5023  char diag = DiagA.Char();
5024  int n = A.GetM(); float rcond(0);
5025  Vector<float> rwork(n);
5026  Vector<complex<float>, VectFull, Allocator0> work(2*n);
5027  ctpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
5028  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
5029  return rcond;
5030  }
5031 
5032 
5033  template<class Prop0, class Allocator0>
5034  double ReciprocalConditionNumber(const SeldonDiag& DiagA,
5035  const Matrix<complex<double>, Prop0,
5036  RowLoTriangPacked, Allocator0>& A,
5037  SeldonNorm norm,
5038  LapackInfo& info)
5039  {
5040  char uplo('U'); char norm_type = norm.RevChar();
5041  char diag = DiagA.Char();
5042  int n = A.GetM(); double rcond(0);
5043  Vector<double> rwork(n);
5044  Vector<complex<double>, VectFull, Allocator0> work(2*n);
5045  ztpcon_(&norm_type, &uplo, &diag, &n, A.GetDataVoid(), &rcond,
5046  work.GetDataVoid(), rwork.GetData(), &info.GetInfoRef());
5047  return rcond;
5048  }
5049 
5050 
5051  // ReciprocalConditionNumber //
5053 
5054 
5055 
5057  // RefineSolutionLU //
5058 
5059 
5060  /*** ColMajor and NoTrans ***/
5061 
5062 
5063  template <class Prop0, class Allocator0,
5064  class Allocator1, class Allocator2,
5065  class Allocator3, class Allocator4>
5066  void RefineSolutionLU(const Matrix<float, Prop0, ColMajor, Allocator0>& A,
5067  const Matrix<float, Prop0, ColMajor,
5068  Allocator1>& Alu,
5069  const Vector<int, VectFull, Allocator2>& P,
5070  Vector<float, VectFull, Allocator3>& x,
5071  const Vector<float, VectFull, Allocator4>& b,
5072  float& ferr, float& berr,
5073  LapackInfo& info)
5074  {
5075 
5076 #ifdef SELDON_CHECK_DIMENSIONS
5077  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5078  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5079 #endif
5080 
5081  int m = A.GetM();
5082  int nrhs = 1;
5083  char trans('N');
5084  Vector<float, VectFull, Allocator3> work(3*m);
5085  Vector<int> iwork(m);
5086  sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5087  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5088  &ferr, &berr, work.GetData(),
5089  iwork.GetData(), &info.GetInfoRef() );
5090  }
5091 
5092 
5093  template <class Prop0, class Allocator0,
5094  class Allocator1, class Allocator2,
5095  class Allocator3, class Allocator4>
5096  void RefineSolutionLU(const Matrix<double, Prop0, ColMajor, Allocator0>& A,
5097  const Matrix<double, Prop0, ColMajor,
5098  Allocator1>& Alu,
5099  const Vector<int, VectFull, Allocator2>& P,
5100  Vector<double, VectFull, Allocator3>& x,
5101  const Vector<double, VectFull, Allocator4>& b,
5102  double& ferr, double& berr,
5103  LapackInfo& info)
5104  {
5105 
5106 #ifdef SELDON_CHECK_DIMENSIONS
5107  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5108  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5109 #endif
5110 
5111  int m = A.GetM();
5112  int nrhs = 1;
5113  char trans('N');
5114  Vector<double, VectFull, Allocator3> work(3*m);
5115  Vector<int> iwork(m);
5116  dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5117  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5118  &ferr, &berr, work.GetData(),
5119  iwork.GetData(), &info.GetInfoRef() );
5120  }
5121 
5122 
5123  template <class Prop0, class Allocator0,
5124  class Allocator1, class Allocator2,
5125  class Allocator3, class Allocator4>
5126  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
5127  ColMajor, Allocator0>& A,
5128  const Matrix<complex<float>, Prop0,
5129  ColMajor, Allocator1>& Alu,
5130  const Vector<int, VectFull, Allocator2>& P,
5131  Vector<complex<float>, VectFull, Allocator3>& x,
5132  const Vector<complex<float>, VectFull,
5133  Allocator4>& b,
5134  float& ferr, float& berr,
5135  LapackInfo& info)
5136  {
5137 
5138 #ifdef SELDON_CHECK_DIMENSIONS
5139  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5140  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5141 #endif
5142 
5143  int m = A.GetM();
5144  int nrhs = 1;
5145  char trans('N');
5146  Vector<complex<float>, VectFull, Allocator3> work(2*m);
5147  Vector<float> rwork(m);
5148  cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5149  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5150  &berr, work.GetData(), rwork.GetData(),
5151  &info.GetInfoRef() );
5152  }
5153 
5154 
5155  template <class Prop0, class Allocator0,
5156  class Allocator1, class Allocator2,
5157  class Allocator3, class Allocator4>
5158  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
5159  ColMajor, Allocator0>& A,
5160  const Matrix<complex<double>, Prop0,
5161  ColMajor, Allocator1>& Alu,
5162  const Vector<int, VectFull, Allocator2>& P,
5163  Vector<complex<double>, VectFull, Allocator3>& x,
5164  const Vector<complex<double>, VectFull,
5165  Allocator4>& b,
5166  double& ferr, double& berr,
5167  LapackInfo& info)
5168  {
5169 
5170 #ifdef SELDON_CHECK_DIMENSIONS
5171  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5172  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5173 #endif
5174 
5175  int m = A.GetM();
5176  int nrhs = 1;
5177  char trans('N');
5178  Vector<complex<double>, VectFull, Allocator3> work(2*m);
5179  Vector<double> rwork(m);
5180  zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5181  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5182  &berr, work.GetData(), rwork.GetData(),
5183  &info.GetInfoRef() );
5184  }
5185 
5186 
5187  /*** ColMajor ***/
5188 
5189 
5190  template <class Prop0, class Allocator0,
5191  class Allocator1, class Allocator2,
5192  class Allocator3, class Allocator4>
5193  void RefineSolutionLU(const SeldonTranspose& TransA,
5194  const Matrix<float, Prop0, ColMajor, Allocator0>& A,
5195  const Matrix<float, Prop0, ColMajor,
5196  Allocator1>& Alu,
5197  const Vector<int, VectFull, Allocator2>& P,
5198  Vector<float, VectFull, Allocator3>& x,
5199  const Vector<float, VectFull, Allocator4>& b,
5200  float& ferr, float& berr,
5201  LapackInfo& info)
5202  {
5203 
5204 #ifdef SELDON_CHECK_DIMENSIONS
5205  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5206  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5207 #endif
5208 
5209  int m = A.GetM();
5210  int nrhs = 1;
5211  char trans = TransA.Char();
5212  Vector<float, VectFull, Allocator3> work(3*m);
5213  Vector<int> iwork(m);
5214  sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5215  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5216  &ferr, &berr, work.GetData(),
5217  iwork.GetData(), &info.GetInfoRef() );
5218  }
5219 
5220 
5221  template <class Prop0, class Allocator0,
5222  class Allocator1, class Allocator2,
5223  class Allocator3, class Allocator4>
5224  void RefineSolutionLU(const SeldonTranspose& TransA,
5225  const Matrix<double, Prop0, ColMajor, Allocator0>& A,
5226  const Matrix<double, Prop0, ColMajor,
5227  Allocator1>& Alu,
5228  const Vector<int, VectFull, Allocator2>& P,
5229  Vector<double, VectFull, Allocator3>& x,
5230  const Vector<double, VectFull, Allocator4>& b,
5231  double& ferr, double& berr,
5232  LapackInfo& info)
5233  {
5234 
5235 #ifdef SELDON_CHECK_DIMENSIONS
5236  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5237  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5238 #endif
5239 
5240  int m = A.GetM();
5241  int nrhs = 1;
5242  char trans = TransA.Char();
5243  Vector<double, VectFull, Allocator3> work(3*m);
5244  Vector<int> iwork(m);
5245  dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5246  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5247  &ferr, &berr, work.GetData(),
5248  iwork.GetData(), &info.GetInfoRef() );
5249  }
5250 
5251 
5252  template <class Prop0, class Allocator0,
5253  class Allocator1, class Allocator2,
5254  class Allocator3, class Allocator4>
5255  void
5256  RefineSolutionLU(const SeldonTranspose& TransA,
5257  const Matrix<complex<float>, Prop0, ColMajor,
5258  Allocator0>& A,
5259  const Matrix<complex<float>, Prop0, ColMajor,
5260  Allocator1>& Alu,
5261  const Vector<int, VectFull, Allocator2>& P,
5262  Vector<complex<float>, VectFull, Allocator3>& x,
5263  const Vector<complex<float>, VectFull, Allocator4>& b,
5264  float& ferr, float& berr,
5265  LapackInfo& info)
5266  {
5267 
5268 #ifdef SELDON_CHECK_DIMENSIONS
5269  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5270  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5271 #endif
5272 
5273  int m = A.GetM();
5274  int nrhs = 1;
5275  char trans = TransA.Char();
5276  Vector<complex<float>, VectFull, Allocator3> work(2*m);
5277  Vector<float> rwork(m);
5278  cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5279  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
5280  &ferr, &berr, work.GetDataVoid(),
5281  rwork.GetData(), &info.GetInfoRef() );
5282  }
5283 
5284 
5285  template <class Prop0, class Allocator0,
5286  class Allocator1, class Allocator2,
5287  class Allocator3, class Allocator4>
5288  void RefineSolutionLU(const SeldonTranspose& TransA,
5289  const Matrix<complex<double>, Prop0, ColMajor,
5290  Allocator0>& A,
5291  const Matrix<complex<double>, Prop0, ColMajor,
5292  Allocator1>& Alu,
5293  const Vector<int, VectFull, Allocator2>& P,
5294  Vector<complex<double>, VectFull, Allocator3>& x,
5295  const Vector<complex<double>, VectFull,
5296  Allocator4>& b,
5297  double& ferr, double& berr,
5298  LapackInfo& info)
5299  {
5300 
5301 #ifdef SELDON_CHECK_DIMENSIONS
5302  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5303  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5304 #endif
5305 
5306  int m = A.GetM();
5307  int nrhs = 1;
5308  char trans = TransA.Char();
5309  Vector<complex<double>, VectFull, Allocator3> work(2*m);
5310  Vector<double> rwork(m);
5311  zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5312  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
5313  &ferr, &berr, work.GetDataVoid(),
5314  rwork.GetData(), &info.GetInfoRef());
5315  }
5316 
5317 
5318  /*** RowMajor and NoTrans ***/
5319 
5320 
5321  template <class Prop0, class Allocator0,
5322  class Allocator1, class Allocator2,
5323  class Allocator3, class Allocator4>
5324  void RefineSolutionLU(const Matrix<float, Prop0, RowMajor, Allocator0>& A,
5325  const Matrix<float, Prop0, RowMajor,
5326  Allocator1>& Alu,
5327  const Vector<int, VectFull, Allocator2>& P,
5328  Vector<float, VectFull, Allocator3>& x,
5329  const Vector<float, VectFull, Allocator4>& b,
5330  float& ferr, float& berr,
5331  LapackInfo& info)
5332  {
5333 
5334 #ifdef SELDON_CHECK_DIMENSIONS
5335  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5336  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5337 #endif
5338 
5339  int m = A.GetM();
5340  int nrhs = 1;
5341  char trans('T');
5342  Vector<float, VectFull, Allocator3> work(3*m);
5343  Vector<int> iwork(m);
5344  sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5345  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5346  &ferr, &berr, work.GetData(),
5347  iwork.GetData(), &info.GetInfoRef());
5348  }
5349 
5350 
5351  template <class Prop0, class Allocator0,
5352  class Allocator1, class Allocator2,
5353  class Allocator3, class Allocator4>
5354  void RefineSolutionLU(const Matrix<double, Prop0, RowMajor, Allocator0>& A,
5355  const Matrix<double, Prop0, RowMajor,
5356  Allocator1>& Alu,
5357  const Vector<int, VectFull, Allocator2>& P,
5358  Vector<double, VectFull, Allocator3>& x,
5359  const Vector<double, VectFull, Allocator4>& b,
5360  double& ferr, double& berr,
5361  LapackInfo& info)
5362  {
5363 
5364 #ifdef SELDON_CHECK_DIMENSIONS
5365  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5366  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5367 #endif
5368 
5369  int m = A.GetM();
5370  int nrhs = 1;
5371  char trans('T');
5372  Vector<double, VectFull, Allocator3> work(3*m);
5373  Vector<int> iwork(m);
5374  dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5375  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5376  &ferr, &berr, work.GetData(),
5377  iwork.GetData(), &info.GetInfoRef());
5378  }
5379 
5380 
5381  template <class Prop0, class Allocator0,
5382  class Allocator1, class Allocator2,
5383  class Allocator3, class Allocator4>
5384  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
5385  RowMajor, Allocator0>& A,
5386  const Matrix<complex<float>, Prop0,
5387  RowMajor, Allocator1>& Alu,
5388  const Vector<int, VectFull, Allocator2>& P,
5389  Vector<complex<float>, VectFull, Allocator3>& x,
5390  const Vector<complex<float>, VectFull,
5391  Allocator4>& b,
5392  float& ferr, float& berr,
5393  LapackInfo& info)
5394  {
5395 
5396 #ifdef SELDON_CHECK_DIMENSIONS
5397  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5398  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5399 #endif
5400 
5401  int m = A.GetM();
5402  int nrhs = 1;
5403  char trans('T');
5404  Vector<complex<float>, VectFull, Allocator3> work(2*m);
5405  Vector<float> rwork(m);
5406  cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5407  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5408  &berr, work.GetData(), rwork.GetData(),
5409  &info.GetInfoRef());
5410  }
5411 
5412 
5413  template <class Prop0, class Allocator0,
5414  class Allocator1, class Allocator2,
5415  class Allocator3, class Allocator4>
5416  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
5417  RowMajor, Allocator0>& A,
5418  const Matrix<complex<double>, Prop0,
5419  RowMajor, Allocator1>& Alu,
5420  const Vector<int, VectFull, Allocator2>& P,
5421  Vector<complex<double>, VectFull, Allocator3>& x,
5422  const Vector<complex<double>, VectFull,
5423  Allocator4>& b,
5424  double& ferr, double& berr,
5425  LapackInfo& info)
5426  {
5427 
5428 #ifdef SELDON_CHECK_DIMENSIONS
5429  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5430  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5431 #endif
5432 
5433  int m = A.GetM();
5434  int nrhs = 1;
5435  char trans('T');
5436  Vector<complex<double>, VectFull, Allocator3> work(2*m);
5437  Vector<double> rwork(m);
5438  zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5439  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5440  &berr, work.GetData(), rwork.GetData(),
5441  &info.GetInfoRef());
5442  }
5443 
5444 
5445  /*** RowMajor ***/
5446 
5447 
5448  template <class Prop0, class Allocator0,
5449  class Allocator1, class Allocator2,
5450  class Allocator3, class Allocator4>
5451  void RefineSolutionLU(const SeldonTranspose& TransA,
5452  const Matrix<float, Prop0, RowMajor, Allocator0>& A,
5453  const Matrix<float, Prop0, RowMajor,
5454  Allocator1>& Alu,
5455  const Vector<int, VectFull, Allocator2>& P,
5456  Vector<float, VectFull, Allocator3>& x,
5457  const Vector<float, VectFull, Allocator4>& b,
5458  float& ferr, float& berr,
5459  LapackInfo& info)
5460  {
5461 
5462 #ifdef SELDON_CHECK_DIMENSIONS
5463  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5464  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5465 #endif
5466 
5467  int m = A.GetM();
5468  int nrhs = 1;
5469  char trans = TransA.RevChar();
5470  Vector<float, VectFull, Allocator3> work(3*m);
5471  Vector<int> iwork(m);
5472  sgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5473  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5474  &ferr, &berr, work.GetData(),
5475  iwork.GetData(), &info.GetInfoRef() );
5476  }
5477 
5478 
5479  template <class Prop0, class Allocator0,
5480  class Allocator1, class Allocator2,
5481  class Allocator3, class Allocator4>
5482  void RefineSolutionLU(const SeldonTranspose& TransA,
5483  const Matrix<double, Prop0, RowMajor, Allocator0>& A,
5484  const Matrix<double, Prop0, RowMajor,
5485  Allocator1>& Alu,
5486  const Vector<int, VectFull, Allocator2>& P,
5487  Vector<double, VectFull, Allocator3>& x,
5488  const Vector<double, VectFull, Allocator4>& b,
5489  double& ferr, double& berr,
5490  LapackInfo& info)
5491  {
5492 
5493 #ifdef SELDON_CHECK_DIMENSIONS
5494  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5495  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5496 #endif
5497 
5498  int m = A.GetM();
5499  int nrhs = 1;
5500  char trans = TransA.RevChar();
5501  Vector<double, VectFull, Allocator3> work(3*m);
5502  Vector<int> iwork(m);
5503  dgerfs_(&trans, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5504  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5505  &ferr, &berr, work.GetData(),
5506  iwork.GetData(), &info.GetInfoRef() );
5507  }
5508 
5509 
5510  template <class Prop0, class Allocator0,
5511  class Allocator1, class Allocator2,
5512  class Allocator3, class Allocator4>
5513  void RefineSolutionLU(const SeldonTranspose& TransA,
5514  const Matrix<complex<float>, Prop0, RowMajor,
5515  Allocator0>& A,
5516  const Matrix<complex<float>, Prop0, RowMajor,
5517  Allocator1>& Alu,
5518  const Vector<int, VectFull, Allocator2>& P,
5519  Vector<complex<float>, VectFull, Allocator3>& x,
5520  Vector<complex<float>, VectFull, Allocator4>& b,
5521  float& ferr, float& berr,
5522  LapackInfo& info)
5523  {
5524 
5525 #ifdef SELDON_CHECK_DIMENSIONS
5526  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5527  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5528 #endif
5529 
5530  int m = A.GetM();
5531  int nrhs = 1;
5532  char trans = TransA.RevChar();
5533  Vector<complex<float>, VectFull, Allocator3> work(2*m);
5534  Vector<float> rwork(m);
5535  if (TransA.ConjTrans())
5536  {
5537  Conjugate(b);
5538  Conjugate(x);
5539  }
5540  cgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5541  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
5542  &ferr, &berr, work.GetDataVoid(),
5543  rwork.GetData(), &info.GetInfoRef() );
5544  if (TransA.ConjTrans())
5545  {
5546  Conjugate(b);
5547  Conjugate(x);
5548  }
5549  }
5550 
5551 
5552  template <class Prop0, class Allocator0,
5553  class Allocator1, class Allocator2,
5554  class Allocator3, class Allocator4>
5555  void RefineSolutionLU(const SeldonTranspose& TransA,
5556  const Matrix<complex<double>, Prop0, RowMajor,
5557  Allocator0>& A,
5558  const Matrix<complex<double>, Prop0, RowMajor,
5559  Allocator1>& Alu,
5560  const Vector<int, VectFull, Allocator2>& P,
5561  Vector<complex<double>, VectFull, Allocator3>& x,
5562  Vector<complex<double>, VectFull,
5563  Allocator4>& b,
5564  double& ferr, double& berr,
5565  LapackInfo& info)
5566  {
5567 
5568 #ifdef SELDON_CHECK_DIMENSIONS
5569  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5570  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5571 #endif
5572 
5573  if (TransA.ConjTrans())
5574  {
5575  Conjugate(x);
5576  Conjugate(b);
5577  }
5578 
5579  int m = A.GetM();
5580  int nrhs = 1;
5581  char trans = TransA.RevChar();
5582  Vector<complex<double>, VectFull, Allocator3> work(2*m);
5583  Vector<double> rwork(m);
5584 
5585  zgerfs_(&trans, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5586  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m,
5587  &ferr, &berr, work.GetDataVoid(),
5588  rwork.GetData(), &info.GetInfoRef());
5589 
5590  if (TransA.ConjTrans())
5591  {
5592  Conjugate(x);
5593  Conjugate(b);
5594  }
5595  }
5596 
5597 
5598  /*** ColSym and Upper ***/
5599 
5600 
5601  template <class Prop0, class Allocator0,
5602  class Allocator1, class Allocator2,
5603  class Allocator3, class Allocator4>
5604  void RefineSolutionLU(const Matrix<float, Prop0, ColSym, Allocator0>& A,
5605  const Matrix<float, Prop0, ColSym,
5606  Allocator1>& Alu,
5607  const Vector<int, VectFull, Allocator2>& P,
5608  Vector<float, VectFull, Allocator3>& x,
5609  const Vector<float, VectFull, Allocator4>& b,
5610  float& ferr, float& berr,
5611  LapackInfo& info)
5612  {
5613 
5614 #ifdef SELDON_CHECK_DIMENSIONS
5615  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5616  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5617 #endif
5618 
5619  int m = A.GetM();
5620  int nrhs = 1;
5621  char uplo('U');
5622  Vector<float, VectFull, Allocator3> work(3*m);
5623  Vector<int> iwork(m);
5624  ssyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5625  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5626  &ferr, &berr, work.GetData(),
5627  iwork.GetData(), &info.GetInfoRef() );
5628  }
5629 
5630 
5631  template <class Prop0, class Allocator0,
5632  class Allocator1, class Allocator2,
5633  class Allocator3, class Allocator4>
5634  void RefineSolutionLU(const Matrix<double, Prop0, ColSym, Allocator0>& A,
5635  const Matrix<double, Prop0, ColSym,
5636  Allocator1>& Alu,
5637  const Vector<int, VectFull, Allocator2>& P,
5638  Vector<double, VectFull, Allocator3>& x,
5639  const Vector<double, VectFull, Allocator4>& b,
5640  double& ferr, double& berr,
5641  LapackInfo& info)
5642  {
5643 
5644 #ifdef SELDON_CHECK_DIMENSIONS
5645  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5646  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5647 #endif
5648 
5649  int m = A.GetM();
5650  int nrhs = 1;
5651  char uplo('U');
5652  Vector<double, VectFull, Allocator3> work(3*m);
5653  Vector<int> iwork(m);
5654  dsyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5655  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5656  &ferr, &berr, work.GetData(),
5657  iwork.GetData(), &info.GetInfoRef() );
5658  }
5659 
5660 
5661  template <class Prop0, class Allocator0,
5662  class Allocator1, class Allocator2,
5663  class Allocator3, class Allocator4>
5664  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
5665  ColSym, Allocator0>& A,
5666  const Matrix<complex<float>, Prop0,
5667  ColSym, Allocator1>& Alu,
5668  const Vector<int, VectFull, Allocator2>& P,
5669  Vector<complex<float>, VectFull, Allocator3>& x,
5670  const Vector<complex<float>, VectFull,
5671  Allocator4>& b,
5672  float& ferr, float& berr,
5673  LapackInfo& info)
5674  {
5675 
5676 #ifdef SELDON_CHECK_DIMENSIONS
5677  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5678  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5679 #endif
5680 
5681  int m = A.GetM();
5682  int nrhs = 1;
5683  char uplo('U');
5684  Vector<complex<float>, VectFull, Allocator3> work(2*m);
5685  Vector<float> rwork(m);
5686  csyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5687  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5688  &berr, work.GetData(), rwork.GetData(),
5689  &info.GetInfoRef() );
5690  }
5691 
5692 
5693  template <class Prop0, class Allocator0,
5694  class Allocator1, class Allocator2,
5695  class Allocator3, class Allocator4>
5696  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
5697  ColSym, Allocator0>& A,
5698  const Matrix<complex<double>, Prop0,
5699  ColSym, Allocator1>& Alu,
5700  const Vector<int, VectFull, Allocator2>& P,
5701  Vector<complex<double>, VectFull, Allocator3>& x,
5702  const Vector<complex<double>, VectFull,
5703  Allocator4>& b,
5704  double& ferr, double& berr,
5705  LapackInfo& info)
5706  {
5707 
5708 #ifdef SELDON_CHECK_DIMENSIONS
5709  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5710  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5711 #endif
5712 
5713  int m = A.GetM();
5714  int nrhs = 1;
5715  char uplo('U');
5716  Vector<complex<double>, VectFull, Allocator3> work(2*m);
5717  Vector<double> rwork(m);
5718  zsyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5719  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5720  &berr, work.GetData(), rwork.GetData(),
5721  &info.GetInfoRef() );
5722  }
5723 
5724 
5725  /*** ColSymPacked and Upper ***/
5726 
5727 
5728  template <class Prop0, class Allocator0,
5729  class Allocator1, class Allocator2,
5730  class Allocator3, class Allocator4>
5731  void RefineSolutionLU(const Matrix<float, Prop0, ColSymPacked,
5732  Allocator0>& A,
5733  const Matrix<float, Prop0, ColSymPacked,
5734  Allocator1>& Alu,
5735  const Vector<int, VectFull, Allocator2>& P,
5736  Vector<float, VectFull, Allocator3>& x,
5737  const Vector<float, VectFull, Allocator4>& b,
5738  float& ferr, float& berr,
5739  LapackInfo& info)
5740  {
5741 
5742 #ifdef SELDON_CHECK_DIMENSIONS
5743  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5744  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5745 #endif
5746 
5747  int m = A.GetM();
5748  int nrhs = 1;
5749  char uplo('U');
5750  Vector<float, VectFull, Allocator3> work(3*m);
5751  Vector<int> iwork(m);
5752  ssprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
5753  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5754  &ferr, &berr, work.GetData(),
5755  iwork.GetData(), &info.GetInfoRef() );
5756  }
5757 
5758 
5759  template <class Prop0, class Allocator0,
5760  class Allocator1, class Allocator2,
5761  class Allocator3, class Allocator4>
5762  void RefineSolutionLU(const Matrix<double, Prop0, ColSymPacked,
5763  Allocator0>& A,
5764  const Matrix<double, Prop0, ColSymPacked,
5765  Allocator1>& Alu,
5766  const Vector<int, VectFull, Allocator2>& P,
5767  Vector<double, VectFull, Allocator3>& x,
5768  const Vector<double, VectFull, Allocator4>& b,
5769  double& ferr, double& berr,
5770  LapackInfo& info)
5771  {
5772 
5773 #ifdef SELDON_CHECK_DIMENSIONS
5774  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5775  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5776 #endif
5777 
5778  int m = A.GetM();
5779  int nrhs = 1;
5780  char uplo('U');
5781  Vector<double, VectFull, Allocator3> work(3*m);
5782  Vector<int> iwork(m);
5783  dsprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
5784  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5785  &ferr, &berr, work.GetData(),
5786  iwork.GetData(), &info.GetInfoRef() );
5787  }
5788 
5789 
5790  template <class Prop0, class Allocator0,
5791  class Allocator1, class Allocator2,
5792  class Allocator3, class Allocator4>
5793  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
5794  ColSymPacked, Allocator0>& A,
5795  const Matrix<complex<float>, Prop0,
5796  ColSymPacked, Allocator1>& Alu,
5797  const Vector<int, VectFull, Allocator2>& P,
5798  Vector<complex<float>, VectFull, Allocator3>& x,
5799  const Vector<complex<float>, VectFull,
5800  Allocator4>& b,
5801  float& ferr, float& berr,
5802  LapackInfo& info)
5803  {
5804 
5805 #ifdef SELDON_CHECK_DIMENSIONS
5806  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5807  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5808 #endif
5809 
5810  int m = A.GetM();
5811  int nrhs = 1;
5812  char uplo('U');
5813  Vector<complex<float>, VectFull, Allocator3> work(2*m);
5814  Vector<float> rwork(m);
5815  csprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
5816  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5817  &berr, work.GetData(), rwork.GetData(),
5818  &info.GetInfoRef() );
5819  }
5820 
5821 
5822  template <class Prop0, class Allocator0,
5823  class Allocator1, class Allocator2,
5824  class Allocator3, class Allocator4>
5825  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
5826  ColSymPacked, Allocator0>& A,
5827  const Matrix<complex<double>, Prop0,
5828  ColSymPacked, Allocator1>& Alu,
5829  const Vector<int, VectFull, Allocator2>& P,
5830  Vector<complex<double>, VectFull, Allocator3>& x,
5831  const Vector<complex<double>, VectFull,
5832  Allocator4>& b,
5833  double& ferr, double& berr,
5834  LapackInfo& info)
5835  {
5836 
5837 #ifdef SELDON_CHECK_DIMENSIONS
5838  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5839  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5840 #endif
5841 
5842  int m = A.GetM();
5843  int nrhs = 1;
5844  char uplo('U');
5845  Vector<complex<double>, VectFull, Allocator3> work(2*m);
5846  Vector<double> rwork(m);
5847  zsprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
5848  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5849  &berr, work.GetData(), rwork.GetData(),
5850  &info.GetInfoRef() );
5851  }
5852 
5853 
5854  /*** RowSym and Upper ***/
5855 
5856 
5857  template <class Prop0, class Allocator0,
5858  class Allocator1, class Allocator2,
5859  class Allocator3, class Allocator4>
5860  void RefineSolutionLU(const Matrix<float, Prop0, RowSym, Allocator0>& A,
5861  const Matrix<float, Prop0, RowSym,
5862  Allocator1>& Alu,
5863  const Vector<int, VectFull, Allocator2>& P,
5864  Vector<float, VectFull, Allocator3>& x,
5865  const Vector<float, VectFull, Allocator4>& b,
5866  float& ferr, float& berr,
5867  LapackInfo& info)
5868  {
5869 
5870 #ifdef SELDON_CHECK_DIMENSIONS
5871  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5872  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5873 #endif
5874 
5875  int m = A.GetM();
5876  int nrhs = 1;
5877  char uplo('L');
5878  Vector<float, VectFull, Allocator3> work(3*m);
5879  Vector<int> iwork(m);
5880  ssyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5881  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5882  &ferr, &berr, work.GetData(),
5883  iwork.GetData(), &info.GetInfoRef() );
5884  }
5885 
5886 
5887  template <class Prop0, class Allocator0,
5888  class Allocator1, class Allocator2,
5889  class Allocator3, class Allocator4>
5890  void RefineSolutionLU(const Matrix<double, Prop0, RowSym, Allocator0>& A,
5891  const Matrix<double, Prop0, RowSym,
5892  Allocator1>& Alu,
5893  const Vector<int, VectFull, Allocator2>& P,
5894  Vector<double, VectFull, Allocator3>& x,
5895  const Vector<double, VectFull, Allocator4>& b,
5896  double& ferr, double& berr,
5897  LapackInfo& info)
5898  {
5899 
5900 #ifdef SELDON_CHECK_DIMENSIONS
5901  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5902  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5903 #endif
5904 
5905  int m = A.GetM();
5906  int nrhs = 1;
5907  char uplo('L');
5908  Vector<double, VectFull, Allocator3> work(3*m);
5909  Vector<int> iwork(m);
5910  dsyrfs_(&uplo, &m, &nrhs, A.GetData(), &m, Alu.GetData(), &m,
5911  P.GetData(), b.GetData(), &m, x.GetData(), &m,
5912  &ferr, &berr, work.GetData(),
5913  iwork.GetData(), &info.GetInfoRef() );
5914  }
5915 
5916 
5917  template <class Prop0, class Allocator0,
5918  class Allocator1, class Allocator2,
5919  class Allocator3, class Allocator4>
5920  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
5921  RowSym, Allocator0>& A,
5922  const Matrix<complex<float>, Prop0,
5923  RowSym, Allocator1>& Alu,
5924  const Vector<int, VectFull, Allocator2>& P,
5925  Vector<complex<float>, VectFull, Allocator3>& x,
5926  const Vector<complex<float>, VectFull,
5927  Allocator4>& b,
5928  float& ferr, float& berr,
5929  LapackInfo& info)
5930  {
5931 
5932 #ifdef SELDON_CHECK_DIMENSIONS
5933  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5934  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5935 #endif
5936 
5937  int m = A.GetM();
5938  int nrhs = 1;
5939  char uplo('L');
5940  Vector<complex<float>, VectFull, Allocator3> work(2*m);
5941  Vector<float> rwork(m);
5942  csyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5943  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5944  &berr, work.GetData(), rwork.GetData(),
5945  &info.GetInfoRef() );
5946  }
5947 
5948 
5949  template <class Prop0, class Allocator0,
5950  class Allocator1, class Allocator2,
5951  class Allocator3, class Allocator4>
5952  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
5953  RowSym, Allocator0>& A,
5954  const Matrix<complex<double>, Prop0,
5955  RowSym, Allocator1>& Alu,
5956  const Vector<int, VectFull, Allocator2>& P,
5957  Vector<complex<double>, VectFull, Allocator3>& x,
5958  const Vector<complex<double>, VectFull,
5959  Allocator4>& b,
5960  double& ferr, double& berr,
5961  LapackInfo& info)
5962  {
5963 
5964 #ifdef SELDON_CHECK_DIMENSIONS
5965  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5966  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
5967 #endif
5968 
5969  int m = A.GetM();
5970  int nrhs = 1;
5971  char uplo('L');
5972  Vector<complex<double>, VectFull, Allocator3> work(2*m);
5973  Vector<double> rwork(m);
5974  zsyrfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
5975  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
5976  &berr, work.GetData(), rwork.GetData(),
5977  &info.GetInfoRef() );
5978  }
5979 
5980 
5981  /*** RowSymPacked and Upper ***/
5982 
5983 
5984  template <class Prop0, class Allocator0,
5985  class Allocator1, class Allocator2,
5986  class Allocator3, class Allocator4>
5987  void RefineSolutionLU(const Matrix<float, Prop0, RowSymPacked,
5988  Allocator0>& A,
5989  const Matrix<float, Prop0, RowSymPacked,
5990  Allocator1>& Alu,
5991  const Vector<int, VectFull, Allocator2>& P,
5992  Vector<float, VectFull, Allocator3>& x,
5993  const Vector<float, VectFull, Allocator4>& b,
5994  float& ferr, float& berr,
5995  LapackInfo& info)
5996  {
5997 
5998 #ifdef SELDON_CHECK_DIMENSIONS
5999  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6000  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6001 #endif
6002 
6003  int m = A.GetM();
6004  int nrhs = 1;
6005  char uplo('L');
6006  Vector<float, VectFull, Allocator3> work(3*m);
6007  Vector<int> iwork(m);
6008  ssprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
6009  P.GetData(), b.GetData(), &m, x.GetData(), &m,
6010  &ferr, &berr, work.GetData(),
6011  iwork.GetData(), &info.GetInfoRef() );
6012  }
6013 
6014 
6015  template <class Prop0, class Allocator0,
6016  class Allocator1, class Allocator2,
6017  class Allocator3, class Allocator4>
6018  void RefineSolutionLU(const Matrix<double, Prop0, RowSymPacked,
6019  Allocator0>& A,
6020  const Matrix<double, Prop0, RowSymPacked,
6021  Allocator1>& Alu,
6022  const Vector<int, VectFull, Allocator2>& P,
6023  Vector<double, VectFull, Allocator3>& x,
6024  const Vector<double, VectFull, Allocator4>& b,
6025  double& ferr, double& berr,
6026  LapackInfo& info)
6027  {
6028 
6029 #ifdef SELDON_CHECK_DIMENSIONS
6030  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6031  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6032 #endif
6033 
6034  int m = A.GetM();
6035  int nrhs = 1;
6036  char uplo('L');
6037  Vector<double, VectFull, Allocator3> work(3*m);
6038  Vector<int> iwork(m);
6039  dsprfs_(&uplo, &m, &nrhs, A.GetData(), Alu.GetData(),
6040  P.GetData(), b.GetData(), &m, x.GetData(), &m,
6041  &ferr, &berr, work.GetData(),
6042  iwork.GetData(), &info.GetInfoRef() );
6043  }
6044 
6045 
6046  template <class Prop0, class Allocator0,
6047  class Allocator1, class Allocator2,
6048  class Allocator3, class Allocator4>
6049  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
6050  RowSymPacked, Allocator0>& A,
6051  const Matrix<complex<float>, Prop0,
6052  RowSymPacked, Allocator1>& Alu,
6053  const Vector<int, VectFull, Allocator2>& P,
6054  Vector<complex<float>, VectFull, Allocator3>& x,
6055  const Vector<complex<float>, VectFull,
6056  Allocator4>& b,
6057  float& ferr, float& berr,
6058  LapackInfo& info)
6059  {
6060 
6061 #ifdef SELDON_CHECK_DIMENSIONS
6062  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6063  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6064 #endif
6065 
6066  int m = A.GetM();
6067  int nrhs = 1;
6068  char uplo('L');
6069  Vector<complex<float>, VectFull, Allocator3> work(2*m);
6070  Vector<float> rwork(m);
6071  csprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
6072  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6073  &berr, work.GetData(), rwork.GetData(),
6074  &info.GetInfoRef() );
6075  }
6076 
6077 
6078  template <class Prop0, class Allocator0,
6079  class Allocator1, class Allocator2,
6080  class Allocator3, class Allocator4>
6081  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
6082  RowSymPacked, Allocator0>& A,
6083  const Matrix<complex<double>, Prop0,
6084  RowSymPacked, Allocator1>& Alu,
6085  const Vector<int, VectFull, Allocator2>& P,
6086  Vector<complex<double>, VectFull, Allocator3>& x,
6087  const Vector<complex<double>, VectFull,
6088  Allocator4>& b,
6089  double& ferr, double& berr,
6090  LapackInfo& info)
6091  {
6092 
6093 #ifdef SELDON_CHECK_DIMENSIONS
6094  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6095  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6096 #endif
6097 
6098  int m = A.GetM();
6099  int nrhs = 1;
6100  char uplo('L');
6101  Vector<complex<double>, VectFull, Allocator3> work(2*m);
6102  Vector<double> rwork(m);
6103  zsprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
6104  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6105  &berr, work.GetData(), rwork.GetData(),
6106  &info.GetInfoRef() );
6107  }
6108 
6109 
6110  /*** ColHerm and Upper ***/
6111 
6112 
6113  template <class Prop0, class Allocator0,
6114  class Allocator1, class Allocator2,
6115  class Allocator3, class Allocator4>
6116  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
6117  ColHerm, Allocator0>& A,
6118  const Matrix<complex<float>, Prop0,
6119  ColHerm, Allocator1>& Alu,
6120  const Vector<int, VectFull, Allocator2>& P,
6121  Vector<complex<float>, VectFull, Allocator3>& x,
6122  const Vector<complex<float>, VectFull,
6123  Allocator4>& b,
6124  float& ferr, float& berr,
6125  LapackInfo& info)
6126  {
6127 
6128 #ifdef SELDON_CHECK_DIMENSIONS
6129  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6130  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6131 #endif
6132 
6133  int m = A.GetM();
6134  int nrhs = 1;
6135  char uplo('U');
6136  Vector<complex<float>, VectFull, Allocator3> work(2*m);
6137  Vector<float> rwork(m);
6138  cherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
6139  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6140  &berr, work.GetData(), rwork.GetData(),
6141  &info.GetInfoRef() );
6142  }
6143 
6144 
6145  template <class Prop0, class Allocator0,
6146  class Allocator1, class Allocator2,
6147  class Allocator3, class Allocator4>
6148  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
6149  ColHerm, Allocator0>& A,
6150  const Matrix<complex<double>, Prop0,
6151  ColHerm, Allocator1>& Alu,
6152  const Vector<int, VectFull, Allocator2>& P,
6153  Vector<complex<double>, VectFull, Allocator3>& x,
6154  const Vector<complex<double>, VectFull,
6155  Allocator4>& b,
6156  double& ferr, double& berr,
6157  LapackInfo& info)
6158  {
6159 
6160 #ifdef SELDON_CHECK_DIMENSIONS
6161  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6162  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6163 #endif
6164 
6165  int m = A.GetM();
6166  int nrhs = 1;
6167  char uplo('U');
6168  Vector<complex<double>, VectFull, Allocator3> work(2*m);
6169  Vector<double> rwork(m);
6170  zherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
6171  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6172  &berr, work.GetData(), rwork.GetData(),
6173  &info.GetInfoRef() );
6174  }
6175 
6176 
6177  /*** ColHermPacked and Upper ***/
6178 
6179 
6180  template <class Prop0, class Allocator0,
6181  class Allocator1, class Allocator2,
6182  class Allocator3, class Allocator4>
6183  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
6184  ColHermPacked, Allocator0>& A,
6185  const Matrix<complex<float>, Prop0,
6186  ColHermPacked, Allocator1>& Alu,
6187  const Vector<int, VectFull, Allocator2>& P,
6188  Vector<complex<float>, VectFull, Allocator3>& x,
6189  const Vector<complex<float>, VectFull,
6190  Allocator4>& b,
6191  float& ferr, float& berr,
6192  LapackInfo& info)
6193  {
6194 
6195 #ifdef SELDON_CHECK_DIMENSIONS
6196  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6197  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6198 #endif
6199 
6200  int m = A.GetM();
6201  int nrhs = 1;
6202  char uplo('U');
6203  Vector<complex<float>, VectFull, Allocator3> work(2*m);
6204  Vector<float> rwork(m);
6205  chprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
6206  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6207  &berr, work.GetData(), rwork.GetData(),
6208  &info.GetInfoRef() );
6209  }
6210 
6211 
6212  template <class Prop0, class Allocator0,
6213  class Allocator1, class Allocator2,
6214  class Allocator3, class Allocator4>
6215  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
6216  ColHermPacked, Allocator0>& A,
6217  const Matrix<complex<double>, Prop0,
6218  ColHermPacked, Allocator1>& Alu,
6219  const Vector<int, VectFull, Allocator2>& P,
6220  Vector<complex<double>, VectFull, Allocator3>& x,
6221  const Vector<complex<double>, VectFull,
6222  Allocator4>& b,
6223  double& ferr, double& berr,
6224  LapackInfo& info)
6225  {
6226 
6227 #ifdef SELDON_CHECK_DIMENSIONS
6228  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6229  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6230 #endif
6231 
6232  int m = A.GetM();
6233  int nrhs = 1;
6234  char uplo('U');
6235  Vector<complex<double>, VectFull, Allocator3> work(2*m);
6236  Vector<double> rwork(m);
6237  zhprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
6238  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6239  &berr, work.GetData(), rwork.GetData(),
6240  &info.GetInfoRef() );
6241  }
6242 
6243 
6244  /*** RowHerm and Upper ***/
6245 
6246 
6247  template <class Prop0, class Allocator0,
6248  class Allocator1, class Allocator2,
6249  class Allocator3, class Allocator4>
6250  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
6251  RowHerm, Allocator0>& A,
6252  const Matrix<complex<float>, Prop0,
6253  RowHerm, Allocator1>& Alu,
6254  const Vector<int, VectFull, Allocator2>& P,
6255  Vector<complex<float>, VectFull, Allocator3>& x,
6256  Vector<complex<float>, VectFull,
6257  Allocator4>& b,
6258  float& ferr, float& berr,
6259  LapackInfo& info)
6260  {
6261 
6262 #ifdef SELDON_CHECK_DIMENSIONS
6263  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6264  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6265 #endif
6266 
6267  int m = A.GetM();
6268  int nrhs = 1;
6269  char uplo('L');
6270  Vector<complex<float>, VectFull, Allocator3> work(2*m);
6271  Vector<float> rwork(m);
6272  Conjugate(b); Conjugate(x);
6273  cherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
6274  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6275  &berr, work.GetData(), rwork.GetData(),
6276  &info.GetInfoRef() );
6277  Conjugate(b); Conjugate(x);
6278  }
6279 
6280 
6281  template <class Prop0, class Allocator0,
6282  class Allocator1, class Allocator2,
6283  class Allocator3, class Allocator4>
6284  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
6285  RowHerm, Allocator0>& A,
6286  const Matrix<complex<double>, Prop0,
6287  RowHerm, Allocator1>& Alu,
6288  const Vector<int, VectFull, Allocator2>& P,
6289  Vector<complex<double>, VectFull, Allocator3>& x,
6290  Vector<complex<double>, VectFull,
6291  Allocator4>& b,
6292  double& ferr, double& berr,
6293  LapackInfo& info)
6294  {
6295 
6296 #ifdef SELDON_CHECK_DIMENSIONS
6297  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6298  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6299 #endif
6300 
6301  int m = A.GetM();
6302  int nrhs = 1;
6303  char uplo('L');
6304  Vector<complex<double>, VectFull, Allocator3> work(2*m);
6305  Vector<double> rwork(m);
6306  Conjugate(b); Conjugate(x);
6307  zherfs_(&uplo, &m, &nrhs, A.GetDataVoid(), &m, Alu.GetDataVoid(), &m,
6308  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6309  &berr, work.GetData(), rwork.GetData(),
6310  &info.GetInfoRef() );
6311  Conjugate(b); Conjugate(x);
6312  }
6313 
6314 
6315  /*** RowHermPacked and Upper ***/
6316 
6317 
6318  template <class Prop0, class Allocator0,
6319  class Allocator1, class Allocator2,
6320  class Allocator3, class Allocator4>
6321  void RefineSolutionLU(const Matrix<complex<float>, Prop0,
6322  RowHermPacked, Allocator0>& A,
6323  const Matrix<complex<float>, Prop0,
6324  RowHermPacked, Allocator1>& Alu,
6325  const Vector<int, VectFull, Allocator2>& P,
6326  Vector<complex<float>, VectFull, Allocator3>& x,
6327  Vector<complex<float>, VectFull,
6328  Allocator4>& b,
6329  float& ferr, float& berr,
6330  LapackInfo& info)
6331  {
6332 
6333 #ifdef SELDON_CHECK_DIMENSIONS
6334  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6335  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6336 #endif
6337 
6338  int m = A.GetM();
6339  int nrhs = 1;
6340  char uplo('L');
6341  Vector<complex<float>, VectFull, Allocator3> work(2*m);
6342  Vector<float> rwork(m);
6343  Conjugate(b); Conjugate(x);
6344  chprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
6345  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6346  &berr, work.GetData(), rwork.GetData(),
6347  &info.GetInfoRef() );
6348  Conjugate(b); Conjugate(x);
6349  }
6350 
6351 
6352  template <class Prop0, class Allocator0,
6353  class Allocator1, class Allocator2,
6354  class Allocator3, class Allocator4>
6355  void RefineSolutionLU(const Matrix<complex<double>, Prop0,
6356  RowHermPacked, Allocator0>& A,
6357  const Matrix<complex<double>, Prop0,
6358  RowHermPacked, Allocator1>& Alu,
6359  const Vector<int, VectFull, Allocator2>& P,
6360  Vector<complex<double>, VectFull, Allocator3>& x,
6361  Vector<complex<double>, VectFull,
6362  Allocator4>& b,
6363  double& ferr, double& berr,
6364  LapackInfo& info)
6365  {
6366 
6367 #ifdef SELDON_CHECK_DIMENSIONS
6368  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6369  CheckDim(Alu, x, b, "RefineSolutionLU(A, Alu, pivot, X, Y)");
6370 #endif
6371 
6372  int m = A.GetM();
6373  int nrhs = 1;
6374  char uplo('L');
6375  Vector<complex<double>, VectFull, Allocator3> work(2*m);
6376  Vector<double> rwork(m);
6377  Conjugate(b); Conjugate(x);
6378  zhprfs_(&uplo, &m, &nrhs, A.GetDataVoid(), Alu.GetDataVoid(),
6379  P.GetData(), b.GetDataVoid(), &m, x.GetDataVoid(), &m, &ferr,
6380  &berr, work.GetData(), rwork.GetData(),
6381  &info.GetInfoRef() );
6382  Conjugate(b); Conjugate(x);
6383  }
6384 
6385 
6386  /*** ColUpTriang, NoTrans and NonUnit ***/
6387 
6388 
6389  template <class Prop0, class Allocator0,
6390  class Allocator1, class Allocator2>
6391  void RefineSolutionLU(const Matrix<float, Prop0, ColUpTriang,
6392  Allocator0>& A,
6393  Vector<float, VectFull, Allocator1>& x,
6394  const Vector<float, VectFull, Allocator2>& b,
6395  float& ferr, float& berr,
6396  LapackInfo& info)
6397  {
6398 
6399 #ifdef SELDON_CHECK_DIMENSIONS
6400  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6401 #endif
6402 
6403  int m = A.GetM();
6404  int nrhs = 1;
6405  char uplo('U');
6406  char trans('N'); char diag('N');
6407  Vector<float, VectFull, Allocator1> work(3*m);
6408  Vector<int> iwork(m);
6409  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6410  b.GetData(), &m, x.GetData(), &m,
6411  &ferr, &berr, work.GetData(),
6412  iwork.GetData(), &info.GetInfoRef() );
6413  }
6414 
6415  template <class Prop0, class Allocator0,
6416  class Allocator1, class Allocator2>
6417  void RefineSolutionLU(const Matrix<double, Prop0, ColUpTriang,
6418  Allocator0>& A,
6419  Vector<double, VectFull, Allocator1>& x,
6420  const Vector<double, VectFull, Allocator2>& b,
6421  double& ferr, double& berr,
6422  LapackInfo& info)
6423  {
6424 
6425 #ifdef SELDON_CHECK_DIMENSIONS
6426  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6427 #endif
6428 
6429  int m = A.GetM();
6430  int nrhs = 1;
6431  char uplo('U');
6432  char trans('N'); char diag('N');
6433  Vector<double, VectFull, Allocator1> work(3*m);
6434  Vector<int> iwork(m);
6435  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6436  b.GetData(), &m, x.GetData(), &m,
6437  &ferr, &berr, work.GetData(),
6438  iwork.GetData(), &info.GetInfoRef() );
6439  }
6440 
6441 
6442  template <class Prop0, class Allocator0,
6443  class Allocator1, class Allocator2>
6444  void
6445  RefineSolutionLU(const Matrix<complex<float>, Prop0, ColUpTriang,
6446  Allocator0>& A,
6447  Vector<complex<float>, VectFull, Allocator1>& x,
6448  const Vector<complex<float>, VectFull, Allocator2>& b,
6449  float& ferr, float& berr,
6450  LapackInfo& info)
6451  {
6452 
6453 #ifdef SELDON_CHECK_DIMENSIONS
6454  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6455 #endif
6456 
6457  int m = A.GetM();
6458  int nrhs = 1;
6459  char uplo('U');
6460  char trans('N'); char diag('N');
6461  Vector<complex<float>, VectFull, Allocator1> work(2*m);
6462  Vector<float> rwork(m);
6463  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6464  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6465  &ferr, &berr, work.GetDataVoid(),
6466  rwork.GetData(), &info.GetInfoRef() );
6467  }
6468 
6469 
6470  template <class Prop0, class Allocator0,
6471  class Allocator1, class Allocator2>
6472  void
6473  RefineSolutionLU(const Matrix<complex<double>, Prop0, ColUpTriang,
6474  Allocator0>& A,
6475  Vector<complex<double>, VectFull, Allocator1>& x,
6476  const Vector<complex<double>, VectFull, Allocator2>& b,
6477  double& ferr, double& berr,
6478  LapackInfo& info)
6479  {
6480 
6481 #ifdef SELDON_CHECK_DIMENSIONS
6482  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6483 #endif
6484 
6485  int m = A.GetM();
6486  int nrhs = 1;
6487  char uplo('U');
6488  char trans('N'); char diag('N');
6489  Vector<complex<double>, VectFull, Allocator1> work(2*m);
6490  Vector<double> rwork(m);
6491  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6492  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6493  &ferr, &berr, work.GetDataVoid(),
6494  rwork.GetData(), &info.GetInfoRef() );
6495  }
6496 
6497 
6498  /*** ColUpTriang ***/
6499 
6500 
6501  template <class Prop0, class Allocator0,
6502  class Allocator1, class Allocator2>
6503  void
6504  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6505  const Matrix<float, Prop0, ColUpTriang,
6506  Allocator0>& A,
6507  Vector<float, VectFull, Allocator1>& x,
6508  const Vector<float, VectFull, Allocator2>& b,
6509  float& ferr, float& berr,
6510  LapackInfo& info)
6511  {
6512 
6513 #ifdef SELDON_CHECK_DIMENSIONS
6514  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6515 #endif
6516 
6517  int m = A.GetM();
6518  int nrhs = 1;
6519  char uplo('U');
6520  char trans = TransA.Char(); char diag = DiagA.Char();
6521  Vector<float, VectFull, Allocator1> work(3*m);
6522  Vector<int> iwork(m);
6523  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6524  b.GetData(), &m, x.GetData(), &m,
6525  &ferr, &berr, work.GetData(),
6526  iwork.GetData(), &info.GetInfoRef() );
6527  }
6528 
6529  template <class Prop0, class Allocator0,
6530  class Allocator1, class Allocator2>
6531  void
6532  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6533  const Matrix<double, Prop0, ColUpTriang,
6534  Allocator0>& A,
6535  Vector<double, VectFull, Allocator1>& x,
6536  const Vector<double, VectFull, Allocator2>& b,
6537  double& ferr, double& berr,
6538  LapackInfo& info)
6539  {
6540 
6541 #ifdef SELDON_CHECK_DIMENSIONS
6542  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6543 #endif
6544 
6545  int m = A.GetM();
6546  int nrhs = 1;
6547  char uplo('U');
6548  char trans = TransA.Char(); char diag = DiagA.Char();
6549  Vector<double, VectFull, Allocator1> work(3*m);
6550  Vector<int> iwork(m);
6551  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6552  b.GetData(), &m, x.GetData(), &m,
6553  &ferr, &berr, work.GetData(),
6554  iwork.GetData(), &info.GetInfoRef() );
6555  }
6556 
6557 
6558  template <class Prop0, class Allocator0,
6559  class Allocator1, class Allocator2>
6560  void
6561  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6562  const Matrix<complex<float>, Prop0, ColUpTriang,
6563  Allocator0>& A,
6564  Vector<complex<float>, VectFull, Allocator1>& x,
6565  const Vector<complex<float>, VectFull, Allocator2>& b,
6566  float& ferr, float& berr,
6567  LapackInfo& info)
6568  {
6569 
6570 #ifdef SELDON_CHECK_DIMENSIONS
6571  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6572 #endif
6573 
6574  int m = A.GetM();
6575  int nrhs = 1;
6576  char uplo('U');
6577  char trans = TransA.Char(); char diag = DiagA.Char();
6578  Vector<complex<float>, VectFull, Allocator1> work(2*m);
6579  Vector<float> rwork(m);
6580  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6581  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6582  &ferr, &berr, work.GetDataVoid(),
6583  rwork.GetData(), &info.GetInfoRef() );
6584  }
6585 
6586 
6587  template <class Prop0, class Allocator0,
6588  class Allocator1, class Allocator2>
6589  void
6590  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6591  const Matrix<complex<double>, Prop0, ColUpTriang,
6592  Allocator0>& A,
6593  Vector<complex<double>, VectFull, Allocator1>& x,
6594  const Vector<complex<double>, VectFull, Allocator2>& b,
6595  double& ferr, double& berr,
6596  LapackInfo& info)
6597  {
6598 
6599 #ifdef SELDON_CHECK_DIMENSIONS
6600  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6601 #endif
6602 
6603  int m = A.GetM();
6604  int nrhs = 1;
6605  char uplo('U');
6606  char trans = TransA.Char(); char diag = DiagA.Char();
6607  Vector<complex<double>, VectFull, Allocator1> work(2*m);
6608  Vector<double> rwork(m);
6609  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6610  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6611  &ferr, &berr, work.GetDataVoid(),
6612  rwork.GetData(), &info.GetInfoRef() );
6613  }
6614 
6615 
6616  /*** ColLoTriang, NoTrans and NonUnit ***/
6617 
6618 
6619  template <class Prop0, class Allocator0,
6620  class Allocator1, class Allocator2>
6621  void RefineSolutionLU(const Matrix<float, Prop0, ColLoTriang,
6622  Allocator0>& A,
6623  Vector<float, VectFull, Allocator1>& x,
6624  const Vector<float, VectFull, Allocator2>& b,
6625  float& ferr, float& berr,
6626  LapackInfo& info)
6627  {
6628 
6629 #ifdef SELDON_CHECK_DIMENSIONS
6630  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6631 #endif
6632 
6633  int m = A.GetM();
6634  int nrhs = 1;
6635  char uplo('L');
6636  char trans('N'); char diag('N');
6637  Vector<float, VectFull, Allocator1> work(3*m);
6638  Vector<int> iwork(m);
6639  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6640  b.GetData(), &m, x.GetData(), &m,
6641  &ferr, &berr, work.GetData(),
6642  iwork.GetData(), &info.GetInfoRef() );
6643  }
6644 
6645  template <class Prop0, class Allocator0,
6646  class Allocator1, class Allocator2>
6647  void RefineSolutionLU(const Matrix<double, Prop0, ColLoTriang,
6648  Allocator0>& A,
6649  Vector<double, VectFull, Allocator1>& x,
6650  const Vector<double, VectFull, Allocator2>& b,
6651  double& ferr, double& berr,
6652  LapackInfo& info)
6653  {
6654 
6655 #ifdef SELDON_CHECK_DIMENSIONS
6656  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6657 #endif
6658 
6659  int m = A.GetM();
6660  int nrhs = 1;
6661  char uplo('L');
6662  char trans('N'); char diag('N');
6663  Vector<double, VectFull, Allocator1> work(3*m);
6664  Vector<int> iwork(m);
6665  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6666  b.GetData(), &m, x.GetData(), &m,
6667  &ferr, &berr, work.GetData(),
6668  iwork.GetData(), &info.GetInfoRef() );
6669  }
6670 
6671 
6672  template <class Prop0, class Allocator0,
6673  class Allocator1, class Allocator2>
6674  void
6675  RefineSolutionLU(const Matrix<complex<float>, Prop0, ColLoTriang,
6676  Allocator0>& A,
6677  Vector<complex<float>, VectFull, Allocator1>& x,
6678  const Vector<complex<float>, VectFull, Allocator2>& b,
6679  float& ferr, float& berr,
6680  LapackInfo& info)
6681  {
6682 
6683 #ifdef SELDON_CHECK_DIMENSIONS
6684  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6685 #endif
6686 
6687  int m = A.GetM();
6688  int nrhs = 1;
6689  char uplo('L');
6690  char trans('N'); char diag('N');
6691  Vector<complex<float>, VectFull, Allocator1> work(2*m);
6692  Vector<float> rwork(m);
6693  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6694  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6695  &ferr, &berr, work.GetDataVoid(),
6696  rwork.GetData(), &info.GetInfoRef() );
6697  }
6698 
6699 
6700  template <class Prop0, class Allocator0,
6701  class Allocator1, class Allocator2>
6702  void
6703  RefineSolutionLU(const Matrix<complex<double>, Prop0, ColLoTriang,
6704  Allocator0>& A,
6705  Vector<complex<double>, VectFull, Allocator1>& x,
6706  const Vector<complex<double>, VectFull, Allocator2>& b,
6707  double& ferr, double& berr,
6708  LapackInfo& info)
6709  {
6710 
6711 #ifdef SELDON_CHECK_DIMENSIONS
6712  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6713 #endif
6714 
6715  int m = A.GetM();
6716  int nrhs = 1;
6717  char uplo('L');
6718  char trans('N'); char diag('N');
6719  Vector<complex<double>, VectFull, Allocator1> work(2*m);
6720  Vector<double> rwork(m);
6721  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6722  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6723  &ferr, &berr, work.GetDataVoid(),
6724  rwork.GetData(), &info.GetInfoRef() );
6725  }
6726 
6727 
6728  /*** ColLoTriang ***/
6729 
6730 
6731  template <class Prop0, class Allocator0,
6732  class Allocator1, class Allocator2>
6733  void
6734  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6735  const Matrix<float, Prop0, ColLoTriang,
6736  Allocator0>& A,
6737  Vector<float, VectFull, Allocator1>& x,
6738  const Vector<float, VectFull, Allocator2>& b,
6739  float& ferr, float& berr,
6740  LapackInfo& info)
6741  {
6742 
6743 #ifdef SELDON_CHECK_DIMENSIONS
6744  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6745 #endif
6746 
6747  int m = A.GetM();
6748  int nrhs = 1;
6749  char uplo('L');
6750  char trans = TransA.Char(); char diag = DiagA.Char();
6751  Vector<float, VectFull, Allocator1> work(3*m);
6752  Vector<int> iwork(m);
6753  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6754  b.GetData(), &m, x.GetData(), &m,
6755  &ferr, &berr, work.GetData(),
6756  iwork.GetData(), &info.GetInfoRef() );
6757  }
6758 
6759  template <class Prop0, class Allocator0,
6760  class Allocator1, class Allocator2>
6761  void
6762  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6763  const Matrix<double, Prop0, ColLoTriang,
6764  Allocator0>& A,
6765  Vector<double, VectFull, Allocator1>& x,
6766  const Vector<double, VectFull, Allocator2>& b,
6767  double& ferr, double& berr,
6768  LapackInfo& info)
6769  {
6770 
6771 #ifdef SELDON_CHECK_DIMENSIONS
6772  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6773 #endif
6774 
6775  int m = A.GetM();
6776  int nrhs = 1;
6777  char uplo('L');
6778  char trans = TransA.Char(); char diag = DiagA.Char();
6779  Vector<double, VectFull, Allocator1> work(3*m);
6780  Vector<int> iwork(m);
6781  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
6782  b.GetData(), &m, x.GetData(), &m,
6783  &ferr, &berr, work.GetData(),
6784  iwork.GetData(), &info.GetInfoRef() );
6785  }
6786 
6787 
6788  template <class Prop0, class Allocator0,
6789  class Allocator1, class Allocator2>
6790  void
6791  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6792  const Matrix<complex<float>, Prop0, ColLoTriang,
6793  Allocator0>& A,
6794  Vector<complex<float>, VectFull, Allocator1>& x,
6795  const Vector<complex<float>, VectFull, Allocator2>& b,
6796  float& ferr, float& berr,
6797  LapackInfo& info)
6798  {
6799 
6800 #ifdef SELDON_CHECK_DIMENSIONS
6801  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6802 #endif
6803 
6804  int m = A.GetM();
6805  int nrhs = 1;
6806  char uplo('L');
6807  char trans = TransA.Char(); char diag = DiagA.Char();
6808  Vector<complex<float>, VectFull, Allocator1> work(2*m);
6809  Vector<float> rwork(m);
6810  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6811  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6812  &ferr, &berr, work.GetDataVoid(),
6813  rwork.GetData(), &info.GetInfoRef() );
6814  }
6815 
6816 
6817  template <class Prop0, class Allocator0,
6818  class Allocator1, class Allocator2>
6819  void
6820  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6821  const Matrix<complex<double>, Prop0, ColLoTriang,
6822  Allocator0>& A,
6823  Vector<complex<double>, VectFull, Allocator1>& x,
6824  const Vector<complex<double>, VectFull, Allocator2>& b,
6825  double& ferr, double& berr,
6826  LapackInfo& info)
6827  {
6828 
6829 #ifdef SELDON_CHECK_DIMENSIONS
6830  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6831 #endif
6832 
6833  int m = A.GetM();
6834  int nrhs = 1;
6835  char uplo('L');
6836  char trans = TransA.Char(); char diag = DiagA.Char();
6837  Vector<complex<double>, VectFull, Allocator1> work(2*m);
6838  Vector<double> rwork(m);
6839  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
6840  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6841  &ferr, &berr, work.GetDataVoid(),
6842  rwork.GetData(), &info.GetInfoRef() );
6843  }
6844 
6845 
6846  /*** ColUpTriangPacked, NoTrans and NonUnit ***/
6847 
6848 
6849  template <class Prop0, class Allocator0,
6850  class Allocator1, class Allocator2>
6851  void RefineSolutionLU(const Matrix<float, Prop0, ColUpTriangPacked,
6852  Allocator0>& A,
6853  Vector<float, VectFull, Allocator1>& x,
6854  const Vector<float, VectFull, Allocator2>& b,
6855  float& ferr, float& berr,
6856  LapackInfo& info)
6857  {
6858 
6859 #ifdef SELDON_CHECK_DIMENSIONS
6860  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6861 #endif
6862 
6863  int m = A.GetM();
6864  int nrhs = 1;
6865  char uplo('U');
6866  char trans('N'); char diag('N');
6867  Vector<float, VectFull, Allocator1> work(3*m);
6868  Vector<int> iwork(m);
6869  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
6870  b.GetData(), &m, x.GetData(), &m,
6871  &ferr, &berr, work.GetData(),
6872  iwork.GetData(), &info.GetInfoRef() );
6873  }
6874 
6875  template <class Prop0, class Allocator0,
6876  class Allocator1, class Allocator2>
6877  void RefineSolutionLU(const Matrix<double, Prop0, ColUpTriangPacked,
6878  Allocator0>& A,
6879  Vector<double, VectFull, Allocator1>& x,
6880  const Vector<double, VectFull, Allocator2>& b,
6881  double& ferr, double& berr,
6882  LapackInfo& info)
6883  {
6884 
6885 #ifdef SELDON_CHECK_DIMENSIONS
6886  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6887 #endif
6888 
6889  int m = A.GetM();
6890  int nrhs = 1;
6891  char uplo('U');
6892  char trans('N'); char diag('N');
6893  Vector<double, VectFull, Allocator1> work(3*m);
6894  Vector<int> iwork(m);
6895  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
6896  b.GetData(), &m, x.GetData(), &m,
6897  &ferr, &berr, work.GetData(),
6898  iwork.GetData(), &info.GetInfoRef() );
6899  }
6900 
6901 
6902  template <class Prop0, class Allocator0,
6903  class Allocator1, class Allocator2>
6904  void
6905  RefineSolutionLU(const Matrix<complex<float>, Prop0, ColUpTriangPacked,
6906  Allocator0>& A,
6907  Vector<complex<float>, VectFull, Allocator1>& x,
6908  const Vector<complex<float>, VectFull, Allocator2>& b,
6909  float& ferr, float& berr,
6910  LapackInfo& info)
6911  {
6912 
6913 #ifdef SELDON_CHECK_DIMENSIONS
6914  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6915 #endif
6916 
6917  int m = A.GetM();
6918  int nrhs = 1;
6919  char uplo('U');
6920  char trans('N'); char diag('N');
6921  Vector<complex<float>, VectFull, Allocator1> work(2*m);
6922  Vector<float> rwork(m);
6923  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
6924  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6925  &ferr, &berr, work.GetDataVoid(),
6926  rwork.GetData(), &info.GetInfoRef() );
6927  }
6928 
6929 
6930  template <class Prop0, class Allocator0,
6931  class Allocator1, class Allocator2>
6932  void
6933  RefineSolutionLU(const Matrix<complex<double>, Prop0, ColUpTriangPacked,
6934  Allocator0>& A,
6935  Vector<complex<double>, VectFull, Allocator1>& x,
6936  const Vector<complex<double>, VectFull, Allocator2>& b,
6937  double& ferr, double& berr,
6938  LapackInfo& info)
6939  {
6940 
6941 #ifdef SELDON_CHECK_DIMENSIONS
6942  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6943 #endif
6944 
6945  int m = A.GetM();
6946  int nrhs = 1;
6947  char uplo('U');
6948  char trans('N'); char diag('N');
6949  Vector<complex<double>, VectFull, Allocator1> work(2*m);
6950  Vector<double> rwork(m);
6951  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
6952  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
6953  &ferr, &berr, work.GetDataVoid(),
6954  rwork.GetData(), &info.GetInfoRef() );
6955  }
6956 
6957 
6958  /*** ColUpTriangPacked ***/
6959 
6960 
6961  template <class Prop0, class Allocator0,
6962  class Allocator1, class Allocator2>
6963  void
6964  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6965  const Matrix<float, Prop0, ColUpTriangPacked,
6966  Allocator0>& A,
6967  Vector<float, VectFull, Allocator1>& x,
6968  const Vector<float, VectFull, Allocator2>& b,
6969  float& ferr, float& berr,
6970  LapackInfo& info)
6971  {
6972 
6973 #ifdef SELDON_CHECK_DIMENSIONS
6974  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
6975 #endif
6976 
6977  int m = A.GetM();
6978  int nrhs = 1;
6979  char uplo('U');
6980  char trans = TransA.Char(); char diag = DiagA.Char();
6981  Vector<float, VectFull, Allocator1> work(3*m);
6982  Vector<int> iwork(m);
6983  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
6984  b.GetData(), &m, x.GetData(), &m,
6985  &ferr, &berr, work.GetData(),
6986  iwork.GetData(), &info.GetInfoRef() );
6987  }
6988 
6989  template <class Prop0, class Allocator0,
6990  class Allocator1, class Allocator2>
6991  void
6992  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
6993  const Matrix<double, Prop0, ColUpTriangPacked,
6994  Allocator0>& A,
6995  Vector<double, VectFull, Allocator1>& x,
6996  const Vector<double, VectFull, Allocator2>& b,
6997  double& ferr, double& berr,
6998  LapackInfo& info)
6999  {
7000 
7001 #ifdef SELDON_CHECK_DIMENSIONS
7002  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7003 #endif
7004 
7005  int m = A.GetM();
7006  int nrhs = 1;
7007  char uplo('U');
7008  char trans = TransA.Char(); char diag = DiagA.Char();
7009  Vector<double, VectFull, Allocator1> work(3*m);
7010  Vector<int> iwork(m);
7011  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7012  b.GetData(), &m, x.GetData(), &m,
7013  &ferr, &berr, work.GetData(),
7014  iwork.GetData(), &info.GetInfoRef() );
7015  }
7016 
7017 
7018  template <class Prop0, class Allocator0,
7019  class Allocator1, class Allocator2>
7020  void
7021  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7022  const Matrix<complex<float>, Prop0, ColUpTriangPacked,
7023  Allocator0>& A,
7024  Vector<complex<float>, VectFull, Allocator1>& x,
7025  const Vector<complex<float>, VectFull, Allocator2>& b,
7026  float& ferr, float& berr,
7027  LapackInfo& info)
7028  {
7029 
7030 #ifdef SELDON_CHECK_DIMENSIONS
7031  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7032 #endif
7033 
7034  int m = A.GetM();
7035  int nrhs = 1;
7036  char uplo('U');
7037  char trans = TransA.Char(); char diag = DiagA.Char();
7038  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7039  Vector<float> rwork(m);
7040  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7041  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7042  &ferr, &berr, work.GetDataVoid(),
7043  rwork.GetData(), &info.GetInfoRef() );
7044  }
7045 
7046 
7047  template <class Prop0, class Allocator0,
7048  class Allocator1, class Allocator2>
7049  void
7050  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7051  const Matrix<complex<double>, Prop0, ColUpTriangPacked,
7052  Allocator0>& A,
7053  Vector<complex<double>, VectFull, Allocator1>& x,
7054  const Vector<complex<double>, VectFull, Allocator2>& b,
7055  double& ferr, double& berr,
7056  LapackInfo& info)
7057  {
7058 
7059 #ifdef SELDON_CHECK_DIMENSIONS
7060  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7061 #endif
7062 
7063  int m = A.GetM();
7064  int nrhs = 1;
7065  char uplo('U');
7066  char trans = TransA.Char(); char diag = DiagA.Char();
7067  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7068  Vector<double> rwork(m);
7069  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7070  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7071  &ferr, &berr, work.GetDataVoid(),
7072  rwork.GetData(), &info.GetInfoRef() );
7073  }
7074 
7075 
7076  /*** ColLoTriangPacked, NoTrans and NonUnit ***/
7077 
7078 
7079  template <class Prop0, class Allocator0,
7080  class Allocator1, class Allocator2>
7081  void RefineSolutionLU(const Matrix<float, Prop0, ColLoTriangPacked,
7082  Allocator0>& A,
7083  Vector<float, VectFull, Allocator1>& x,
7084  const Vector<float, VectFull, Allocator2>& b,
7085  float& ferr, float& berr,
7086  LapackInfo& info)
7087  {
7088 
7089 #ifdef SELDON_CHECK_DIMENSIONS
7090  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7091 #endif
7092 
7093  int m = A.GetM();
7094  int nrhs = 1;
7095  char uplo('L');
7096  char trans('N'); char diag('N');
7097  Vector<float, VectFull, Allocator1> work(3*m);
7098  Vector<int> iwork(m);
7099  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7100  b.GetData(), &m, x.GetData(), &m,
7101  &ferr, &berr, work.GetData(),
7102  iwork.GetData(), &info.GetInfoRef() );
7103  }
7104 
7105  template <class Prop0, class Allocator0,
7106  class Allocator1, class Allocator2>
7107  void RefineSolutionLU(const Matrix<double, Prop0, ColLoTriangPacked,
7108  Allocator0>& A,
7109  Vector<double, VectFull, Allocator1>& x,
7110  const Vector<double, VectFull, Allocator2>& b,
7111  double& ferr, double& berr,
7112  LapackInfo& info)
7113  {
7114 
7115 #ifdef SELDON_CHECK_DIMENSIONS
7116  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7117 #endif
7118 
7119  int m = A.GetM();
7120  int nrhs = 1;
7121  char uplo('L');
7122  char trans('N'); char diag('N');
7123  Vector<double, VectFull, Allocator1> work(3*m);
7124  Vector<int> iwork(m);
7125  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7126  b.GetData(), &m, x.GetData(), &m,
7127  &ferr, &berr, work.GetData(),
7128  iwork.GetData(), &info.GetInfoRef() );
7129  }
7130 
7131 
7132  template <class Prop0, class Allocator0,
7133  class Allocator1, class Allocator2>
7134  void
7135  RefineSolutionLU(const Matrix<complex<float>, Prop0, ColLoTriangPacked,
7136  Allocator0>& A,
7137  Vector<complex<float>, VectFull, Allocator1>& x,
7138  const Vector<complex<float>, VectFull, Allocator2>& b,
7139  float& ferr, float& berr,
7140  LapackInfo& info)
7141  {
7142 
7143 #ifdef SELDON_CHECK_DIMENSIONS
7144  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7145 #endif
7146 
7147  int m = A.GetM();
7148  int nrhs = 1;
7149  char uplo('L');
7150  char trans('N'); char diag('N');
7151  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7152  Vector<float> rwork(m);
7153  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7154  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7155  &ferr, &berr, work.GetDataVoid(),
7156  rwork.GetData(), &info.GetInfoRef() );
7157  }
7158 
7159 
7160  template <class Prop0, class Allocator0,
7161  class Allocator1, class Allocator2>
7162  void
7163  RefineSolutionLU(const Matrix<complex<double>, Prop0, ColLoTriangPacked,
7164  Allocator0>& A,
7165  Vector<complex<double>, VectFull, Allocator1>& x,
7166  const Vector<complex<double>, VectFull, Allocator2>& b,
7167  double& ferr, double& berr,
7168  LapackInfo& info)
7169  {
7170 
7171 #ifdef SELDON_CHECK_DIMENSIONS
7172  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7173 #endif
7174 
7175  int m = A.GetM();
7176  int nrhs = 1;
7177  char uplo('L');
7178  char trans('N'); char diag('N');
7179  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7180  Vector<double> rwork(m);
7181  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7182  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7183  &ferr, &berr, work.GetDataVoid(),
7184  rwork.GetData(), &info.GetInfoRef() );
7185  }
7186 
7187 
7188  /*** ColLoTriangPacked ***/
7189 
7190 
7191  template <class Prop0, class Allocator0,
7192  class Allocator1, class Allocator2>
7193  void
7194  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7195  const Matrix<float, Prop0, ColLoTriangPacked,
7196  Allocator0>& A,
7197  Vector<float, VectFull, Allocator1>& x,
7198  const Vector<float, VectFull, Allocator2>& b,
7199  float& ferr, float& berr,
7200  LapackInfo& info)
7201  {
7202 
7203 #ifdef SELDON_CHECK_DIMENSIONS
7204  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7205 #endif
7206 
7207  int m = A.GetM();
7208  int nrhs = 1;
7209  char uplo('L');
7210  char trans = TransA.Char(); char diag = DiagA.Char();
7211  Vector<float, VectFull, Allocator1> work(3*m);
7212  Vector<int> iwork(m);
7213  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7214  b.GetData(), &m, x.GetData(), &m,
7215  &ferr, &berr, work.GetData(),
7216  iwork.GetData(), &info.GetInfoRef() );
7217  }
7218 
7219  template <class Prop0, class Allocator0,
7220  class Allocator1, class Allocator2>
7221  void
7222  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7223  const Matrix<double, Prop0, ColLoTriangPacked,
7224  Allocator0>& A,
7225  Vector<double, VectFull, Allocator1>& x,
7226  const Vector<double, VectFull, Allocator2>& b,
7227  double& ferr, double& berr,
7228  LapackInfo& info)
7229  {
7230 
7231 #ifdef SELDON_CHECK_DIMENSIONS
7232  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7233 #endif
7234 
7235  int m = A.GetM();
7236  int nrhs = 1;
7237  char uplo('L');
7238  char trans = TransA.Char(); char diag = DiagA.Char();
7239  Vector<double, VectFull, Allocator1> work(3*m);
7240  Vector<int> iwork(m);
7241  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7242  b.GetData(), &m, x.GetData(), &m,
7243  &ferr, &berr, work.GetData(),
7244  iwork.GetData(), &info.GetInfoRef() );
7245  }
7246 
7247 
7248  template <class Prop0, class Allocator0,
7249  class Allocator1, class Allocator2>
7250  void
7251  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7252  const Matrix<complex<float>, Prop0, ColLoTriangPacked,
7253  Allocator0>& A,
7254  Vector<complex<float>, VectFull, Allocator1>& x,
7255  const Vector<complex<float>, VectFull, Allocator2>& b,
7256  float& ferr, float& berr,
7257  LapackInfo& info)
7258  {
7259 
7260 #ifdef SELDON_CHECK_DIMENSIONS
7261  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7262 #endif
7263 
7264  int m = A.GetM();
7265  int nrhs = 1;
7266  char uplo('L');
7267  char trans = TransA.Char(); char diag = DiagA.Char();
7268  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7269  Vector<float> rwork(m);
7270  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7271  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7272  &ferr, &berr, work.GetDataVoid(),
7273  rwork.GetData(), &info.GetInfoRef() );
7274  }
7275 
7276 
7277  template <class Prop0, class Allocator0,
7278  class Allocator1, class Allocator2>
7279  void
7280  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7281  const Matrix<complex<double>, Prop0, ColLoTriangPacked,
7282  Allocator0>& A,
7283  Vector<complex<double>, VectFull, Allocator1>& x,
7284  const Vector<complex<double>, VectFull, Allocator2>& b,
7285  double& ferr, double& berr,
7286  LapackInfo& info)
7287  {
7288 
7289 #ifdef SELDON_CHECK_DIMENSIONS
7290  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7291 #endif
7292 
7293  int m = A.GetM();
7294  int nrhs = 1;
7295  char uplo('L');
7296  char trans = TransA.Char(); char diag = DiagA.Char();
7297  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7298  Vector<double> rwork(m);
7299  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7300  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7301  &ferr, &berr, work.GetDataVoid(),
7302  rwork.GetData(), &info.GetInfoRef() );
7303  }
7304 
7305 
7306  /*** RowUpTriang, NoTrans and NonUnit ***/
7307 
7308 
7309  template <class Prop0, class Allocator0,
7310  class Allocator1, class Allocator2>
7311  void RefineSolutionLU(const Matrix<float, Prop0, RowUpTriang,
7312  Allocator0>& A,
7313  Vector<float, VectFull, Allocator1>& x,
7314  const Vector<float, VectFull, Allocator2>& b,
7315  float& ferr, float& berr,
7316  LapackInfo& info)
7317  {
7318 
7319 #ifdef SELDON_CHECK_DIMENSIONS
7320  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7321 #endif
7322 
7323  int m = A.GetM();
7324  int nrhs = 1;
7325  char uplo('L');
7326  char trans('T'); char diag('N');
7327  Vector<float, VectFull, Allocator1> work(3*m);
7328  Vector<int> iwork(m);
7329  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7330  b.GetData(), &m, x.GetData(), &m,
7331  &ferr, &berr, work.GetData(),
7332  iwork.GetData(), &info.GetInfoRef() );
7333  }
7334 
7335  template <class Prop0, class Allocator0,
7336  class Allocator1, class Allocator2>
7337  void RefineSolutionLU(const Matrix<double, Prop0, RowUpTriang,
7338  Allocator0>& A,
7339  Vector<double, VectFull, Allocator1>& x,
7340  const Vector<double, VectFull, Allocator2>& b,
7341  double& ferr, double& berr,
7342  LapackInfo& info)
7343  {
7344 
7345 #ifdef SELDON_CHECK_DIMENSIONS
7346  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7347 #endif
7348 
7349  int m = A.GetM();
7350  int nrhs = 1;
7351  char uplo('L');
7352  char trans('T'); char diag('N');
7353  Vector<double, VectFull, Allocator1> work(3*m);
7354  Vector<int> iwork(m);
7355  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7356  b.GetData(), &m, x.GetData(), &m,
7357  &ferr, &berr, work.GetData(),
7358  iwork.GetData(), &info.GetInfoRef() );
7359  }
7360 
7361 
7362  template <class Prop0, class Allocator0,
7363  class Allocator1, class Allocator2>
7364  void
7365  RefineSolutionLU(const Matrix<complex<float>, Prop0, RowUpTriang,
7366  Allocator0>& A,
7367  Vector<complex<float>, VectFull, Allocator1>& x,
7368  const Vector<complex<float>, VectFull, Allocator2>& b,
7369  float& ferr, float& berr,
7370  LapackInfo& info)
7371  {
7372 
7373 #ifdef SELDON_CHECK_DIMENSIONS
7374  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7375 #endif
7376 
7377  int m = A.GetM();
7378  int nrhs = 1;
7379  char uplo('L');
7380  char trans('T'); char diag('N');
7381  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7382  Vector<float> rwork(m);
7383  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7384  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7385  &ferr, &berr, work.GetDataVoid(),
7386  rwork.GetData(), &info.GetInfoRef() );
7387  }
7388 
7389 
7390  template <class Prop0, class Allocator0,
7391  class Allocator1, class Allocator2>
7392  void
7393  RefineSolutionLU(const Matrix<complex<double>, Prop0, RowUpTriang,
7394  Allocator0>& A,
7395  Vector<complex<double>, VectFull, Allocator1>& x,
7396  const Vector<complex<double>, VectFull, Allocator2>& b,
7397  double& ferr, double& berr,
7398  LapackInfo& info)
7399  {
7400 
7401 #ifdef SELDON_CHECK_DIMENSIONS
7402  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7403 #endif
7404 
7405  int m = A.GetM();
7406  int nrhs = 1;
7407  char uplo('L');
7408  char trans('T'); char diag('N');
7409  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7410  Vector<double> rwork(m);
7411  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7412  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7413  &ferr, &berr, work.GetDataVoid(),
7414  rwork.GetData(), &info.GetInfoRef() );
7415  }
7416 
7417 
7418  /*** RowUpTriang ***/
7419 
7420 
7421  template <class Prop0, class Allocator0,
7422  class Allocator1, class Allocator2>
7423  void
7424  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7425  const Matrix<float, Prop0, RowUpTriang,
7426  Allocator0>& A,
7427  Vector<float, VectFull, Allocator1>& x,
7428  const Vector<float, VectFull, Allocator2>& b,
7429  float& ferr, float& berr,
7430  LapackInfo& info)
7431  {
7432 
7433 #ifdef SELDON_CHECK_DIMENSIONS
7434  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7435 #endif
7436 
7437  int m = A.GetM();
7438  int nrhs = 1;
7439  char uplo('L');
7440  char trans = TransA.RevChar(); char diag = DiagA.Char();
7441  Vector<float, VectFull, Allocator1> work(3*m);
7442  Vector<int> iwork(m);
7443  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7444  b.GetData(), &m, x.GetData(), &m,
7445  &ferr, &berr, work.GetData(),
7446  iwork.GetData(), &info.GetInfoRef() );
7447  }
7448 
7449  template <class Prop0, class Allocator0,
7450  class Allocator1, class Allocator2>
7451  void
7452  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7453  const Matrix<double, Prop0, RowUpTriang,
7454  Allocator0>& A,
7455  Vector<double, VectFull, Allocator1>& x,
7456  const Vector<double, VectFull, Allocator2>& b,
7457  double& ferr, double& berr,
7458  LapackInfo& info)
7459  {
7460 
7461 #ifdef SELDON_CHECK_DIMENSIONS
7462  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7463 #endif
7464 
7465  int m = A.GetM();
7466  int nrhs = 1;
7467  char uplo('L');
7468  char trans = TransA.RevChar(); char diag = DiagA.Char();
7469  Vector<double, VectFull, Allocator1> work(3*m);
7470  Vector<int> iwork(m);
7471  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7472  b.GetData(), &m, x.GetData(), &m,
7473  &ferr, &berr, work.GetData(),
7474  iwork.GetData(), &info.GetInfoRef() );
7475  }
7476 
7477 
7478  template <class Prop0, class Allocator0,
7479  class Allocator1, class Allocator2>
7480  void
7481  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7482  const Matrix<complex<float>, Prop0, RowUpTriang,
7483  Allocator0>& A,
7484  Vector<complex<float>, VectFull, Allocator1>& x,
7485  Vector<complex<float>, VectFull, Allocator2>& b,
7486  float& ferr, float& berr,
7487  LapackInfo& info)
7488  {
7489 
7490 #ifdef SELDON_CHECK_DIMENSIONS
7491  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7492 #endif
7493 
7494  int m = A.GetM();
7495  int nrhs = 1;
7496  char uplo('L');
7497  char trans = TransA.RevChar(); char diag = DiagA.Char();
7498  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7499  Vector<float> rwork(m);
7500  if (TransA.ConjTrans())
7501  {
7502  Conjugate(b);
7503  Conjugate(x);
7504  }
7505  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7506  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7507  &ferr, &berr, work.GetDataVoid(),
7508  rwork.GetData(), &info.GetInfoRef() );
7509  if (TransA.ConjTrans())
7510  {
7511  Conjugate(b);
7512  Conjugate(x);
7513  }
7514  }
7515 
7516 
7517  template <class Prop0, class Allocator0,
7518  class Allocator1, class Allocator2>
7519  void
7520  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7521  const Matrix<complex<double>, Prop0, RowUpTriang,
7522  Allocator0>& A,
7523  Vector<complex<double>, VectFull, Allocator1>& x,
7524  Vector<complex<double>, VectFull, Allocator2>& b,
7525  double& ferr, double& berr,
7526  LapackInfo& info)
7527  {
7528 
7529 #ifdef SELDON_CHECK_DIMENSIONS
7530  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7531 #endif
7532 
7533  int m = A.GetM();
7534  int nrhs = 1;
7535  char uplo('L');
7536  char trans = TransA.RevChar(); char diag = DiagA.Char();
7537  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7538  Vector<double> rwork(m);
7539  if (TransA.ConjTrans())
7540  {
7541  Conjugate(b);
7542  Conjugate(x);
7543  }
7544  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7545  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7546  &ferr, &berr, work.GetDataVoid(),
7547  rwork.GetData(), &info.GetInfoRef() );
7548  if (TransA.ConjTrans())
7549  {
7550  Conjugate(b);
7551  Conjugate(x);
7552  }
7553  }
7554 
7555 
7556  /*** RowLoTriang, NoTrans and NonUnit ***/
7557 
7558 
7559  template <class Prop0, class Allocator0,
7560  class Allocator1, class Allocator2>
7561  void RefineSolutionLU(const Matrix<float, Prop0, RowLoTriang,
7562  Allocator0>& A,
7563  Vector<float, VectFull, Allocator1>& x,
7564  const Vector<float, VectFull, Allocator2>& b,
7565  float& ferr, float& berr,
7566  LapackInfo& info)
7567  {
7568 
7569 #ifdef SELDON_CHECK_DIMENSIONS
7570  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7571 #endif
7572 
7573  int m = A.GetM();
7574  int nrhs = 1;
7575  char uplo('U');
7576  char trans('T'); char diag('N');
7577  Vector<float, VectFull, Allocator1> work(3*m);
7578  Vector<int> iwork(m);
7579  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7580  b.GetData(), &m, x.GetData(), &m,
7581  &ferr, &berr, work.GetData(),
7582  iwork.GetData(), &info.GetInfoRef() );
7583  }
7584 
7585  template <class Prop0, class Allocator0,
7586  class Allocator1, class Allocator2>
7587  void RefineSolutionLU(const Matrix<double, Prop0, RowLoTriang,
7588  Allocator0>& A,
7589  Vector<double, VectFull, Allocator1>& x,
7590  const Vector<double, VectFull, Allocator2>& b,
7591  double& ferr, double& berr,
7592  LapackInfo& info)
7593  {
7594 
7595 #ifdef SELDON_CHECK_DIMENSIONS
7596  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7597 #endif
7598 
7599  int m = A.GetM();
7600  int nrhs = 1;
7601  char uplo('U');
7602  char trans('T'); char diag('N');
7603  Vector<double, VectFull, Allocator1> work(3*m);
7604  Vector<int> iwork(m);
7605  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7606  b.GetData(), &m, x.GetData(), &m,
7607  &ferr, &berr, work.GetData(),
7608  iwork.GetData(), &info.GetInfoRef() );
7609  }
7610 
7611 
7612  template <class Prop0, class Allocator0,
7613  class Allocator1, class Allocator2>
7614  void
7615  RefineSolutionLU(const Matrix<complex<float>, Prop0, RowLoTriang,
7616  Allocator0>& A,
7617  Vector<complex<float>, VectFull, Allocator1>& x,
7618  const Vector<complex<float>, VectFull, Allocator2>& b,
7619  float& ferr, float& berr,
7620  LapackInfo& info)
7621  {
7622 
7623 #ifdef SELDON_CHECK_DIMENSIONS
7624  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7625 #endif
7626 
7627  int m = A.GetM();
7628  int nrhs = 1;
7629  char uplo('U');
7630  char trans('T'); char diag('N');
7631  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7632  Vector<float> rwork(m);
7633  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7634  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7635  &ferr, &berr, work.GetDataVoid(),
7636  rwork.GetData(), &info.GetInfoRef() );
7637  }
7638 
7639 
7640  template <class Prop0, class Allocator0,
7641  class Allocator1, class Allocator2>
7642  void
7643  RefineSolutionLU(const Matrix<complex<double>, Prop0, RowLoTriang,
7644  Allocator0>& A,
7645  Vector<complex<double>, VectFull, Allocator1>& x,
7646  const Vector<complex<double>, VectFull, Allocator2>& b,
7647  double& ferr, double& berr,
7648  LapackInfo& info)
7649  {
7650 
7651 #ifdef SELDON_CHECK_DIMENSIONS
7652  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7653 #endif
7654 
7655  int m = A.GetM();
7656  int nrhs = 1;
7657  char uplo('U');
7658  char trans('T'); char diag('N');
7659  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7660  Vector<double> rwork(m);
7661  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7662  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7663  &ferr, &berr, work.GetDataVoid(),
7664  rwork.GetData(), &info.GetInfoRef() );
7665  }
7666 
7667 
7668  /*** RowLoTriang ***/
7669 
7670 
7671  template <class Prop0, class Allocator0,
7672  class Allocator1, class Allocator2>
7673  void
7674  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7675  const Matrix<float, Prop0, RowLoTriang,
7676  Allocator0>& A,
7677  Vector<float, VectFull, Allocator1>& x,
7678  const Vector<float, VectFull, Allocator2>& b,
7679  float& ferr, float& berr,
7680  LapackInfo& info)
7681  {
7682 
7683 #ifdef SELDON_CHECK_DIMENSIONS
7684  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7685 #endif
7686 
7687  int m = A.GetM();
7688  int nrhs = 1;
7689  char uplo('U');
7690  char trans = TransA.RevChar(); char diag = DiagA.Char();
7691  Vector<float, VectFull, Allocator1> work(3*m);
7692  Vector<int> iwork(m);
7693  strrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7694  b.GetData(), &m, x.GetData(), &m,
7695  &ferr, &berr, work.GetData(),
7696  iwork.GetData(), &info.GetInfoRef() );
7697  }
7698 
7699  template <class Prop0, class Allocator0,
7700  class Allocator1, class Allocator2>
7701  void
7702  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7703  const Matrix<double, Prop0, RowLoTriang,
7704  Allocator0>& A,
7705  Vector<double, VectFull, Allocator1>& x,
7706  const Vector<double, VectFull, Allocator2>& b,
7707  double& ferr, double& berr,
7708  LapackInfo& info)
7709  {
7710 
7711 #ifdef SELDON_CHECK_DIMENSIONS
7712  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7713 #endif
7714 
7715  int m = A.GetM();
7716  int nrhs = 1;
7717  char uplo('U');
7718  char trans = TransA.RevChar(); char diag = DiagA.Char();
7719  Vector<double, VectFull, Allocator1> work(3*m);
7720  Vector<int> iwork(m);
7721  dtrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(), &m,
7722  b.GetData(), &m, x.GetData(), &m,
7723  &ferr, &berr, work.GetData(),
7724  iwork.GetData(), &info.GetInfoRef() );
7725  }
7726 
7727 
7728  template <class Prop0, class Allocator0,
7729  class Allocator1, class Allocator2>
7730  void
7731  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7732  const Matrix<complex<float>, Prop0, RowLoTriang,
7733  Allocator0>& A,
7734  Vector<complex<float>, VectFull, Allocator1>& x,
7735  Vector<complex<float>, VectFull, Allocator2>& b,
7736  float& ferr, float& berr,
7737  LapackInfo& info)
7738  {
7739 
7740 #ifdef SELDON_CHECK_DIMENSIONS
7741  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7742 #endif
7743 
7744  int m = A.GetM();
7745  int nrhs = 1;
7746  char uplo('U');
7747  char trans = TransA.RevChar(); char diag = DiagA.Char();
7748  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7749  Vector<float> rwork(m);
7750  if (TransA.ConjTrans())
7751  {
7752  Conjugate(b);
7753  Conjugate(x);
7754  }
7755  ctrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7756  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7757  &ferr, &berr, work.GetDataVoid(),
7758  rwork.GetData(), &info.GetInfoRef() );
7759  if (TransA.ConjTrans())
7760  {
7761  Conjugate(b);
7762  Conjugate(x);
7763  }
7764  }
7765 
7766 
7767  template <class Prop0, class Allocator0,
7768  class Allocator1, class Allocator2>
7769  void
7770  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7771  const Matrix<complex<double>, Prop0, RowLoTriang,
7772  Allocator0>& A,
7773  Vector<complex<double>, VectFull, Allocator1>& x,
7774  Vector<complex<double>, VectFull, Allocator2>& b,
7775  double& ferr, double& berr,
7776  LapackInfo& info)
7777  {
7778 
7779 #ifdef SELDON_CHECK_DIMENSIONS
7780  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7781 #endif
7782 
7783  int m = A.GetM();
7784  int nrhs = 1;
7785  char uplo('U');
7786  char trans = TransA.RevChar(); char diag = DiagA.Char();
7787  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7788  Vector<double> rwork(m);
7789  if (TransA.ConjTrans())
7790  {
7791  Conjugate(b);
7792  Conjugate(x);
7793  }
7794  ztrrfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(), &m,
7795  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7796  &ferr, &berr, work.GetDataVoid(),
7797  rwork.GetData(), &info.GetInfoRef() );
7798  if (TransA.ConjTrans())
7799  {
7800  Conjugate(b);
7801  Conjugate(x);
7802  }
7803  }
7804 
7805 
7806  /*** RowUpTriangPacked, NoTrans and NonUnit ***/
7807 
7808 
7809  template <class Prop0, class Allocator0,
7810  class Allocator1, class Allocator2>
7811  void RefineSolutionLU(const Matrix<float, Prop0, RowUpTriangPacked,
7812  Allocator0>& A,
7813  Vector<float, VectFull, Allocator1>& x,
7814  const Vector<float, VectFull, Allocator2>& b,
7815  float& ferr, float& berr,
7816  LapackInfo& info)
7817  {
7818 
7819 #ifdef SELDON_CHECK_DIMENSIONS
7820  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7821 #endif
7822 
7823  int m = A.GetM();
7824  int nrhs = 1;
7825  char uplo('L');
7826  char trans('T'); char diag('N');
7827  Vector<float, VectFull, Allocator1> work(3*m);
7828  Vector<int> iwork(m);
7829  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7830  b.GetData(), &m, x.GetData(), &m,
7831  &ferr, &berr, work.GetData(),
7832  iwork.GetData(), &info.GetInfoRef() );
7833  }
7834 
7835  template <class Prop0, class Allocator0,
7836  class Allocator1, class Allocator2>
7837  void RefineSolutionLU(const Matrix<double, Prop0, RowUpTriangPacked,
7838  Allocator0>& A,
7839  Vector<double, VectFull, Allocator1>& x,
7840  const Vector<double, VectFull, Allocator2>& b,
7841  double& ferr, double& berr,
7842  LapackInfo& info)
7843  {
7844 
7845 #ifdef SELDON_CHECK_DIMENSIONS
7846  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7847 #endif
7848 
7849  int m = A.GetM();
7850  int nrhs = 1;
7851  char uplo('L');
7852  char trans('T'); char diag('N');
7853  Vector<double, VectFull, Allocator1> work(3*m);
7854  Vector<int> iwork(m);
7855  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7856  b.GetData(), &m, x.GetData(), &m,
7857  &ferr, &berr, work.GetData(),
7858  iwork.GetData(), &info.GetInfoRef() );
7859  }
7860 
7861 
7862  template <class Prop0, class Allocator0,
7863  class Allocator1, class Allocator2>
7864  void
7865  RefineSolutionLU(const Matrix<complex<float>, Prop0, RowUpTriangPacked,
7866  Allocator0>& A,
7867  Vector<complex<float>, VectFull, Allocator1>& x,
7868  const Vector<complex<float>, VectFull, Allocator2>& b,
7869  float& ferr, float& berr,
7870  LapackInfo& info)
7871  {
7872 
7873 #ifdef SELDON_CHECK_DIMENSIONS
7874  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7875 #endif
7876 
7877  int m = A.GetM();
7878  int nrhs = 1;
7879  char uplo('L');
7880  char trans('T'); char diag('N');
7881  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7882  Vector<float> rwork(m);
7883  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7884  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7885  &ferr, &berr, work.GetDataVoid(),
7886  rwork.GetData(), &info.GetInfoRef() );
7887  }
7888 
7889 
7890  template <class Prop0, class Allocator0,
7891  class Allocator1, class Allocator2>
7892  void
7893  RefineSolutionLU(const Matrix<complex<double>, Prop0, RowUpTriangPacked,
7894  Allocator0>& A,
7895  Vector<complex<double>, VectFull, Allocator1>& x,
7896  const Vector<complex<double>, VectFull, Allocator2>& b,
7897  double& ferr, double& berr,
7898  LapackInfo& info)
7899  {
7900 
7901 #ifdef SELDON_CHECK_DIMENSIONS
7902  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7903 #endif
7904 
7905  int m = A.GetM();
7906  int nrhs = 1;
7907  char uplo('L');
7908  char trans('T'); char diag('N');
7909  Vector<complex<double>, VectFull, Allocator1> work(2*m);
7910  Vector<double> rwork(m);
7911  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
7912  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
7913  &ferr, &berr, work.GetDataVoid(),
7914  rwork.GetData(), &info.GetInfoRef() );
7915  }
7916 
7917 
7918  /*** RowUpTriangPacked ***/
7919 
7920 
7921  template <class Prop0, class Allocator0,
7922  class Allocator1, class Allocator2>
7923  void
7924  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7925  const Matrix<float, Prop0, RowUpTriangPacked,
7926  Allocator0>& A,
7927  Vector<float, VectFull, Allocator1>& x,
7928  const Vector<float, VectFull, Allocator2>& b,
7929  float& ferr, float& berr,
7930  LapackInfo& info)
7931  {
7932 
7933 #ifdef SELDON_CHECK_DIMENSIONS
7934  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7935 #endif
7936 
7937  int m = A.GetM();
7938  int nrhs = 1;
7939  char uplo('L');
7940  char trans = TransA.RevChar(); char diag = DiagA.Char();
7941  Vector<float, VectFull, Allocator1> work(3*m);
7942  Vector<int> iwork(m);
7943  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7944  b.GetData(), &m, x.GetData(), &m,
7945  &ferr, &berr, work.GetData(),
7946  iwork.GetData(), &info.GetInfoRef() );
7947  }
7948 
7949  template <class Prop0, class Allocator0,
7950  class Allocator1, class Allocator2>
7951  void
7952  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7953  const Matrix<double, Prop0, RowUpTriangPacked,
7954  Allocator0>& A,
7955  Vector<double, VectFull, Allocator1>& x,
7956  const Vector<double, VectFull, Allocator2>& b,
7957  double& ferr, double& berr,
7958  LapackInfo& info)
7959  {
7960 
7961 #ifdef SELDON_CHECK_DIMENSIONS
7962  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7963 #endif
7964 
7965  int m = A.GetM();
7966  int nrhs = 1;
7967  char uplo('L');
7968  char trans = TransA.RevChar(); char diag = DiagA.Char();
7969  Vector<double, VectFull, Allocator1> work(3*m);
7970  Vector<int> iwork(m);
7971  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
7972  b.GetData(), &m, x.GetData(), &m,
7973  &ferr, &berr, work.GetData(),
7974  iwork.GetData(), &info.GetInfoRef() );
7975  }
7976 
7977 
7978  template <class Prop0, class Allocator0,
7979  class Allocator1, class Allocator2>
7980  void
7981  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
7982  const Matrix<complex<float>, Prop0, RowUpTriangPacked,
7983  Allocator0>& A,
7984  Vector<complex<float>, VectFull, Allocator1>& x,
7985  Vector<complex<float>, VectFull, Allocator2>& b,
7986  float& ferr, float& berr,
7987  LapackInfo& info)
7988  {
7989 
7990 #ifdef SELDON_CHECK_DIMENSIONS
7991  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
7992 #endif
7993 
7994  int m = A.GetM();
7995  int nrhs = 1;
7996  char uplo('L');
7997  char trans = TransA.RevChar(); char diag = DiagA.Char();
7998  Vector<complex<float>, VectFull, Allocator1> work(2*m);
7999  Vector<float> rwork(m);
8000  if (TransA.ConjTrans())
8001  {
8002  Conjugate(b);
8003  Conjugate(x);
8004  }
8005  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
8006  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
8007  &ferr, &berr, work.GetDataVoid(),
8008  rwork.GetData(), &info.GetInfoRef() );
8009  if (TransA.ConjTrans())
8010  {
8011  Conjugate(b);
8012  Conjugate(x);
8013  }
8014  }
8015 
8016 
8017  template <class Prop0, class Allocator0,
8018  class Allocator1, class Allocator2>
8019  void
8020  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
8021  const Matrix<complex<double>, Prop0, RowUpTriangPacked,
8022  Allocator0>& A,
8023  Vector<complex<double>, VectFull, Allocator1>& x,
8024  Vector<complex<double>, VectFull, Allocator2>& b,
8025  double& ferr, double& berr,
8026  LapackInfo& info)
8027  {
8028 
8029 #ifdef SELDON_CHECK_DIMENSIONS
8030  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8031 #endif
8032 
8033  int m = A.GetM();
8034  int nrhs = 1;
8035  char uplo('L');
8036  char trans = TransA.RevChar(); char diag = DiagA.Char();
8037  Vector<complex<double>, VectFull, Allocator1> work(2*m);
8038  Vector<double> rwork(m);
8039  if (TransA.ConjTrans())
8040  {
8041  Conjugate(b);
8042  Conjugate(x);
8043  }
8044  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
8045  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
8046  &ferr, &berr, work.GetDataVoid(),
8047  rwork.GetData(), &info.GetInfoRef() );
8048  if (TransA.ConjTrans())
8049  {
8050  Conjugate(b);
8051  Conjugate(x);
8052  }
8053  }
8054 
8055 
8056  /*** RowLoTriangPacked, NoTrans and NonUnit ***/
8057 
8058 
8059  template <class Prop0, class Allocator0,
8060  class Allocator1, class Allocator2>
8061  void RefineSolutionLU(const Matrix<float, Prop0, RowLoTriangPacked,
8062  Allocator0>& A,
8063  Vector<float, VectFull, Allocator1>& x,
8064  const Vector<float, VectFull, Allocator2>& b,
8065  float& ferr, float& berr,
8066  LapackInfo& info)
8067  {
8068 
8069 #ifdef SELDON_CHECK_DIMENSIONS
8070  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8071 #endif
8072 
8073  int m = A.GetM();
8074  int nrhs = 1;
8075  char uplo('U');
8076  char trans('T'); char diag('N');
8077  Vector<float, VectFull, Allocator1> work(3*m);
8078  Vector<int> iwork(m);
8079  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
8080  b.GetData(), &m, x.GetData(), &m,
8081  &ferr, &berr, work.GetData(),
8082  iwork.GetData(), &info.GetInfoRef() );
8083  }
8084 
8085  template <class Prop0, class Allocator0,
8086  class Allocator1, class Allocator2>
8087  void RefineSolutionLU(const Matrix<double, Prop0, RowLoTriangPacked,
8088  Allocator0>& A,
8089  Vector<double, VectFull, Allocator1>& x,
8090  const Vector<double, VectFull, Allocator2>& b,
8091  double& ferr, double& berr,
8092  LapackInfo& info)
8093  {
8094 
8095 #ifdef SELDON_CHECK_DIMENSIONS
8096  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8097 #endif
8098 
8099  int m = A.GetM();
8100  int nrhs = 1;
8101  char uplo('U');
8102  char trans('T'); char diag('N');
8103  Vector<double, VectFull, Allocator1> work(3*m);
8104  Vector<int> iwork(m);
8105  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
8106  b.GetData(), &m, x.GetData(), &m,
8107  &ferr, &berr, work.GetData(),
8108  iwork.GetData(), &info.GetInfoRef() );
8109  }
8110 
8111 
8112  template <class Prop0, class Allocator0,
8113  class Allocator1, class Allocator2>
8114  void
8115  RefineSolutionLU(const Matrix<complex<float>, Prop0, RowLoTriangPacked,
8116  Allocator0>& A,
8117  Vector<complex<float>, VectFull, Allocator1>& x,
8118  const Vector<complex<float>, VectFull, Allocator2>& b,
8119  float& ferr, float& berr,
8120  LapackInfo& info)
8121  {
8122 
8123 #ifdef SELDON_CHECK_DIMENSIONS
8124  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8125 #endif
8126 
8127  int m = A.GetM();
8128  int nrhs = 1;
8129  char uplo('U');
8130  char trans('T'); char diag('N');
8131  Vector<complex<float>, VectFull, Allocator1> work(2*m);
8132  Vector<float> rwork(m);
8133  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
8134  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
8135  &ferr, &berr, work.GetDataVoid(),
8136  rwork.GetData(), &info.GetInfoRef() );
8137  }
8138 
8139 
8140  template <class Prop0, class Allocator0,
8141  class Allocator1, class Allocator2>
8142  void
8143  RefineSolutionLU(const Matrix<complex<double>, Prop0, RowLoTriangPacked,
8144  Allocator0>& A,
8145  Vector<complex<double>, VectFull, Allocator1>& x,
8146  const Vector<complex<double>, VectFull, Allocator2>& b,
8147  double& ferr, double& berr,
8148  LapackInfo& info)
8149  {
8150 
8151 #ifdef SELDON_CHECK_DIMENSIONS
8152  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8153 #endif
8154 
8155  int m = A.GetM();
8156  int nrhs = 1;
8157  char uplo('U');
8158  char trans('T'); char diag('N');
8159  Vector<complex<double>, VectFull, Allocator1> work(2*m);
8160  Vector<double> rwork(m);
8161  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
8162  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
8163  &ferr, &berr, work.GetDataVoid(),
8164  rwork.GetData(), &info.GetInfoRef() );
8165  }
8166 
8167 
8168  /*** RowLoTriangPacked ***/
8169 
8170 
8171  template <class Prop0, class Allocator0,
8172  class Allocator1, class Allocator2>
8173  void
8174  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
8175  const Matrix<float, Prop0, RowLoTriangPacked,
8176  Allocator0>& A,
8177  Vector<float, VectFull, Allocator1>& x,
8178  const Vector<float, VectFull, Allocator2>& b,
8179  float& ferr, float& berr,
8180  LapackInfo& info)
8181  {
8182 
8183 #ifdef SELDON_CHECK_DIMENSIONS
8184  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8185 #endif
8186 
8187  int m = A.GetM();
8188  int nrhs = 1;
8189  char uplo('U');
8190  char trans = TransA.RevChar(); char diag = DiagA.Char();
8191  Vector<float, VectFull, Allocator1> work(3*m);
8192  Vector<int> iwork(m);
8193  stprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
8194  b.GetData(), &m, x.GetData(), &m,
8195  &ferr, &berr, work.GetData(),
8196  iwork.GetData(), &info.GetInfoRef() );
8197  }
8198 
8199  template <class Prop0, class Allocator0,
8200  class Allocator1, class Allocator2>
8201  void
8202  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
8203  const Matrix<double, Prop0, RowLoTriangPacked,
8204  Allocator0>& A,
8205  Vector<double, VectFull, Allocator1>& x,
8206  const Vector<double, VectFull, Allocator2>& b,
8207  double& ferr, double& berr,
8208  LapackInfo& info)
8209  {
8210 
8211 #ifdef SELDON_CHECK_DIMENSIONS
8212  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8213 #endif
8214 
8215  int m = A.GetM();
8216  int nrhs = 1;
8217  char uplo('U');
8218  char trans = TransA.RevChar(); char diag = DiagA.Char();
8219  Vector<double, VectFull, Allocator1> work(3*m);
8220  Vector<int> iwork(m);
8221  dtprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetData(),
8222  b.GetData(), &m, x.GetData(), &m,
8223  &ferr, &berr, work.GetData(),
8224  iwork.GetData(), &info.GetInfoRef() );
8225  }
8226 
8227 
8228  template <class Prop0, class Allocator0,
8229  class Allocator1, class Allocator2>
8230  void
8231  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
8232  const Matrix<complex<float>, Prop0, RowLoTriangPacked,
8233  Allocator0>& A,
8234  Vector<complex<float>, VectFull, Allocator1>& x,
8235  Vector<complex<float>, VectFull, Allocator2>& b,
8236  float& ferr, float& berr,
8237  LapackInfo& info)
8238  {
8239 
8240 #ifdef SELDON_CHECK_DIMENSIONS
8241  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8242 #endif
8243 
8244  int m = A.GetM();
8245  int nrhs = 1;
8246  char uplo('U');
8247  char trans = TransA.RevChar(); char diag = DiagA.Char();
8248  Vector<complex<float>, VectFull, Allocator1> work(2*m);
8249  Vector<float> rwork(m);
8250  if (TransA.ConjTrans())
8251  {
8252  Conjugate(b);
8253  Conjugate(x);
8254  }
8255  ctprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
8256  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
8257  &ferr, &berr, work.GetDataVoid(),
8258  rwork.GetData(), &info.GetInfoRef() );
8259  if (TransA.ConjTrans())
8260  {
8261  Conjugate(b);
8262  Conjugate(x);
8263  }
8264  }
8265 
8266 
8267  template <class Prop0, class Allocator0,
8268  class Allocator1, class Allocator2>
8269  void
8270  RefineSolutionLU(const SeldonTranspose& TransA, const SeldonDiag& DiagA,
8271  const Matrix<complex<double>, Prop0, RowLoTriangPacked,
8272  Allocator0>& A,
8273  Vector<complex<double>, VectFull, Allocator1>& x,
8274  Vector<complex<double>, VectFull, Allocator2>& b,
8275  double& ferr, double& berr,
8276  LapackInfo& info)
8277  {
8278 
8279 #ifdef SELDON_CHECK_DIMENSIONS
8280  CheckDim(A, x, b, "RefineSolutionLU(A, Alu, X, Y)");
8281 #endif
8282 
8283  int m = A.GetM();
8284  int nrhs = 1;
8285  char uplo('U');
8286  char trans = TransA.RevChar(); char diag = DiagA.Char();
8287  Vector<complex<double>, VectFull, Allocator1> work(2*m);
8288  Vector<double> rwork(m);
8289  if (TransA.ConjTrans())
8290  {
8291  Conjugate(b);
8292  Conjugate(x);
8293  }
8294  ztprfs_(&uplo, &trans, &diag, &m, &nrhs, A.GetDataVoid(),
8295  b.GetDataVoid(), &m, x.GetDataVoid(), &m,
8296  &ferr, &berr, work.GetDataVoid(),
8297  rwork.GetData(), &info.GetInfoRef() );
8298  if (TransA.ConjTrans())
8299  {
8300  Conjugate(b);
8301  Conjugate(x);
8302  }
8303  }
8304 
8305 
8306  // RefineSolutionLU //
8308 
8309 
8310 
8312  // GetInverse //
8313 
8314 
8315  /*** ColMajor ***/
8316 
8317 
8318  template <class Prop0, class Allocator0>
8319  void GetInverse(Matrix<float, Prop0, ColMajor, Allocator0>& A,
8320  LapackInfo& info)
8321  {
8322  int m = A.GetM();
8323  Vector<int> pivot;
8324  Vector<float, VectFull, Allocator0> work(m);
8325  GetLU(A, pivot, info);
8326  sgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
8327  &info.GetInfoRef());
8328 
8329 #ifdef SELDON_LAPACK_CHECK_INFO
8330  if (info.GetInfo() != 0)
8331  throw LapackError(info.GetInfo(), "GetInverse",
8332  "The matrix is inversible ? ");
8333 #endif
8334 
8335  }
8336 
8337 
8338  template <class Prop0, class Allocator0>
8339  void GetInverse(Matrix<double, Prop0, ColMajor, Allocator0>& A,
8340  LapackInfo& info)
8341  {
8342  int m = A.GetM();
8343  Vector<int> pivot;
8344  Vector<double, VectFull, Allocator0> work(m);
8345  GetLU(A, pivot, info);
8346  dgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
8347  &info.GetInfoRef());
8348 
8349 #ifdef SELDON_LAPACK_CHECK_INFO
8350  if (info.GetInfo() != 0)
8351  throw LapackError(info.GetInfo(), "GetInverse",
8352  "The matrix is inversible ? ");
8353 #endif
8354 
8355  }
8356 
8357 
8358  template <class Prop0, class Allocator0>
8359  void GetInverse(Matrix<complex<float>, Prop0, ColMajor, Allocator0>& A,
8360  LapackInfo& info)
8361  {
8362  int m = A.GetM();
8363  Vector<int> pivot;
8364  Vector<complex<float>, VectFull, Allocator0> work(m);
8365  GetLU(A, pivot, info);
8366  cgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
8367  work.GetDataVoid(), &m, &info.GetInfoRef());
8368 
8369 #ifdef SELDON_LAPACK_CHECK_INFO
8370  if (info.GetInfo() != 0)
8371  throw LapackError(info.GetInfo(), "GetInverse",
8372  "The matrix is inversible ? ");
8373 #endif
8374 
8375  }
8376 
8377 
8378  template <class Prop0, class Allocator0>
8379  void GetInverse(Matrix<complex<double>, Prop0, ColMajor, Allocator0>& A,
8380  LapackInfo& info)
8381  {
8382  int m = A.GetM();
8383  Vector<int> pivot;
8384  Vector<complex<double>, VectFull, Allocator0> work(m);
8385  GetLU(A, pivot, info);
8386  zgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
8387  work.GetDataVoid(), &m, &info.GetInfoRef());
8388 
8389 #ifdef SELDON_LAPACK_CHECK_INFO
8390  if (info.GetInfo() != 0)
8391  throw LapackError(info.GetInfo(), "GetInverse",
8392  "The matrix is inversible ? ");
8393 #endif
8394 
8395  }
8396 
8397 
8398  /*** RowMajor ***/
8399 
8400 
8401  template <class Prop0, class Allocator0>
8402  void GetInverse(Matrix<float, Prop0, RowMajor, Allocator0>& A,
8403  LapackInfo& info)
8404  {
8405  int m = A.GetM();
8406  Vector<int> pivot;
8407  Vector<float, VectFull, Allocator0> work(m);
8408  GetLU(A, pivot, info);
8409  sgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
8410  &info.GetInfoRef());
8411 
8412 #ifdef SELDON_LAPACK_CHECK_INFO
8413  if (info.GetInfo() != 0)
8414  throw LapackError(info.GetInfo(), "GetInverse",
8415  "The matrix is inversible ? ");
8416 #endif
8417 
8418  }
8419 
8420 
8421  template <class Prop0, class Allocator0>
8422  void GetInverse(Matrix<double, Prop0, RowMajor, Allocator0>& A,
8423  LapackInfo& info)
8424  {
8425  int m = A.GetM();
8426  Vector<int> pivot;
8427  Vector<double, VectFull, Allocator0> work(m);
8428  GetLU(A, pivot, info);
8429  dgetri_(&m, A.GetData(), &m, pivot.GetData(), work.GetData(), &m,
8430  &info.GetInfoRef());
8431 
8432 #ifdef SELDON_LAPACK_CHECK_INFO
8433  if (info.GetInfo() != 0)
8434  throw LapackError(info.GetInfo(), "GetInverse",
8435  "The matrix is inversible ? ");
8436 #endif
8437 
8438  }
8439 
8440 
8441  template <class Prop0, class Allocator0>
8442  void GetInverse(Matrix<complex<float>, Prop0, RowMajor, Allocator0>& A,
8443  LapackInfo& info)
8444  {
8445  int m = A.GetM();
8446  Vector<int> pivot;
8447  Vector<complex<float>, VectFull, Allocator0> work(m);
8448  GetLU(A, pivot, info);
8449  cgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
8450  work.GetDataVoid(), &m, &info.GetInfoRef());
8451 
8452 #ifdef SELDON_LAPACK_CHECK_INFO
8453  if (info.GetInfo() != 0)
8454  throw LapackError(info.GetInfo(), "GetInverse",
8455  "The matrix is inversible ? ");
8456 #endif
8457 
8458  }
8459 
8460 
8461  template <class Prop0, class Allocator0>
8462  void GetInverse(Matrix<complex<double>, Prop0, RowMajor, Allocator0>& A,
8463  LapackInfo& info)
8464  {
8465  int m = A.GetM();
8466  Vector<int> pivot;
8467  Vector<complex<double>, VectFull, Allocator0> work(m);
8468  GetLU(A, pivot, info);
8469  zgetri_(&m, A.GetDataVoid(), &m, pivot.GetData(),
8470  work.GetDataVoid(), &m, &info.GetInfoRef());
8471 
8472 #ifdef SELDON_LAPACK_CHECK_INFO
8473  if (info.GetInfo() != 0)
8474  throw LapackError(info.GetInfo(), "GetInverse",
8475  "The matrix is inversible ? ");
8476 #endif
8477 
8478  }
8479 
8480 
8481  /*** ColSym and Upper ***/
8482 
8483 
8484  template <class Prop0, class Allocator0>
8485  void GetInverse(Matrix<float, Prop0, ColSym, Allocator0>& A,
8486  LapackInfo& info)
8487  {
8488  int m = A.GetM();
8489  char uplo('U');
8490  Vector<int> pivot;
8491  Vector<float, VectFull, Allocator0> work(2*m);
8492  GetLU(A, pivot, info);
8493  ssytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
8494  &info.GetInfoRef());
8495 
8496 #ifdef SELDON_LAPACK_CHECK_INFO
8497  if (info.GetInfo() != 0)
8498  throw LapackError(info.GetInfo(), "GetInverse",
8499  "The matrix is inversible ? ");
8500 #endif
8501 
8502  }
8503 
8504 
8505  template <class Prop0, class Allocator0>
8506  void GetInverse(Matrix<double, Prop0, ColSym, Allocator0>& A,
8507  LapackInfo& info)
8508  {
8509  int m = A.GetM();
8510  char uplo('U');
8511  Vector<int> pivot;
8512  Vector<double, VectFull, Allocator0> work(2*m);
8513  GetLU(A, pivot, info);
8514  dsytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
8515  &info.GetInfoRef());
8516 
8517 #ifdef SELDON_LAPACK_CHECK_INFO
8518  if (info.GetInfo() != 0)
8519  throw LapackError(info.GetInfo(), "GetInverse",
8520  "The matrix is inversible ? ");
8521 #endif
8522 
8523  }
8524 
8525 
8526  template <class Prop0, class Allocator0>
8527  void GetInverse(Matrix<complex<float>, Prop0, ColSym, Allocator0>& A,
8528  LapackInfo& info)
8529  {
8530  int m = A.GetM();
8531  char uplo('U');
8532  Vector<int> pivot;
8533  Vector<complex<float>, VectFull, Allocator0> work(2*m);
8534  GetLU(A, pivot, info);
8535  csytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8536  work.GetDataVoid(), &info.GetInfoRef());
8537 
8538 #ifdef SELDON_LAPACK_CHECK_INFO
8539  if (info.GetInfo() != 0)
8540  throw LapackError(info.GetInfo(), "GetInverse",
8541  "The matrix is inversible ? ");
8542 #endif
8543 
8544  }
8545 
8546 
8547  template <class Prop0, class Allocator0>
8548  void GetInverse(Matrix<complex<double>, Prop0, ColSym, Allocator0>& A,
8549  LapackInfo& info)
8550  {
8551  int m = A.GetM();
8552  char uplo('U');
8553  Vector<int> pivot;
8554  Vector<complex<double>, VectFull, Allocator0> work(2*m);
8555  GetLU(A, pivot, info);
8556  zsytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8557  work.GetDataVoid(), &info.GetInfoRef());
8558 
8559 #ifdef SELDON_LAPACK_CHECK_INFO
8560  if (info.GetInfo() != 0)
8561  throw LapackError(info.GetInfo(), "GetInverse",
8562  "The matrix is inversible ? ");
8563 #endif
8564 
8565  }
8566 
8567 
8568  /*** ColSymPacked and Upper ***/
8569 
8570 
8571  template <class Prop0, class Allocator0>
8572  void GetInverse(Matrix<float, Prop0, ColSymPacked, Allocator0>& A,
8573  LapackInfo& info)
8574  {
8575  int m = A.GetM();
8576  char uplo('U');
8577  Vector<int> pivot;
8578  Vector<float, VectFull, Allocator0> work(m);
8579  GetLU(A, pivot, info);
8580  ssptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
8581  &info.GetInfoRef());
8582 
8583 #ifdef SELDON_LAPACK_CHECK_INFO
8584  if (info.GetInfo() != 0)
8585  throw LapackError(info.GetInfo(), "GetInverse",
8586  "The matrix is inversible ? ");
8587 #endif
8588 
8589  }
8590 
8591 
8592  template <class Prop0, class Allocator0>
8593  void GetInverse(Matrix<double, Prop0, ColSymPacked, Allocator0>& A,
8594  LapackInfo& info)
8595  {
8596  int m = A.GetM();
8597  char uplo('U');
8598  Vector<int> pivot;
8599  Vector<double, VectFull, Allocator0> work(m);
8600  GetLU(A, pivot, info);
8601  dsptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
8602  &info.GetInfoRef());
8603 
8604 #ifdef SELDON_LAPACK_CHECK_INFO
8605  if (info.GetInfo() != 0)
8606  throw LapackError(info.GetInfo(), "GetInverse",
8607  "The matrix is inversible ? ");
8608 #endif
8609 
8610  }
8611 
8612 
8613  template <class Prop0, class Allocator0>
8614  void GetInverse(Matrix<complex<float>, Prop0, ColSymPacked, Allocator0>& A,
8615  LapackInfo& info)
8616  {
8617  int m = A.GetM();
8618  char uplo('U');
8619  Vector<int> pivot;
8620  Vector<complex<float>, VectFull, Allocator0> work(m);
8621  GetLU(A, pivot, info);
8622  csptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
8623  work.GetDataVoid(), &info.GetInfoRef());
8624 
8625 #ifdef SELDON_LAPACK_CHECK_INFO
8626  if (info.GetInfo() != 0)
8627  throw LapackError(info.GetInfo(), "GetInverse",
8628  "The matrix is inversible ? ");
8629 #endif
8630 
8631  }
8632 
8633 
8634  template <class Prop0, class Allocator0>
8635  void GetInverse(Matrix<complex<double>, Prop0, ColSymPacked, Allocator0>& A,
8636  LapackInfo& info)
8637  {
8638  int m = A.GetM();
8639  char uplo('U');
8640  Vector<int> pivot;
8641  Vector<complex<double>, VectFull, Allocator0> work(m);
8642  GetLU(A, pivot, info);
8643  zsptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
8644  work.GetDataVoid(), &info.GetInfoRef());
8645 
8646 #ifdef SELDON_LAPACK_CHECK_INFO
8647  if (info.GetInfo() != 0)
8648  throw LapackError(info.GetInfo(), "GetInverse",
8649  "The matrix is inversible ? ");
8650 #endif
8651 
8652  }
8653 
8654 
8655  /*** RowSym and Upper ***/
8656 
8657 
8658  template <class Prop0, class Allocator0>
8659  void GetInverse(Matrix<float, Prop0, RowSym, Allocator0>& A,
8660  LapackInfo& info)
8661  {
8662  int m = A.GetM();
8663  char uplo('L');
8664  Vector<int> pivot;
8665  Vector<float, VectFull, Allocator0> work(2*m);
8666  GetLU(A, pivot, info);
8667  ssytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
8668  &info.GetInfoRef());
8669 
8670 #ifdef SELDON_LAPACK_CHECK_INFO
8671  if (info.GetInfo() != 0)
8672  throw LapackError(info.GetInfo(), "GetInverse",
8673  "The matrix is inversible ? ");
8674 #endif
8675 
8676  }
8677 
8678 
8679  template <class Prop0, class Allocator0>
8680  void GetInverse(Matrix<double, Prop0, RowSym, Allocator0>& A,
8681  LapackInfo& info)
8682  {
8683  int m = A.GetM();
8684  char uplo('L');
8685  Vector<int> pivot;
8686  Vector<double, VectFull, Allocator0> work(2*m);
8687  GetLU(A, pivot, info);
8688  dsytri_(&uplo, &m, A.GetData(), &m, pivot.GetData(), work.GetData(),
8689  &info.GetInfoRef());
8690 
8691 #ifdef SELDON_LAPACK_CHECK_INFO
8692  if (info.GetInfo() != 0)
8693  throw LapackError(info.GetInfo(), "GetInverse",
8694  "The matrix is inversible ? ");
8695 #endif
8696 
8697  }
8698 
8699 
8700  template <class Prop0, class Allocator0>
8701  void GetInverse(Matrix<complex<float>, Prop0, RowSym, Allocator0>& A,
8702  LapackInfo& info)
8703  {
8704  int m = A.GetM();
8705  char uplo('L');
8706  Vector<int> pivot;
8707  Vector<complex<float>, VectFull, Allocator0> work(2*m);
8708  GetLU(A, pivot, info);
8709  csytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8710  work.GetDataVoid(), &info.GetInfoRef());
8711 
8712 #ifdef SELDON_LAPACK_CHECK_INFO
8713  if (info.GetInfo() != 0)
8714  throw LapackError(info.GetInfo(), "GetInverse",
8715  "The matrix is inversible ? ");
8716 #endif
8717 
8718  }
8719 
8720 
8721  template <class Prop0, class Allocator0>
8722  void GetInverse(Matrix<complex<double>, Prop0, RowSym, Allocator0>& A,
8723  LapackInfo& info)
8724  {
8725  int m = A.GetM();
8726  char uplo('L');
8727  Vector<int> pivot;
8728  Vector<complex<double>, VectFull, Allocator0> work(2*m);
8729  GetLU(A, pivot, info);
8730  zsytri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8731  work.GetDataVoid(), &info.GetInfoRef());
8732 
8733 #ifdef SELDON_LAPACK_CHECK_INFO
8734  if (info.GetInfo() != 0)
8735  throw LapackError(info.GetInfo(), "GetInverse",
8736  "The matrix is inversible ? ");
8737 #endif
8738 
8739  }
8740 
8741 
8742  /*** RowSymPacked and Upper ***/
8743 
8744 
8745  template <class Prop0, class Allocator0>
8746  void GetInverse(Matrix<float, Prop0, RowSymPacked, Allocator0>& A,
8747  LapackInfo& info)
8748  {
8749  int m = A.GetM();
8750  char uplo('L');
8751  Vector<int> pivot;
8752  Vector<float, VectFull, Allocator0> work(m);
8753  GetLU(A, pivot, info);
8754  ssptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
8755  &info.GetInfoRef());
8756 
8757 #ifdef SELDON_LAPACK_CHECK_INFO
8758  if (info.GetInfo() != 0)
8759  throw LapackError(info.GetInfo(), "GetInverse",
8760  "The matrix is inversible ? ");
8761 #endif
8762 
8763  }
8764 
8765 
8766  template <class Prop0, class Allocator0>
8767  void GetInverse(Matrix<double, Prop0, RowSymPacked, Allocator0>& A,
8768  LapackInfo& info)
8769  {
8770  int m = A.GetM();
8771  char uplo('L');
8772  Vector<int> pivot;
8773  Vector<double, VectFull, Allocator0> work(m);
8774  GetLU(A, pivot, info);
8775  dsptri_(&uplo, &m, A.GetData(), pivot.GetData(), work.GetData(),
8776  &info.GetInfoRef());
8777 
8778 #ifdef SELDON_LAPACK_CHECK_INFO
8779  if (info.GetInfo() != 0)
8780  throw LapackError(info.GetInfo(), "GetInverse",
8781  "The matrix is inversible ? ");
8782 #endif
8783 
8784  }
8785 
8786 
8787  template <class Prop0, class Allocator0>
8788  void GetInverse(Matrix<complex<float>, Prop0, RowSymPacked, Allocator0>& A,
8789  LapackInfo& info)
8790  {
8791  int m = A.GetM();
8792  char uplo('L');
8793  Vector<int> pivot;
8794  Vector<complex<float>, VectFull, Allocator0> work(m);
8795  GetLU(A, pivot, info);
8796  csptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
8797  work.GetDataVoid(), &info.GetInfoRef());
8798 
8799 #ifdef SELDON_LAPACK_CHECK_INFO
8800  if (info.GetInfo() != 0)
8801  throw LapackError(info.GetInfo(), "GetInverse",
8802  "The matrix is inversible ? ");
8803 #endif
8804 
8805  }
8806 
8807 
8808  template <class Prop0, class Allocator0>
8809  void GetInverse(Matrix<complex<double>, Prop0, RowSymPacked, Allocator0>& A,
8810  LapackInfo& info)
8811  {
8812  int m = A.GetM();
8813  char uplo('L');
8814  Vector<int> pivot;
8815  Vector<complex<double>, VectFull, Allocator0> work(m);
8816  GetLU(A, pivot, info);
8817  zsptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
8818  work.GetDataVoid(), &info.GetInfoRef());
8819 
8820 #ifdef SELDON_LAPACK_CHECK_INFO
8821  if (info.GetInfo() != 0)
8822  throw LapackError(info.GetInfo(), "GetInverse",
8823  "The matrix is inversible ? ");
8824 #endif
8825 
8826  }
8827 
8828 
8829  /*** ColHerm and Upper ***/
8830 
8831 
8832  template <class Prop0, class Allocator0>
8833  void GetInverse(Matrix<complex<float>, Prop0, ColHerm, Allocator0>& A,
8834  LapackInfo& info)
8835  {
8836  int m = A.GetM();
8837  char uplo('U');
8838  Vector<int> pivot;
8839  Vector<complex<float>, VectFull, Allocator0> work(m);
8840  GetLU(A, pivot, info);
8841  chetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8842  work.GetDataVoid(), &info.GetInfoRef());
8843 
8844 #ifdef SELDON_LAPACK_CHECK_INFO
8845  if (info.GetInfo() != 0)
8846  throw LapackError(info.GetInfo(), "GetInverse",
8847  "The matrix is inversible ? ");
8848 #endif
8849 
8850  }
8851 
8852 
8853  template <class Prop0, class Allocator0>
8854  void GetInverse(Matrix<complex<double>, Prop0, ColHerm, Allocator0>& A,
8855  LapackInfo& info)
8856  {
8857  int m = A.GetM();
8858  char uplo('U');
8859  Vector<int> pivot;
8860  Vector<complex<double>, VectFull, Allocator0> work(m);
8861  GetLU(A, pivot, info);
8862  zhetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8863  work.GetDataVoid(), &info.GetInfoRef());
8864 
8865 #ifdef SELDON_LAPACK_CHECK_INFO
8866  if (info.GetInfo() != 0)
8867  throw LapackError(info.GetInfo(), "GetInverse",
8868  "The matrix is inversible ? ");
8869 #endif
8870 
8871  }
8872 
8873 
8874  /*** ColHermPacked and Upper ***/
8875 
8876 
8877  template <class Prop0, class Allocator0>
8878  void GetInverse(Matrix<complex<float>, Prop0, ColHermPacked,
8879  Allocator0>& A,
8880  LapackInfo& info)
8881  {
8882  int m = A.GetM();
8883  char uplo('U');
8884  Vector<int> pivot;
8885  Vector<complex<float>, VectFull, Allocator0> work(m);
8886  GetLU(A, pivot, info);
8887  chptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
8888  work.GetDataVoid(), &info.GetInfoRef());
8889 
8890 #ifdef SELDON_LAPACK_CHECK_INFO
8891  if (info.GetInfo() != 0)
8892  throw LapackError(info.GetInfo(), "GetInverse",
8893  "The matrix is inversible ? ");
8894 #endif
8895 
8896  }
8897 
8898 
8899  template <class Prop0, class Allocator0>
8900  void GetInverse(Matrix<complex<double>, Prop0, ColHermPacked,
8901  Allocator0>& A,
8902  LapackInfo& info)
8903  {
8904  int m = A.GetM();
8905  char uplo('U');
8906  Vector<int> pivot;
8907  Vector<complex<double>, VectFull, Allocator0> work(m);
8908  GetLU(A, pivot, info);
8909  zhptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
8910  work.GetDataVoid(), &info.GetInfoRef());
8911 
8912 #ifdef SELDON_LAPACK_CHECK_INFO
8913  if (info.GetInfo() != 0)
8914  throw LapackError(info.GetInfo(), "GetInverse",
8915  "The matrix is inversible ? ");
8916 #endif
8917 
8918  }
8919 
8920 
8921  /*** RowHerm and Upper ***/
8922 
8923 
8924  template <class Prop0, class Allocator0>
8925  void GetInverse(Matrix<complex<float>, Prop0, RowHerm, Allocator0>& A,
8926  LapackInfo& info)
8927  {
8928  int m = A.GetM();
8929  char uplo('L');
8930  Vector<int> pivot;
8931  Vector<complex<float>, VectFull, Allocator0> work(m);
8932  GetLU(A, pivot, info);
8933  chetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8934  work.GetDataVoid(), &info.GetInfoRef());
8935 
8936 #ifdef SELDON_LAPACK_CHECK_INFO
8937  if (info.GetInfo() != 0)
8938  throw LapackError(info.GetInfo(), "GetInverse",
8939  "The matrix is inversible ? ");
8940 #endif
8941 
8942  }
8943 
8944 
8945  template <class Prop0, class Allocator0>
8946  void GetInverse(Matrix<complex<double>, Prop0, RowHerm, Allocator0>& A,
8947  LapackInfo& info)
8948  {
8949  int m = A.GetM();
8950  char uplo('L');
8951  Vector<int> pivot;
8952  Vector<complex<double>, VectFull, Allocator0> work(m);
8953  GetLU(A, pivot, info);
8954  zhetri_(&uplo, &m, A.GetDataVoid(), &m, pivot.GetData(),
8955  work.GetDataVoid(), &info.GetInfoRef());
8956 
8957 #ifdef SELDON_LAPACK_CHECK_INFO
8958  if (info.GetInfo() != 0)
8959  throw LapackError(info.GetInfo(), "GetInverse",
8960  "The matrix is inversible ? ");
8961 #endif
8962 
8963  }
8964 
8965 
8966  /*** RowHermPacked and Upper ***/
8967 
8968 
8969  template <class Prop0, class Allocator0>
8970  void GetInverse(Matrix<complex<float>, Prop0, RowHermPacked,
8971  Allocator0>& A,
8972  LapackInfo& info)
8973  {
8974  int m = A.GetM();
8975  char uplo('L');
8976  Vector<int> pivot;
8977  Vector<complex<float>, VectFull, Allocator0> work(m);
8978  GetLU(A, pivot, info);
8979  chptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
8980  work.GetDataVoid(), &info.GetInfoRef());
8981 
8982 #ifdef SELDON_LAPACK_CHECK_INFO
8983  if (info.GetInfo() != 0)
8984  throw LapackError(info.GetInfo(), "GetInverse",
8985  "The matrix is inversible ? ");
8986 #endif
8987 
8988  }
8989 
8990 
8991  template <class Prop0, class Allocator0>
8992  void GetInverse(Matrix<complex<double>, Prop0, RowHermPacked,
8993  Allocator0>& A,
8994  LapackInfo& info)
8995  {
8996  int m = A.GetM();
8997  char uplo('L');
8998  Vector<int> pivot;
8999  Vector<complex<double>, VectFull, Allocator0> work(m);
9000  GetLU(A, pivot, info);
9001  zhptri_(&uplo, &m, A.GetDataVoid(), pivot.GetData(),
9002  work.GetDataVoid(), &info.GetInfoRef());
9003 
9004 #ifdef SELDON_LAPACK_CHECK_INFO
9005  if (info.GetInfo() != 0)
9006  throw LapackError(info.GetInfo(), "GetInverse",
9007  "The matrix is inversible ? ");
9008 #endif
9009 
9010  }
9011 
9012 
9013  /*** ColUpTriang and NonUnit ***/
9014 
9015 
9016  template <class Prop0, class Allocator0>
9017  void GetInverse(Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
9018  LapackInfo& info)
9019  {
9020  int m = A.GetM();
9021  char uplo('U'); char diag('N');
9022  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9023  &info.GetInfoRef());
9024 
9025 #ifdef SELDON_LAPACK_CHECK_INFO
9026  if (info.GetInfo() != 0)
9027  throw LapackError(info.GetInfo(), "GetInverse",
9028  "The matrix is inversible ? ");
9029 #endif
9030 
9031  }
9032 
9033 
9034  template <class Prop0, class Allocator0>
9035  void GetInverse(Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
9036  LapackInfo& info)
9037  {
9038  int m = A.GetM();
9039  char uplo('U'); char diag('N');
9040  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9041  &info.GetInfoRef());
9042 
9043 #ifdef SELDON_LAPACK_CHECK_INFO
9044  if (info.GetInfo() != 0)
9045  throw LapackError(info.GetInfo(), "GetInverse",
9046  "The matrix is inversible ? ");
9047 #endif
9048 
9049  }
9050 
9051 
9052  template <class Prop0, class Allocator0>
9053  void GetInverse(Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
9054  LapackInfo& info)
9055  {
9056  int m = A.GetM();
9057  char uplo('U'); char diag('N');
9058  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9059  &info.GetInfoRef());
9060 
9061 #ifdef SELDON_LAPACK_CHECK_INFO
9062  if (info.GetInfo() != 0)
9063  throw LapackError(info.GetInfo(), "GetInverse",
9064  "The matrix is inversible ? ");
9065 #endif
9066 
9067  }
9068 
9069 
9070  template <class Prop0, class Allocator0>
9071  void GetInverse(Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
9072  LapackInfo& info)
9073  {
9074  int m = A.GetM();
9075  char uplo('U'); char diag('N');
9076  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9077  &info.GetInfoRef());
9078 
9079 #ifdef SELDON_LAPACK_CHECK_INFO
9080  if (info.GetInfo() != 0)
9081  throw LapackError(info.GetInfo(), "GetInverse",
9082  "The matrix is inversible ? ");
9083 #endif
9084 
9085  }
9086 
9087 
9088  /*** ColUpTriang ***/
9089 
9090 
9091  template <class Prop0, class Allocator0>
9092  void GetInverse(const SeldonDiag& DiagA,
9093  Matrix<float, Prop0, ColUpTriang, Allocator0>& A,
9094  LapackInfo& info)
9095  {
9096  int m = A.GetM();
9097  char uplo('U'); char diag = DiagA.Char();
9098  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9099  &info.GetInfoRef());
9100 
9101 #ifdef SELDON_LAPACK_CHECK_INFO
9102  if (info.GetInfo() != 0)
9103  throw LapackError(info.GetInfo(), "GetInverse",
9104  "The matrix is inversible ? ");
9105 #endif
9106 
9107  }
9108 
9109 
9110  template <class Prop0, class Allocator0>
9111  void GetInverse(const SeldonDiag& DiagA,
9112  Matrix<double, Prop0, ColUpTriang, Allocator0>& A,
9113  LapackInfo& info)
9114  {
9115  int m = A.GetM();
9116  char uplo('U'); char diag = DiagA.Char();
9117  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9118  &info.GetInfoRef());
9119 
9120 #ifdef SELDON_LAPACK_CHECK_INFO
9121  if (info.GetInfo() != 0)
9122  throw LapackError(info.GetInfo(), "GetInverse",
9123  "The matrix is inversible ? ");
9124 #endif
9125 
9126  }
9127 
9128 
9129  template <class Prop0, class Allocator0>
9130  void GetInverse(const SeldonDiag& DiagA,
9131  Matrix<complex<float>, Prop0, ColUpTriang, Allocator0>& A,
9132  LapackInfo& info)
9133  {
9134  int m = A.GetM();
9135  char uplo('U'); char diag = DiagA.Char();
9136  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9137  &info.GetInfoRef());
9138 
9139 #ifdef SELDON_LAPACK_CHECK_INFO
9140  if (info.GetInfo() != 0)
9141  throw LapackError(info.GetInfo(), "GetInverse",
9142  "The matrix is inversible ? ");
9143 #endif
9144 
9145  }
9146 
9147 
9148  template <class Prop0, class Allocator0>
9149  void GetInverse(const SeldonDiag& DiagA,
9150  Matrix<complex<double>, Prop0, ColUpTriang, Allocator0>& A,
9151  LapackInfo& info)
9152  {
9153  int m = A.GetM();
9154  char uplo('U'); char diag = DiagA.Char();
9155  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9156  &info.GetInfoRef());
9157 
9158 #ifdef SELDON_LAPACK_CHECK_INFO
9159  if (info.GetInfo() != 0)
9160  throw LapackError(info.GetInfo(), "GetInverse",
9161  "The matrix is inversible ? ");
9162 #endif
9163 
9164  }
9165 
9166 
9167  /*** ColLoTriang and NonUnit ***/
9168 
9169 
9170  template <class Prop0, class Allocator0>
9171  void GetInverse(Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
9172  LapackInfo& info)
9173  {
9174  int m = A.GetM();
9175  char uplo('L'); char diag('N');
9176  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9177  &info.GetInfoRef());
9178 
9179 #ifdef SELDON_LAPACK_CHECK_INFO
9180  if (info.GetInfo() != 0)
9181  throw LapackError(info.GetInfo(), "GetInverse",
9182  "The matrix is inversible ? ");
9183 #endif
9184 
9185  }
9186 
9187 
9188  template <class Prop0, class Allocator0>
9189  void GetInverse(Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
9190  LapackInfo& info)
9191  {
9192  int m = A.GetM();
9193  char uplo('L'); char diag('N');
9194  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9195  &info.GetInfoRef());
9196 
9197 #ifdef SELDON_LAPACK_CHECK_INFO
9198  if (info.GetInfo() != 0)
9199  throw LapackError(info.GetInfo(), "GetInverse",
9200  "The matrix is inversible ? ");
9201 #endif
9202 
9203  }
9204 
9205 
9206  template <class Prop0, class Allocator0>
9207  void GetInverse(Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
9208  LapackInfo& info)
9209  {
9210  int m = A.GetM();
9211  char uplo('L'); char diag('N');
9212  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9213  &info.GetInfoRef());
9214 
9215 #ifdef SELDON_LAPACK_CHECK_INFO
9216  if (info.GetInfo() != 0)
9217  throw LapackError(info.GetInfo(), "GetInverse",
9218  "The matrix is inversible ? ");
9219 #endif
9220 
9221  }
9222 
9223 
9224  template <class Prop0, class Allocator0>
9225  void GetInverse(Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
9226  LapackInfo& info)
9227  {
9228  int m = A.GetM();
9229  char uplo('L'); char diag('N');
9230  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9231  &info.GetInfoRef());
9232 
9233 #ifdef SELDON_LAPACK_CHECK_INFO
9234  if (info.GetInfo() != 0)
9235  throw LapackError(info.GetInfo(), "GetInverse",
9236  "The matrix is inversible ? ");
9237 #endif
9238 
9239  }
9240 
9241 
9242  /*** ColLoTriang ***/
9243 
9244 
9245  template <class Prop0, class Allocator0>
9246  void GetInverse(const SeldonDiag& DiagA,
9247  Matrix<float, Prop0, ColLoTriang, Allocator0>& A,
9248  LapackInfo& info)
9249  {
9250  int m = A.GetM();
9251  char uplo('L'); char diag = DiagA.Char();
9252  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9253  &info.GetInfoRef());
9254 
9255 #ifdef SELDON_LAPACK_CHECK_INFO
9256  if (info.GetInfo() != 0)
9257  throw LapackError(info.GetInfo(), "GetInverse",
9258  "The matrix is inversible ? ");
9259 #endif
9260 
9261  }
9262 
9263 
9264  template <class Prop0, class Allocator0>
9265  void GetInverse(const SeldonDiag& DiagA,
9266  Matrix<double, Prop0, ColLoTriang, Allocator0>& A,
9267  LapackInfo& info)
9268  {
9269  int m = A.GetM();
9270  char uplo('L'); char diag = DiagA.Char();
9271  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9272  &info.GetInfoRef());
9273 
9274 #ifdef SELDON_LAPACK_CHECK_INFO
9275  if (info.GetInfo() != 0)
9276  throw LapackError(info.GetInfo(), "GetInverse",
9277  "The matrix is inversible ? ");
9278 #endif
9279 
9280  }
9281 
9282 
9283  template <class Prop0, class Allocator0>
9284  void GetInverse(const SeldonDiag& DiagA,
9285  Matrix<complex<float>, Prop0, ColLoTriang, Allocator0>& A,
9286  LapackInfo& info)
9287  {
9288  int m = A.GetM();
9289  char uplo('L'); char diag = DiagA.Char();
9290  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9291  &info.GetInfoRef());
9292 
9293 #ifdef SELDON_LAPACK_CHECK_INFO
9294  if (info.GetInfo() != 0)
9295  throw LapackError(info.GetInfo(), "GetInverse",
9296  "The matrix is inversible ? ");
9297 #endif
9298 
9299  }
9300 
9301 
9302  template <class Prop0, class Allocator0>
9303  void GetInverse(const SeldonDiag& DiagA,
9304  Matrix<complex<double>, Prop0, ColLoTriang, Allocator0>& A,
9305  LapackInfo& info)
9306  {
9307  int m = A.GetM();
9308  char uplo('L'); char diag = DiagA.Char();
9309  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9310  &info.GetInfoRef());
9311 
9312 #ifdef SELDON_LAPACK_CHECK_INFO
9313  if (info.GetInfo() != 0)
9314  throw LapackError(info.GetInfo(), "GetInverse",
9315  "The matrix is inversible ? ");
9316 #endif
9317 
9318  }
9319 
9320 
9321  /*** ColUpTriangPacked and NonUnit ***/
9322 
9323 
9324  template <class Prop0, class Allocator0>
9325  void GetInverse(Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
9326  LapackInfo& info)
9327  {
9328  int m = A.GetM();
9329  char uplo('U'); char diag('N');
9330  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9331 
9332 #ifdef SELDON_LAPACK_CHECK_INFO
9333  if (info.GetInfo() != 0)
9334  throw LapackError(info.GetInfo(), "GetInverse",
9335  "The matrix is inversible ? ");
9336 #endif
9337 
9338  }
9339 
9340 
9341  template <class Prop0, class Allocator0>
9342  void GetInverse(Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
9343  LapackInfo& info)
9344  {
9345  int m = A.GetM();
9346  char uplo('U'); char diag('N');
9347  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9348 
9349 #ifdef SELDON_LAPACK_CHECK_INFO
9350  if (info.GetInfo() != 0)
9351  throw LapackError(info.GetInfo(), "GetInverse",
9352  "The matrix is inversible ? ");
9353 #endif
9354 
9355  }
9356 
9357 
9358  template <class Prop0, class Allocator0>
9359  void GetInverse(Matrix<complex<float>, Prop0, ColUpTriangPacked,
9360  Allocator0>& A,
9361  LapackInfo& info)
9362  {
9363  int m = A.GetM();
9364  char uplo('U'); char diag('N');
9365  ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
9366 
9367 #ifdef SELDON_LAPACK_CHECK_INFO
9368  if (info.GetInfo() != 0)
9369  throw LapackError(info.GetInfo(), "GetInverse",
9370  "The matrix is inversible ? ");
9371 #endif
9372 
9373  }
9374 
9375 
9376  template <class Prop0, class Allocator0>
9377  void GetInverse(Matrix<complex<double>, Prop0, ColUpTriangPacked,
9378  Allocator0>& A,
9379  LapackInfo& info)
9380  {
9381  int m = A.GetM();
9382  char uplo('U'); char diag('N');
9383  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
9384  &info.GetInfoRef());
9385 
9386 #ifdef SELDON_LAPACK_CHECK_INFO
9387  if (info.GetInfo() != 0)
9388  throw LapackError(info.GetInfo(), "GetInverse",
9389  "The matrix is inversible ? ");
9390 #endif
9391 
9392  }
9393 
9394 
9395  /*** ColUpTriangPacked ***/
9396 
9397 
9398  template <class Prop0, class Allocator0>
9399  void GetInverse(const SeldonDiag& DiagA,
9400  Matrix<float, Prop0, ColUpTriangPacked, Allocator0>& A,
9401  LapackInfo& info)
9402  {
9403  int m = A.GetM();
9404  char uplo('U'); char diag = DiagA.Char();
9405  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9406 
9407 #ifdef SELDON_LAPACK_CHECK_INFO
9408  if (info.GetInfo() != 0)
9409  throw LapackError(info.GetInfo(), "GetInverse",
9410  "The matrix is inversible ? ");
9411 #endif
9412 
9413  }
9414 
9415 
9416  template <class Prop0, class Allocator0>
9417  void GetInverse(const SeldonDiag& DiagA,
9418  Matrix<double, Prop0, ColUpTriangPacked, Allocator0>& A,
9419  LapackInfo& info)
9420  {
9421  int m = A.GetM();
9422  char uplo('U'); char diag = DiagA.Char();
9423  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9424 
9425 #ifdef SELDON_LAPACK_CHECK_INFO
9426  if (info.GetInfo() != 0)
9427  throw LapackError(info.GetInfo(), "GetInverse",
9428  "The matrix is inversible ? ");
9429 #endif
9430 
9431  }
9432 
9433 
9434  template <class Prop0, class Allocator0>
9435  void GetInverse(const SeldonDiag& DiagA,
9436  Matrix<complex<float>, Prop0, ColUpTriangPacked,
9437  Allocator0>& A,
9438  LapackInfo& info)
9439  {
9440  int m = A.GetM();
9441  char uplo('U'); char diag = DiagA.Char();
9442  ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
9443 
9444 #ifdef SELDON_LAPACK_CHECK_INFO
9445  if (info.GetInfo() != 0)
9446  throw LapackError(info.GetInfo(), "GetInverse",
9447  "The matrix is inversible ? ");
9448 #endif
9449 
9450  }
9451 
9452 
9453  template <class Prop0, class Allocator0>
9454  void GetInverse(const SeldonDiag& DiagA,
9455  Matrix<complex<double>, Prop0, ColUpTriangPacked,
9456  Allocator0>& A,
9457  LapackInfo& info)
9458  {
9459  int m = A.GetM();
9460  char uplo('U'); char diag = DiagA.Char();
9461  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
9462  &info.GetInfoRef());
9463 
9464 #ifdef SELDON_LAPACK_CHECK_INFO
9465  if (info.GetInfo() != 0)
9466  throw LapackError(info.GetInfo(), "GetInverse",
9467  "The matrix is inversible ? ");
9468 #endif
9469 
9470  }
9471 
9472 
9473  /*** ColLoTriangPacked and NonUnit ***/
9474 
9475 
9476  template <class Prop0, class Allocator0>
9477  void GetInverse(Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
9478  LapackInfo& info)
9479  {
9480  int m = A.GetM();
9481  char uplo('L'); char diag('N');
9482  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9483 
9484 #ifdef SELDON_LAPACK_CHECK_INFO
9485  if (info.GetInfo() != 0)
9486  throw LapackError(info.GetInfo(), "GetInverse",
9487  "The matrix is inversible ? ");
9488 #endif
9489 
9490  }
9491 
9492 
9493  template <class Prop0, class Allocator0>
9494  void GetInverse(Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
9495  LapackInfo& info)
9496  {
9497  int m = A.GetM();
9498  char uplo('L'); char diag('N');
9499  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9500 
9501 #ifdef SELDON_LAPACK_CHECK_INFO
9502  if (info.GetInfo() != 0)
9503  throw LapackError(info.GetInfo(), "GetInverse",
9504  "The matrix is inversible ? ");
9505 #endif
9506 
9507  }
9508 
9509 
9510  template <class Prop0, class Allocator0>
9511  void GetInverse(Matrix<complex<float>, Prop0, ColLoTriangPacked,
9512  Allocator0>& A,
9513  LapackInfo& info)
9514  {
9515  int m = A.GetM();
9516  char uplo('L'); char diag('N');
9517  ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
9518  &info.GetInfoRef());
9519 
9520 #ifdef SELDON_LAPACK_CHECK_INFO
9521  if (info.GetInfo() != 0)
9522  throw LapackError(info.GetInfo(), "GetInverse",
9523  "The matrix is inversible ? ");
9524 #endif
9525 
9526  }
9527 
9528 
9529  template <class Prop0, class Allocator0>
9530  void GetInverse(Matrix<complex<double>, Prop0, ColLoTriangPacked,
9531  Allocator0>& A,
9532  LapackInfo& info)
9533  {
9534  int m = A.GetM();
9535  char uplo('L'); char diag('N');
9536  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
9537  &info.GetInfoRef());
9538 
9539 #ifdef SELDON_LAPACK_CHECK_INFO
9540  if (info.GetInfo() != 0)
9541  throw LapackError(info.GetInfo(), "GetInverse",
9542  "The matrix is inversible ? ");
9543 #endif
9544 
9545  }
9546 
9547 
9548  /*** ColLoTriangPacked ***/
9549 
9550 
9551  template <class Prop0, class Allocator0>
9552  void GetInverse(const SeldonDiag& DiagA,
9553  Matrix<float, Prop0, ColLoTriangPacked, Allocator0>& A,
9554  LapackInfo& info)
9555  {
9556  int m = A.GetM();
9557  char uplo('L'); char diag = DiagA.Char();
9558  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9559 
9560 #ifdef SELDON_LAPACK_CHECK_INFO
9561  if (info.GetInfo() != 0)
9562  throw LapackError(info.GetInfo(), "GetInverse",
9563  "The matrix is inversible ? ");
9564 #endif
9565 
9566  }
9567 
9568 
9569  template <class Prop0, class Allocator0>
9570  void GetInverse(const SeldonDiag& DiagA,
9571  Matrix<double, Prop0, ColLoTriangPacked, Allocator0>& A,
9572  LapackInfo& info)
9573  {
9574  int m = A.GetM();
9575  char uplo('L'); char diag = DiagA.Char();
9576  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9577 
9578 #ifdef SELDON_LAPACK_CHECK_INFO
9579  if (info.GetInfo() != 0)
9580  throw LapackError(info.GetInfo(), "GetInverse",
9581  "The matrix is inversible ? ");
9582 #endif
9583 
9584  }
9585 
9586 
9587  template <class Prop0, class Allocator0>
9588  void GetInverse(const SeldonDiag& DiagA,
9589  Matrix<complex<float>, Prop0, ColLoTriangPacked,
9590  Allocator0>& A,
9591  LapackInfo& info)
9592  {
9593  int m = A.GetM();
9594  char uplo('L'); char diag = DiagA.Char();
9595  ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
9596  &info.GetInfoRef());
9597 
9598 #ifdef SELDON_LAPACK_CHECK_INFO
9599  if (info.GetInfo() != 0)
9600  throw LapackError(info.GetInfo(), "GetInverse",
9601  "The matrix is inversible ? ");
9602 #endif
9603 
9604  }
9605 
9606 
9607  template <class Prop0, class Allocator0>
9608  void GetInverse(const SeldonDiag& DiagA,
9609  Matrix<complex<double>, Prop0, ColLoTriangPacked,
9610  Allocator0>& A,
9611  LapackInfo& info)
9612  {
9613  int m = A.GetM();
9614  char uplo('L'); char diag = DiagA.Char();
9615  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
9616  &info.GetInfoRef());
9617 
9618 #ifdef SELDON_LAPACK_CHECK_INFO
9619  if (info.GetInfo() != 0)
9620  throw LapackError(info.GetInfo(), "GetInverse",
9621  "The matrix is inversible ? ");
9622 #endif
9623 
9624  }
9625 
9626 
9627  /*** RowUpTriang and NonUnit ***/
9628 
9629 
9630  template <class Prop0, class Allocator0>
9631  void GetInverse(Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
9632  LapackInfo& info)
9633  {
9634  int m = A.GetM();
9635  char uplo('L'); char diag('N');
9636  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9637  &info.GetInfoRef());
9638 
9639 #ifdef SELDON_LAPACK_CHECK_INFO
9640  if (info.GetInfo() != 0)
9641  throw LapackError(info.GetInfo(), "GetInverse",
9642  "The matrix is inversible ? ");
9643 #endif
9644 
9645  }
9646 
9647 
9648  template <class Prop0, class Allocator0>
9649  void GetInverse(Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
9650  LapackInfo& info)
9651  {
9652  int m = A.GetM();
9653  char uplo('L'); char diag('N');
9654  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9655  &info.GetInfoRef());
9656 
9657 #ifdef SELDON_LAPACK_CHECK_INFO
9658  if (info.GetInfo() != 0)
9659  throw LapackError(info.GetInfo(), "GetInverse",
9660  "The matrix is inversible ? ");
9661 #endif
9662 
9663  }
9664 
9665 
9666  template <class Prop0, class Allocator0>
9667  void GetInverse(Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
9668  LapackInfo& info)
9669  {
9670  int m = A.GetM();
9671  char uplo('L'); char diag('N');
9672  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9673  &info.GetInfoRef());
9674 
9675 #ifdef SELDON_LAPACK_CHECK_INFO
9676  if (info.GetInfo() != 0)
9677  throw LapackError(info.GetInfo(), "GetInverse",
9678  "The matrix is inversible ? ");
9679 #endif
9680 
9681  }
9682 
9683 
9684  template <class Prop0, class Allocator0>
9685  void GetInverse(Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
9686  LapackInfo& info)
9687  {
9688  int m = A.GetM();
9689  char uplo('L'); char diag('N');
9690  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9691  &info.GetInfoRef());
9692 
9693 #ifdef SELDON_LAPACK_CHECK_INFO
9694  if (info.GetInfo() != 0)
9695  throw LapackError(info.GetInfo(), "GetInverse",
9696  "The matrix is inversible ? ");
9697 #endif
9698 
9699  }
9700 
9701 
9702  /*** RowUpTriang ***/
9703 
9704 
9705  template <class Prop0, class Allocator0>
9706  void GetInverse(const SeldonDiag& DiagA,
9707  Matrix<float, Prop0, RowUpTriang, Allocator0>& A,
9708  LapackInfo& info)
9709  {
9710  int m = A.GetM();
9711  char uplo('L'); char diag = DiagA.Char();
9712  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9713  &info.GetInfoRef());
9714 
9715 #ifdef SELDON_LAPACK_CHECK_INFO
9716  if (info.GetInfo() != 0)
9717  throw LapackError(info.GetInfo(), "GetInverse",
9718  "The matrix is inversible ? ");
9719 #endif
9720 
9721  }
9722 
9723 
9724  template <class Prop0, class Allocator0>
9725  void GetInverse(const SeldonDiag& DiagA,
9726  Matrix<double, Prop0, RowUpTriang, Allocator0>& A,
9727  LapackInfo& info)
9728  {
9729  int m = A.GetM();
9730  char uplo('L'); char diag = DiagA.Char();
9731  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9732  &info.GetInfoRef());
9733 
9734 #ifdef SELDON_LAPACK_CHECK_INFO
9735  if (info.GetInfo() != 0)
9736  throw LapackError(info.GetInfo(), "GetInverse",
9737  "The matrix is inversible ? ");
9738 #endif
9739 
9740  }
9741 
9742 
9743  template <class Prop0, class Allocator0>
9744  void GetInverse(const SeldonDiag& DiagA,
9745  Matrix<complex<float>, Prop0, RowUpTriang, Allocator0>& A,
9746  LapackInfo& info)
9747  {
9748  int m = A.GetM();
9749  char uplo('L'); char diag = DiagA.Char();
9750  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9751  &info.GetInfoRef());
9752 
9753 #ifdef SELDON_LAPACK_CHECK_INFO
9754  if (info.GetInfo() != 0)
9755  throw LapackError(info.GetInfo(), "GetInverse",
9756  "The matrix is inversible ? ");
9757 #endif
9758 
9759  }
9760 
9761 
9762  template <class Prop0, class Allocator0>
9763  void GetInverse(const SeldonDiag& DiagA,
9764  Matrix<complex<double>, Prop0, RowUpTriang, Allocator0>& A,
9765  LapackInfo& info)
9766  {
9767  int m = A.GetM();
9768  char uplo('L'); char diag = DiagA.Char();
9769  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9770  &info.GetInfoRef());
9771 
9772 #ifdef SELDON_LAPACK_CHECK_INFO
9773  if (info.GetInfo() != 0)
9774  throw LapackError(info.GetInfo(), "GetInverse",
9775  "The matrix is inversible ? ");
9776 #endif
9777 
9778  }
9779 
9780 
9781  /*** RowLoTriang and NonUnit ***/
9782 
9783 
9784  template <class Prop0, class Allocator0>
9785  void GetInverse(Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
9786  LapackInfo& info)
9787  {
9788  int m = A.GetM();
9789  char uplo('U'); char diag('N');
9790  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9791  &info.GetInfoRef());
9792 
9793 #ifdef SELDON_LAPACK_CHECK_INFO
9794  if (info.GetInfo() != 0)
9795  throw LapackError(info.GetInfo(), "GetInverse",
9796  "The matrix is inversible ? ");
9797 #endif
9798 
9799  }
9800 
9801 
9802  template <class Prop0, class Allocator0>
9803  void GetInverse(Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
9804  LapackInfo& info)
9805  {
9806  int m = A.GetM();
9807  char uplo('U'); char diag('N');
9808  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9809  &info.GetInfoRef());
9810 
9811 #ifdef SELDON_LAPACK_CHECK_INFO
9812  if (info.GetInfo() != 0)
9813  throw LapackError(info.GetInfo(), "GetInverse",
9814  "The matrix is inversible ? ");
9815 #endif
9816 
9817  }
9818 
9819 
9820  template <class Prop0, class Allocator0>
9821  void GetInverse(Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
9822  LapackInfo& info)
9823  {
9824  int m = A.GetM();
9825  char uplo('U'); char diag('N');
9826  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9827  &info.GetInfoRef());
9828 
9829 #ifdef SELDON_LAPACK_CHECK_INFO
9830  if (info.GetInfo() != 0)
9831  throw LapackError(info.GetInfo(), "GetInverse",
9832  "The matrix is inversible ? ");
9833 #endif
9834 
9835  }
9836 
9837 
9838  template <class Prop0, class Allocator0>
9839  void GetInverse(Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
9840  LapackInfo& info)
9841  {
9842  int m = A.GetM();
9843  char uplo('U'); char diag('N');
9844  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9845  &info.GetInfoRef());
9846 
9847 #ifdef SELDON_LAPACK_CHECK_INFO
9848  if (info.GetInfo() != 0)
9849  throw LapackError(info.GetInfo(), "GetInverse",
9850  "The matrix is inversible ? ");
9851 #endif
9852 
9853  }
9854 
9855 
9856  /*** RowLoTriang ***/
9857 
9858 
9859  template <class Prop0, class Allocator0>
9860  void GetInverse(const SeldonDiag& DiagA,
9861  Matrix<float, Prop0, RowLoTriang, Allocator0>& A,
9862  LapackInfo& info)
9863  {
9864  int m = A.GetM();
9865  char uplo('U'); char diag = DiagA.Char();
9866  strtri_(&uplo, &diag, &m, A.GetData(), &m,
9867  &info.GetInfoRef());
9868 
9869 #ifdef SELDON_LAPACK_CHECK_INFO
9870  if (info.GetInfo() != 0)
9871  throw LapackError(info.GetInfo(), "GetInverse",
9872  "The matrix is inversible ? ");
9873 #endif
9874 
9875  }
9876 
9877 
9878  template <class Prop0, class Allocator0>
9879  void GetInverse(const SeldonDiag& DiagA,
9880  Matrix<double, Prop0, RowLoTriang, Allocator0>& A,
9881  LapackInfo& info)
9882  {
9883  int m = A.GetM();
9884  char uplo('U'); char diag = DiagA.Char();
9885  dtrtri_(&uplo, &diag, &m, A.GetData(), &m,
9886  &info.GetInfoRef());
9887 
9888 #ifdef SELDON_LAPACK_CHECK_INFO
9889  if (info.GetInfo() != 0)
9890  throw LapackError(info.GetInfo(), "GetInverse",
9891  "The matrix is inversible ? ");
9892 #endif
9893 
9894  }
9895 
9896 
9897  template <class Prop0, class Allocator0>
9898  void GetInverse(const SeldonDiag& DiagA,
9899  Matrix<complex<float>, Prop0, RowLoTriang, Allocator0>& A,
9900  LapackInfo& info)
9901  {
9902  int m = A.GetM();
9903  char uplo('U'); char diag = DiagA.Char();
9904  ctrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9905  &info.GetInfoRef());
9906 
9907 #ifdef SELDON_LAPACK_CHECK_INFO
9908  if (info.GetInfo() != 0)
9909  throw LapackError(info.GetInfo(), "GetInverse",
9910  "The matrix is inversible ? ");
9911 #endif
9912 
9913  }
9914 
9915 
9916  template <class Prop0, class Allocator0>
9917  void GetInverse(const SeldonDiag& DiagA,
9918  Matrix<complex<double>, Prop0, RowLoTriang, Allocator0>& A,
9919  LapackInfo& info)
9920  {
9921  int m = A.GetM();
9922  char uplo('U'); char diag = DiagA.Char();
9923  ztrtri_(&uplo, &diag, &m, A.GetDataVoid(), &m,
9924  &info.GetInfoRef());
9925 
9926 #ifdef SELDON_LAPACK_CHECK_INFO
9927  if (info.GetInfo() != 0)
9928  throw LapackError(info.GetInfo(), "GetInverse",
9929  "The matrix is inversible ? ");
9930 #endif
9931 
9932  }
9933 
9934 
9935  /*** RowUpTriangPacked and NonUnit ***/
9936 
9937 
9938  template <class Prop0, class Allocator0>
9939  void GetInverse(Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
9940  LapackInfo& info)
9941  {
9942  int m = A.GetM();
9943  char uplo('L'); char diag('N');
9944  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9945 
9946 #ifdef SELDON_LAPACK_CHECK_INFO
9947  if (info.GetInfo() != 0)
9948  throw LapackError(info.GetInfo(), "GetInverse",
9949  "The matrix is inversible ? ");
9950 #endif
9951 
9952  }
9953 
9954 
9955  template <class Prop0, class Allocator0>
9956  void GetInverse(Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
9957  LapackInfo& info)
9958  {
9959  int m = A.GetM();
9960  char uplo('L'); char diag('N');
9961  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
9962 
9963 #ifdef SELDON_LAPACK_CHECK_INFO
9964  if (info.GetInfo() != 0)
9965  throw LapackError(info.GetInfo(), "GetInverse",
9966  "The matrix is inversible ? ");
9967 #endif
9968 
9969  }
9970 
9971 
9972  template <class Prop0, class Allocator0>
9973  void GetInverse(Matrix<complex<float>, Prop0, RowUpTriangPacked,
9974  Allocator0>& A,
9975  LapackInfo& info)
9976  {
9977  int m = A.GetM();
9978  char uplo('L'); char diag('N');
9979  ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
9980 
9981 #ifdef SELDON_LAPACK_CHECK_INFO
9982  if (info.GetInfo() != 0)
9983  throw LapackError(info.GetInfo(), "GetInverse",
9984  "The matrix is inversible ? ");
9985 #endif
9986 
9987  }
9988 
9989 
9990  template <class Prop0, class Allocator0>
9991  void GetInverse(Matrix<complex<double>, Prop0, RowUpTriangPacked,
9992  Allocator0>& A,
9993  LapackInfo& info)
9994  {
9995  int m = A.GetM();
9996  char uplo('L'); char diag('N');
9997  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
9998  &info.GetInfoRef());
9999 
10000 #ifdef SELDON_LAPACK_CHECK_INFO
10001  if (info.GetInfo() != 0)
10002  throw LapackError(info.GetInfo(), "GetInverse",
10003  "The matrix is inversible ? ");
10004 #endif
10005 
10006  }
10007 
10008 
10009  /*** RowUpTriangPacked ***/
10010 
10011 
10012  template <class Prop0, class Allocator0>
10013  void GetInverse(const SeldonDiag& DiagA,
10014  Matrix<float, Prop0, RowUpTriangPacked, Allocator0>& A,
10015  LapackInfo& info)
10016  {
10017  int m = A.GetM();
10018  char uplo('L'); char diag = DiagA.Char();
10019  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10020 
10021 #ifdef SELDON_LAPACK_CHECK_INFO
10022  if (info.GetInfo() != 0)
10023  throw LapackError(info.GetInfo(), "GetInverse",
10024  "The matrix is inversible ? ");
10025 #endif
10026 
10027  }
10028 
10029 
10030  template <class Prop0, class Allocator0>
10031  void GetInverse(const SeldonDiag& DiagA,
10032  Matrix<double, Prop0, RowUpTriangPacked, Allocator0>& A,
10033  LapackInfo& info)
10034  {
10035  int m = A.GetM();
10036  char uplo('L'); char diag = DiagA.Char();
10037  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10038 
10039 #ifdef SELDON_LAPACK_CHECK_INFO
10040  if (info.GetInfo() != 0)
10041  throw LapackError(info.GetInfo(), "GetInverse",
10042  "The matrix is inversible ? ");
10043 #endif
10044 
10045  }
10046 
10047 
10048  template <class Prop0, class Allocator0>
10049  void GetInverse(const SeldonDiag& DiagA,
10050  Matrix<complex<float>, Prop0, RowUpTriangPacked,
10051  Allocator0>& A,
10052  LapackInfo& info)
10053  {
10054  int m = A.GetM();
10055  char uplo('L'); char diag = DiagA.Char();
10056  ctptri_(&uplo, &diag, &m, A.GetDataVoid(), &info.GetInfoRef());
10057 
10058 #ifdef SELDON_LAPACK_CHECK_INFO
10059  if (info.GetInfo() != 0)
10060  throw LapackError(info.GetInfo(), "GetInverse",
10061  "The matrix is inversible ? ");
10062 #endif
10063 
10064  }
10065 
10066 
10067  template <class Prop0, class Allocator0>
10068  void GetInverse(const SeldonDiag& DiagA,
10069  Matrix<complex<double>, Prop0, RowUpTriangPacked,
10070  Allocator0>& A,
10071  LapackInfo& info)
10072  {
10073  int m = A.GetM();
10074  char uplo('L'); char diag = DiagA.Char();
10075  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
10076  &info.GetInfoRef());
10077 
10078 #ifdef SELDON_LAPACK_CHECK_INFO
10079  if (info.GetInfo() != 0)
10080  throw LapackError(info.GetInfo(), "GetInverse",
10081  "The matrix is inversible ? ");
10082 #endif
10083 
10084  }
10085 
10086 
10087  /*** RowLoTriangPacked and NonUnit ***/
10088 
10089 
10090  template <class Prop0, class Allocator0>
10091  void GetInverse(Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
10092  LapackInfo& info)
10093  {
10094  int m = A.GetM();
10095  char uplo('U'); char diag('N');
10096  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10097 
10098 #ifdef SELDON_LAPACK_CHECK_INFO
10099  if (info.GetInfo() != 0)
10100  throw LapackError(info.GetInfo(), "GetInverse",
10101  "The matrix is inversible ? ");
10102 #endif
10103 
10104  }
10105 
10106 
10107  template <class Prop0, class Allocator0>
10108  void GetInverse(Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
10109  LapackInfo& info)
10110  {
10111  int m = A.GetM();
10112  char uplo('U'); char diag('N');
10113  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10114 
10115 #ifdef SELDON_LAPACK_CHECK_INFO
10116  if (info.GetInfo() != 0)
10117  throw LapackError(info.GetInfo(), "GetInverse",
10118  "The matrix is inversible ? ");
10119 #endif
10120 
10121  }
10122 
10123 
10124  template <class Prop0, class Allocator0>
10125  void GetInverse(Matrix<complex<float>, Prop0, RowLoTriangPacked,
10126  Allocator0>& A,
10127  LapackInfo& info)
10128  {
10129  int m = A.GetM();
10130  char uplo('U'); char diag('N');
10131  ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
10132  &info.GetInfoRef());
10133 
10134 #ifdef SELDON_LAPACK_CHECK_INFO
10135  if (info.GetInfo() != 0)
10136  throw LapackError(info.GetInfo(), "GetInverse",
10137  "The matrix is inversible ? ");
10138 #endif
10139 
10140  }
10141 
10142 
10143  template <class Prop0, class Allocator0>
10144  void GetInverse(Matrix<complex<double>, Prop0, RowLoTriangPacked,
10145  Allocator0>& A,
10146  LapackInfo& info)
10147  {
10148  int m = A.GetM();
10149  char uplo('U'); char diag('N');
10150  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
10151  &info.GetInfoRef());
10152 
10153 #ifdef SELDON_LAPACK_CHECK_INFO
10154  if (info.GetInfo() != 0)
10155  throw LapackError(info.GetInfo(), "GetInverse",
10156  "The matrix is inversible ? ");
10157 #endif
10158 
10159  }
10160 
10161 
10162  /*** RowLoTriangPacked ***/
10163 
10164 
10165  template <class Prop0, class Allocator0>
10166  void GetInverse(const SeldonDiag& DiagA,
10167  Matrix<float, Prop0, RowLoTriangPacked, Allocator0>& A,
10168  LapackInfo& info)
10169  {
10170  int m = A.GetM();
10171  char uplo('U'); char diag = DiagA.Char();
10172  stptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10173 
10174 #ifdef SELDON_LAPACK_CHECK_INFO
10175  if (info.GetInfo() != 0)
10176  throw LapackError(info.GetInfo(), "GetInverse",
10177  "The matrix is inversible ? ");
10178 #endif
10179 
10180  }
10181 
10182 
10183  template <class Prop0, class Allocator0>
10184  void GetInverse(const SeldonDiag& DiagA,
10185  Matrix<double, Prop0, RowLoTriangPacked, Allocator0>& A,
10186  LapackInfo& info)
10187  {
10188  int m = A.GetM();
10189  char uplo('U'); char diag = DiagA.Char();
10190  dtptri_(&uplo, &diag, &m, A.GetData(), &info.GetInfoRef());
10191 
10192 #ifdef SELDON_LAPACK_CHECK_INFO
10193  if (info.GetInfo() != 0)
10194  throw LapackError(info.GetInfo(), "GetInverse",
10195  "The matrix is inversible ? ");
10196 #endif
10197 
10198  }
10199 
10200 
10201  template <class Prop0, class Allocator0>
10202  void GetInverse(const SeldonDiag& DiagA,
10203  Matrix<complex<float>, Prop0, RowLoTriangPacked,
10204  Allocator0>& A,
10205  LapackInfo& info)
10206  {
10207  int m = A.GetM();
10208  char uplo('U'); char diag = DiagA.Char();
10209  ctptri_(&uplo, &diag, &m, A.GetDataVoid(),
10210  &info.GetInfoRef());
10211 
10212 #ifdef SELDON_LAPACK_CHECK_INFO
10213  if (info.GetInfo() != 0)
10214  throw LapackError(info.GetInfo(), "GetInverse",
10215  "The matrix is inversible ? ");
10216 #endif
10217 
10218  }
10219 
10220 
10221  template <class Prop0, class Allocator0>
10222  void GetInverse(const SeldonDiag& DiagA,
10223  Matrix<complex<double>, Prop0, RowLoTriangPacked,
10224  Allocator0>& A,
10225  LapackInfo& info)
10226  {
10227  int m = A.GetM();
10228  char uplo('U'); char diag = DiagA.Char();
10229  ztptri_(&uplo, &diag, &m, A.GetDataVoid(),
10230  &info.GetInfoRef());
10231 
10232 #ifdef SELDON_LAPACK_CHECK_INFO
10233  if (info.GetInfo() != 0)
10234  throw LapackError(info.GetInfo(), "GetInverse",
10235  "The matrix is inversible ? ");
10236 #endif
10237 
10238  }
10239 
10240 
10241  // GetInverse //
10243 
10244 
10245 
10247  // GetScalingFactors //
10248 
10249 
10250  /*** ColMajor ***/
10251 
10252 
10253  template<class Prop0, class Allocator0,
10254  class Allocator1, class Allocator2>
10255  void GetScalingFactors(const Matrix<float, Prop0, ColMajor, Allocator0>& A,
10256  Vector<float, VectFull, Allocator1>& row_scale,
10257  Vector<float, VectFull, Allocator2>& col_scale,
10258  float& row_condition_number,
10259  float& col_condition_number, float& amax,
10260  LapackInfo& info)
10261  {
10262 
10263 #ifdef SELDON_CHECK_DIMENSIONS
10264  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10265  + string(" rowcnd, colcnd, amax)"));
10266 #endif
10267 
10268  int m = A.GetM(), n = A.GetN();
10269  int lda = A.GetLD();
10270  sgeequ_(&m, &n, A.GetData(), &lda, row_scale.GetData(),
10271  col_scale.GetData(), &row_condition_number, &col_condition_number,
10272  &amax, &info.GetInfoRef());
10273  }
10274 
10275 
10276  template<class Prop0, class Allocator0,
10277  class Allocator1, class Allocator2>
10278  void GetScalingFactors(const Matrix<double, Prop0, ColMajor, Allocator0>& A,
10279  Vector<double, VectFull, Allocator1>& row_scale,
10280  Vector<double, VectFull, Allocator2>& col_scale,
10281  double& row_condition_number,
10282  double& col_condition_number, double& amax,
10283  LapackInfo& info)
10284  {
10285 
10286 #ifdef SELDON_CHECK_DIMENSIONS
10287  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10288  + string(" rowcnd, colcnd, amax)"));
10289 #endif
10290 
10291  int m = A.GetM(), n = A.GetN();
10292  int lda = A.GetLD();
10293  dgeequ_(&m, &n, A.GetData(), &lda, row_scale.GetData(),
10294  col_scale.GetData(), &row_condition_number, &col_condition_number,
10295  &amax, &info.GetInfoRef());
10296  }
10297 
10298 
10299  template<class Prop0, class Allocator0,
10300  class Allocator1, class Allocator2>
10301  void GetScalingFactors(const Matrix<complex<float>, Prop0, ColMajor,
10302  Allocator0>& A,
10303  Vector<float, VectFull, Allocator1>& row_scale,
10304  Vector<float, VectFull, Allocator2>& col_scale,
10305  float& row_condition_number,
10306  float& col_condition_number, float& amax,
10307  LapackInfo& info)
10308  {
10309 
10310 #ifdef SELDON_CHECK_DIMENSIONS
10311  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10312  +string("rowcnd, colcnd, amax)"));
10313 #endif
10314 
10315  int m = A.GetM(), n = A.GetN();
10316  int lda = A.GetLD();
10317  cgeequ_(&m, &n, A.GetDataVoid(), &lda, row_scale.GetData(),
10318  col_scale.GetData(), &row_condition_number,
10319  &col_condition_number, &amax, &info.GetInfoRef());
10320  }
10321 
10322 
10323  template<class Prop0, class Allocator0,
10324  class Allocator1, class Allocator2>
10325  void GetScalingFactors(const Matrix<complex<double>, Prop0, ColMajor,
10326  Allocator0>& A,
10327  Vector<double, VectFull, Allocator1>& row_scale,
10328  Vector<double, VectFull, Allocator2>& col_scale,
10329  double& row_condition_number,
10330  double& col_condition_number, double& amax,
10331  LapackInfo& info)
10332  {
10333 
10334 #ifdef SELDON_CHECK_DIMENSIONS
10335  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10336  + string("rowcnd, colcnd, amax)"));
10337 #endif
10338 
10339  int m = A.GetM(), n = A.GetN();
10340  int lda = A.GetLD();
10341  zgeequ_(&m, &n, A.GetDataVoid(), &lda, row_scale.GetData(),
10342  col_scale.GetData(), &row_condition_number,
10343  &col_condition_number, &amax, &info.GetInfoRef());
10344  }
10345 
10346 
10347  /*** RowMajor ***/
10348 
10349 
10350  template<class Prop0, class Allocator0,
10351  class Allocator1, class Allocator2>
10352  void GetScalingFactors(const Matrix<float, Prop0, RowMajor, Allocator0>& A,
10353  Vector<float, VectFull, Allocator1>& row_scale,
10354  Vector<float, VectFull, Allocator2>& col_scale,
10355  float& row_condition_number,
10356  float& col_condition_number, float& amax,
10357  LapackInfo& info)
10358  {
10359 
10360 #ifdef SELDON_CHECK_DIMENSIONS
10361  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10362  + string(" rowcnd, colcnd, amax)"));
10363 #endif
10364 
10365  int m = A.GetM(), n = A.GetN();
10366  int lda = A.GetLD();
10367  sgeequ_(&n, &m, A.GetData(), &lda, col_scale.GetData(),
10368  row_scale.GetData(), &col_condition_number, &row_condition_number,
10369  &amax, &info.GetInfoRef());
10370  }
10371 
10372 
10373  template<class Prop0, class Allocator0,
10374  class Allocator1, class Allocator2>
10375  void GetScalingFactors(const Matrix<double, Prop0, RowMajor, Allocator0>& A,
10376  Vector<double, VectFull, Allocator1>& row_scale,
10377  Vector<double, VectFull, Allocator2>& col_scale,
10378  double& row_condition_number,
10379  double& col_condition_number, double& amax,
10380  LapackInfo& info)
10381  {
10382 
10383 #ifdef SELDON_CHECK_DIMENSIONS
10384  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10385  + string(" rowcnd, colcnd, amax)"));
10386 #endif
10387 
10388  int m = A.GetM(), n = A.GetN();
10389  int lda = A.GetLD();
10390  dgeequ_(&n, &m, A.GetData(), &lda, col_scale.GetData(),
10391  row_scale.GetData(), &col_condition_number, &row_condition_number,
10392  &amax, &info.GetInfoRef());
10393  }
10394 
10395 
10396  template<class Prop0, class Allocator0,
10397  class Allocator1, class Allocator2>
10398  void GetScalingFactors(const Matrix<complex<float>, Prop0, RowMajor,
10399  Allocator0>& A,
10400  Vector<float, VectFull, Allocator1>& row_scale,
10401  Vector<float, VectFull, Allocator2>& col_scale,
10402  float& row_condition_number,
10403  float& col_condition_number, float& amax,
10404  LapackInfo& info)
10405  {
10406 
10407 #ifdef SELDON_CHECK_DIMENSIONS
10408  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y,")
10409  + string(" rowcnd, colcnd, amax)"));
10410 #endif
10411 
10412  int m = A.GetM(), n = A.GetN();
10413  int lda = A.GetLD();
10414  cgeequ_(&n, &m, A.GetDataVoid(), &lda, col_scale.GetData(),
10415  row_scale.GetData(), &col_condition_number,
10416  &row_condition_number, &amax, &info.GetInfoRef());
10417  }
10418 
10419 
10420  template<class Prop0, class Allocator0,
10421  class Allocator1, class Allocator2>
10422  void GetScalingFactors(const Matrix<complex<double>, Prop0, RowMajor,
10423  Allocator0>& A,
10424  Vector<double, VectFull, Allocator1>& row_scale,
10425  Vector<double, VectFull, Allocator2>& col_scale,
10426  double& row_condition_number,
10427  double& col_condition_number, double& amax,
10428  LapackInfo& info)
10429  {
10430 
10431 #ifdef SELDON_CHECK_DIMENSIONS
10432  CheckDim(A, col_scale, row_scale, string("GetScalingFactors(A, X, Y, ")
10433  + string("rowcnd, colcnd, amax)"));
10434 #endif
10435 
10436  int m = A.GetM(), n = A.GetN();
10437  int lda = A.GetLD();
10438  zgeequ_(&n, &m, A.GetDataVoid(), &lda, col_scale.GetData(),
10439  row_scale.GetData(), &col_condition_number,
10440  &row_condition_number, &amax, &info.GetInfoRef());
10441  }
10442 
10443 
10444  // GetScalingFactors //
10446 
10447 
10449  // GetCholesky //
10450 
10451 
10452  template<class Prop, class Allocator>
10453  void GetCholesky(Matrix<double, Prop, RowSymPacked, Allocator>& A,
10454  LapackInfo& info)
10455  {
10456  int n = A.GetN();
10457 #ifdef SELDON_CHECK_BOUNDS
10458  if (n <= 0)
10459  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10460 #endif
10461 
10462  char uplo('L');
10463  dpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef());
10464 
10465 #ifdef SELDON_LAPACK_CHECK_INFO
10466  if (info.GetInfo() != 0)
10467  throw LapackError(info.GetInfo(), "GetCholesky",
10468  "An error occured during the factorization.");
10469 #endif
10470 
10471  }
10472 
10473 
10474  template<class Prop, class Allocator>
10475  void GetCholesky(Matrix<double, Prop, ColSymPacked, Allocator>& A,
10476  LapackInfo& info)
10477  {
10478  int n = A.GetN();
10479 #ifdef SELDON_CHECK_BOUNDS
10480  if (n <= 0)
10481  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10482 #endif
10483 
10484  char uplo('U');
10485  dpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef());
10486 
10487 #ifdef SELDON_LAPACK_CHECK_INFO
10488  if (info.GetInfo() != 0)
10489  throw LapackError(info.GetInfo(), "GetCholesky",
10490  "An error occured during the factorization.");
10491 #endif
10492 
10493  }
10494 
10495 
10496  template<class Prop, class Allocator>
10497  void GetCholesky(Matrix<double, Prop, RowSym, Allocator>& A,
10498  LapackInfo& info)
10499  {
10500  int n = A.GetN();
10501 #ifdef SELDON_CHECK_BOUNDS
10502  if (n <= 0)
10503  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10504 #endif
10505 
10506  char uplo('L');
10507  dpotrf_(&uplo, &n, A.GetData(), &n, &info.GetInfoRef());
10508 
10509 #ifdef SELDON_LAPACK_CHECK_INFO
10510  if (info.GetInfo() != 0)
10511  throw LapackError(info.GetInfo(), "GetCholesky",
10512  "An error occured during the factorization.");
10513 #endif
10514 
10515  }
10516 
10517 
10518  template<class Prop, class Allocator>
10519  void GetCholesky(Matrix<double, Prop, ColSym, Allocator>& A,
10520  LapackInfo& info)
10521  {
10522  int n = A.GetN();
10523 #ifdef SELDON_CHECK_BOUNDS
10524  if (n <= 0)
10525  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10526 #endif
10527 
10528  char uplo('U');
10529  dpotrf_(&uplo, &n, A.GetData(), &n, &info.GetInfoRef());
10530 
10531 #ifdef SELDON_LAPACK_CHECK_INFO
10532  if (info.GetInfo() != 0)
10533  throw LapackError(info.GetInfo(), "GetCholesky",
10534  "An error occured during the factorization.");
10535 #endif
10536 
10537  }
10538 
10539 
10540  template<class Prop, class Allocator>
10541  void GetCholesky(Matrix<complex<double>, Prop, RowHermPacked, Allocator>& A,
10542  LapackInfo& info)
10543  {
10544  int n = A.GetN();
10545 #ifdef SELDON_CHECK_BOUNDS
10546  if (n <= 0)
10547  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10548 #endif
10549 
10550  char uplo('L');
10551  zpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef());
10552 
10553 #ifdef SELDON_LAPACK_CHECK_INFO
10554  if (info.GetInfo() != 0)
10555  throw LapackError(info.GetInfo(), "GetCholesky",
10556  "An error occured during the factorization.");
10557 #endif
10558 
10559  }
10560 
10561 
10562  template<class Prop, class Allocator>
10563  void GetCholesky(Matrix<complex<double>, Prop, ColHermPacked, Allocator>& A,
10564  LapackInfo& info)
10565  {
10566  int n = A.GetN();
10567 #ifdef SELDON_CHECK_BOUNDS
10568  if (n <= 0)
10569  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10570 #endif
10571 
10572  char uplo('U');
10573  zpptrf_(&uplo, &n, A.GetData(), &info.GetInfoRef());
10574 
10575 #ifdef SELDON_LAPACK_CHECK_INFO
10576  if (info.GetInfo() != 0)
10577  throw LapackError(info.GetInfo(), "GetCholesky",
10578  "An error occured during the factorization.");
10579 #endif
10580 
10581  }
10582 
10583 
10584  template<class Prop, class Allocator>
10585  void GetCholesky(Matrix<complex<double>, Prop, RowHerm, Allocator>& A,
10586  LapackInfo& info)
10587  {
10588  int n = A.GetN();
10589 #ifdef SELDON_CHECK_BOUNDS
10590  if (n <= 0)
10591  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10592 #endif
10593 
10594  char uplo('L');
10595  zpotrf_(&uplo, &n, A.GetData(), &n, &info.GetInfoRef());
10596 
10597 #ifdef SELDON_LAPACK_CHECK_INFO
10598  if (info.GetInfo() != 0)
10599  throw LapackError(info.GetInfo(), "GetCholesky",
10600  "An error occured during the factorization.");
10601 #endif
10602 
10603  }
10604 
10605 
10606  template<class Prop, class Allocator>
10607  void GetCholesky(Matrix<complex<double>, Prop, ColHerm, Allocator>& A,
10608  LapackInfo& info)
10609  {
10610  int n = A.GetN();
10611 #ifdef SELDON_CHECK_BOUNDS
10612  if (n <= 0)
10613  throw WrongDim("GetCholesky", "Provide a non-empty matrix");
10614 #endif
10615 
10616  char uplo('U');
10617  zpotrf_(&uplo, &n, A.GetData(), &n, &info.GetInfoRef());
10618 
10619 #ifdef SELDON_LAPACK_CHECK_INFO
10620  if (info.GetInfo() != 0)
10621  throw LapackError(info.GetInfo(), "GetCholesky",
10622  "An error occured during the factorization.");
10623 #endif
10624 
10625  }
10626 
10627 
10628  // GetCholesky //
10630 
10631 
10633  // SolveCholesky //
10634 
10635 
10636  template<class Prop, class Allocator, class Allocator2>
10637  void SolveCholesky(const SeldonTranspose& TransA,
10638  const Matrix<double, Prop, RowSymPacked, Allocator>& A,
10639  Vector<double, VectFull, Allocator2>& X,
10640  LapackInfo& info)
10641  {
10642 #ifdef SELDON_CHECK_BOUNDS
10643  if (X.GetM() != A.GetM())
10644  throw WrongDim("SolveCholesky",
10645  "The vector should have a dimension compatible "
10646  "with the matrix.");
10647 #endif
10648 
10649  // basic triangular solve
10650  char uplo('L'); char trans(TransA.Char()); char diag('N');
10651  int n = A.GetM(); int nrhs = 1;
10652  dtptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(),
10653  &n, &info.GetInfoRef());
10654  }
10655 
10656 
10657  template<class Prop, class Allocator, class Allocator2>
10658  void SolveCholesky(const SeldonTranspose& TransA,
10659  const Matrix<double, Prop, ColSymPacked, Allocator>& A,
10660  Vector<double, VectFull, Allocator2>& X,
10661  LapackInfo& info)
10662  {
10663 #ifdef SELDON_CHECK_BOUNDS
10664  if (X.GetM() != A.GetM())
10665  throw WrongDim("SolveCholesky",
10666  "The vector should have a dimension compatible "
10667  "with the matrix.");
10668 #endif
10669 
10670  // basic triangular solve
10671  char uplo('U'); char trans(TransA.RevChar()); char diag('N');
10672  int n = A.GetM(); int nrhs = 1;
10673  dtptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(),
10674  &n, &info.GetInfoRef());
10675  }
10676 
10677 
10678  template<class Prop, class Allocator, class Allocator2>
10679  void SolveCholesky(const SeldonTranspose& TransA,
10680  const Matrix<double, Prop, RowSym, Allocator>& A,
10681  Vector<double, VectFull, Allocator2>& X,
10682  LapackInfo& info)
10683  {
10684 #ifdef SELDON_CHECK_BOUNDS
10685  if (X.GetM() != A.GetM())
10686  throw WrongDim("SolveCholesky",
10687  "The vector should have a dimension compatible "
10688  "with the matrix.");
10689 #endif
10690 
10691  // basic triangular solve
10692  char uplo('L'); char trans(TransA.Char()); char diag('N');
10693  int n = A.GetM(); int nrhs = 1;
10694  dtrtrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), &n,
10695  X.GetData(), &n, &info.GetInfoRef());
10696  }
10697 
10698 
10699  template<class Prop, class Allocator, class Allocator2>
10700  void SolveCholesky(const SeldonTranspose& TransA,
10701  const Matrix<double, Prop, ColSym, Allocator>& A,
10702  Vector<double, VectFull, Allocator2>& X,
10703  LapackInfo& info)
10704  {
10705 #ifdef SELDON_CHECK_BOUNDS
10706  if (X.GetM() != A.GetM())
10707  throw WrongDim("SolveCholesky",
10708  "The vector should have a dimension compatible "
10709  "with the matrix.");
10710 #endif
10711 
10712  // basic triangular solve
10713  char uplo('U'); char trans(TransA.RevChar()); char diag('N');
10714  int n = A.GetM(); int nrhs = 1;
10715  dtrtrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), &n,
10716  X.GetData(), &n, &info.GetInfoRef());
10717  }
10718 
10719 
10720  template<class Prop, class Allocator, class Allocator2>
10721  void SolveCholesky(const SeldonTranspose& TransA,
10722  const Matrix<complex<double>, Prop, RowHermPacked, Allocator>& A,
10723  Vector<complex<double>, VectFull, Allocator2>& X,
10724  LapackInfo& info)
10725  {
10726 #ifdef SELDON_CHECK_BOUNDS
10727  if (X.GetM() != A.GetM())
10728  throw WrongDim("SolveCholesky",
10729  "The vector should have a dimension compatible "
10730  "with the matrix.");
10731 #endif
10732 
10733  // basic triangular solve
10734  char uplo('L'); char trans(TransA.Char()); char diag('N');
10735  int n = A.GetM(); int nrhs = 1;
10736  Conjugate(X);
10737  ztptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(),
10738  &n, &info.GetInfoRef());
10739 
10740  Conjugate(X);
10741  }
10742 
10743 
10744  template<class Prop, class Allocator, class Allocator2>
10745  void SolveCholesky(const SeldonTranspose& TransA,
10746  const Matrix<complex<double>, Prop, ColHermPacked, Allocator>& A,
10747  Vector<complex<double>, VectFull, Allocator2>& X,
10748  LapackInfo& info)
10749  {
10750 #ifdef SELDON_CHECK_BOUNDS
10751  if (X.GetM() != A.GetM())
10752  throw WrongDim("SolveCholesky",
10753  "The vector should have a dimension compatible "
10754  "with the matrix.");
10755 #endif
10756 
10757  // basic triangular solve
10758  char uplo('U'); char trans(TransA.RevChar()); char diag('N');
10759  int n = A.GetM(); int nrhs = 1;
10760  if (!TransA.ConjTrans())
10761  Conjugate(X);
10762 
10763  ztptrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), X.GetData(),
10764  &n, &info.GetInfoRef());
10765 
10766  if (!TransA.ConjTrans())
10767  Conjugate(X);
10768  }
10769 
10770 
10771  template<class Prop, class Allocator, class Allocator2>
10772  void SolveCholesky(const SeldonTranspose& TransA,
10773  const Matrix<complex<double>, Prop, RowHerm, Allocator>& A,
10774  Vector<complex<double>, VectFull, Allocator2>& X,
10775  LapackInfo& info)
10776  {
10777 #ifdef SELDON_CHECK_BOUNDS
10778  if (X.GetM() != A.GetM())
10779  throw WrongDim("SolveCholesky",
10780  "The vector should have a dimension compatible "
10781  "with the matrix.");
10782 #endif
10783 
10784  // basic triangular solve
10785  char uplo('L'); char trans(TransA.Char()); char diag('N');
10786  int n = A.GetM(); int nrhs = 1;
10787  Conjugate(X);
10788  ztrtrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), &n, X.GetData(),
10789  &n, &info.GetInfoRef());
10790 
10791  Conjugate(X);
10792  }
10793 
10794 
10795  template<class Prop, class Allocator, class Allocator2>
10796  void SolveCholesky(const SeldonTranspose& TransA,
10797  const Matrix<complex<double>, Prop, ColHerm, Allocator>& A,
10798  Vector<complex<double>, VectFull, Allocator2>& X,
10799  LapackInfo& info)
10800  {
10801 #ifdef SELDON_CHECK_BOUNDS
10802  if (X.GetM() != A.GetM())
10803  throw WrongDim("SolveCholesky",
10804  "The vector should have a dimension compatible "
10805  "with the matrix.");
10806 #endif
10807 
10808  // basic triangular solve
10809  char uplo('U'); char trans(TransA.RevChar()); char diag('N');
10810  int n = A.GetM(); int nrhs = 1;
10811  if (!TransA.ConjTrans())
10812  Conjugate(X);
10813 
10814  ztrtrs_(&uplo, &trans, &diag, &n, &nrhs, A.GetData(), &n, X.GetData(),
10815  &n, &info.GetInfoRef());
10816 
10817  if (!TransA.ConjTrans())
10818  Conjugate(X);
10819  }
10820 
10821 
10822  // SolveCholesky //
10824 
10825 
10827  // MltCholesky //
10828 
10829 
10830  template<class Prop, class Allocator, class Allocator2>
10831  void MltCholesky(const SeldonTranspose& TransA,
10832  const Matrix<double, Prop, RowSymPacked, Allocator>& A,
10833  Vector<double, VectFull, Allocator2>& X,
10834  LapackInfo& info)
10835  {
10836 #ifdef SELDON_CHECK_BOUNDS
10837  if (X.GetM() != A.GetM())
10838  throw WrongDim("MltCholesky",
10839  "The vector should have a dimension compatible "
10840  "with the matrix.");
10841 #endif
10842 
10843  // matrix-vector product with a triangular matrix
10844  if (TransA.Trans())
10845  cblas_dtpmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10846  A.GetM(), A.GetData(), X.GetData(), 1);
10847  else
10848  cblas_dtpmv(CblasRowMajor, CblasUpper, CblasTrans, CblasNonUnit,
10849  A.GetM(), A.GetData(), X.GetData(), 1);
10850  }
10851 
10852 
10853  template<class Prop, class Allocator, class Allocator2>
10854  void MltCholesky(const SeldonTranspose& TransA,
10855  const Matrix<double, Prop, ColSymPacked, Allocator>& A,
10856  Vector<double, VectFull, Allocator2>& X,
10857  LapackInfo& info)
10858  {
10859 #ifdef SELDON_CHECK_BOUNDS
10860  if (X.GetM() != A.GetM())
10861  throw WrongDim("MltCholesky",
10862  "The vector should have a dimension compatible "
10863  "with the matrix.");
10864 #endif
10865 
10866  // matrix-vector product with a triangular matrix
10867  if (TransA.Trans())
10868  cblas_dtpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10869  A.GetM(), A.GetData(), X.GetData(), 1);
10870  else
10871  cblas_dtpmv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit,
10872  A.GetM(), A.GetData(), X.GetData(), 1);
10873  }
10874 
10875 
10876  template<class Prop, class Allocator, class Allocator2>
10877  void MltCholesky(const SeldonTranspose& TransA,
10878  const Matrix<double, Prop, RowSym, Allocator>& A,
10879  Vector<double, VectFull, Allocator2>& X,
10880  LapackInfo& info)
10881  {
10882 #ifdef SELDON_CHECK_BOUNDS
10883  if (X.GetM() != A.GetM())
10884  throw WrongDim("MltCholesky",
10885  "The vector should have a dimension compatible "
10886  "with the matrix.");
10887 #endif
10888 
10889  // matrix-vector product with a triangular matrix
10890  if (TransA.Trans())
10891  cblas_dtrmv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10892  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
10893  else
10894  cblas_dtrmv(CblasRowMajor, CblasUpper, CblasTrans, CblasNonUnit,
10895  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
10896  }
10897 
10898 
10899  template<class Prop, class Allocator, class Allocator2>
10900  void MltCholesky(const SeldonTranspose& TransA,
10901  const Matrix<double, Prop, ColSym, Allocator>& A,
10902  Vector<double, VectFull, Allocator2>& X,
10903  LapackInfo& info)
10904  {
10905 #ifdef SELDON_CHECK_BOUNDS
10906  if (X.GetM() != A.GetM())
10907  throw WrongDim("MltCholesky",
10908  "The vector should have a dimension compatible "
10909  "with the matrix.");
10910 #endif
10911 
10912  // matrix-vector product with a triangular matrix
10913  if (TransA.Trans())
10914  cblas_dtrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10915  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
10916  else
10917  cblas_dtrmv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit,
10918  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
10919  }
10920 
10921 
10922  template<class Prop, class Allocator, class Allocator2>
10923  void MltCholesky(const SeldonTranspose& TransA,
10924  const Matrix<complex<double>,
10925  Prop, RowHermPacked, Allocator>& A,
10926  Vector<complex<double>, VectFull, Allocator2>& X,
10927  LapackInfo& info)
10928  {
10929 #ifdef SELDON_CHECK_BOUNDS
10930  if (X.GetM() != A.GetM())
10931  throw WrongDim("MltCholesky",
10932  "The vector should have a dimension compatible "
10933  "with the matrix.");
10934 #endif
10935 
10936  // matrix-vector product with a triangular matrix
10937  if (TransA.ConjTrans())
10938  {
10939  cblas_ztpmv(CblasColMajor, CblasLower, CblasTrans, CblasNonUnit,
10940  A.GetM(), A.GetData(), X.GetData(), 1);
10941  }
10942  else if (TransA.Trans())
10943  {
10944  Conjugate(X);
10945  cblas_ztpmv(CblasColMajor, CblasLower, CblasTrans, CblasNonUnit,
10946  A.GetM(), A.GetData(), X.GetData(), 1);
10947 
10948  Conjugate(X);
10949  }
10950  else
10951  {
10952  Conjugate(X);
10953  cblas_ztpmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
10954  A.GetM(), A.GetData(), X.GetData(), 1);
10955 
10956  Conjugate(X);
10957  }
10958 
10959  }
10960 
10961 
10962  template<class Prop, class Allocator, class Allocator2>
10963  void MltCholesky(const SeldonTranspose& TransA,
10964  const Matrix<complex<double>,
10965  Prop, ColHermPacked, Allocator>& A,
10966  Vector<complex<double>, VectFull, Allocator2>& X,
10967  LapackInfo& info)
10968  {
10969 #ifdef SELDON_CHECK_BOUNDS
10970  if (X.GetM() != A.GetM())
10971  throw WrongDim("MltCholesky",
10972  "The vector should have a dimension compatible "
10973  "with the matrix.");
10974 #endif
10975 
10976  // matrix-vector product with a triangular matrix
10977  if (TransA.ConjTrans())
10978  {
10979  cblas_ztpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10980  A.GetM(), A.GetData(), X.GetData(), 1);
10981  }
10982  else if (TransA.Trans())
10983  {
10984  Conjugate(X);
10985  cblas_ztpmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
10986  A.GetM(), A.GetData(), X.GetData(), 1);
10987  Conjugate(X);
10988  }
10989  else
10990  {
10991  Conjugate(X);
10992  cblas_ztpmv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit,
10993  A.GetM(), A.GetData(), X.GetData(), 1);
10994  Conjugate(X);
10995  }
10996 
10997  }
10998 
10999 
11000  template<class Prop, class Allocator, class Allocator2>
11001  void MltCholesky(const SeldonTranspose& TransA,
11002  const Matrix<complex<double>,
11003  Prop, RowHerm, Allocator>& A,
11004  Vector<complex<double>, VectFull, Allocator2>& X,
11005  LapackInfo& info)
11006  {
11007 #ifdef SELDON_CHECK_BOUNDS
11008  if (X.GetM() != A.GetM())
11009  throw WrongDim("MltCholesky",
11010  "The vector should have a dimension compatible "
11011  "with the matrix.");
11012 #endif
11013 
11014  // matrix-vector product with a triangular matrix
11015  if (TransA.ConjTrans())
11016  {
11017  cblas_ztrmv(CblasColMajor, CblasLower, CblasTrans, CblasNonUnit,
11018  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
11019  }
11020  else if (TransA.Trans())
11021  {
11022  Conjugate(X);
11023  cblas_ztrmv(CblasColMajor, CblasLower, CblasTrans, CblasNonUnit,
11024  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
11025 
11026  Conjugate(X);
11027  }
11028  else
11029  {
11030  Conjugate(X);
11031  cblas_ztrmv(CblasColMajor, CblasLower, CblasNoTrans, CblasNonUnit,
11032  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
11033 
11034  Conjugate(X);
11035  }
11036 
11037  }
11038 
11039 
11040  template<class Prop, class Allocator, class Allocator2>
11041  void MltCholesky(const SeldonTranspose& TransA,
11042  const Matrix<complex<double>,
11043  Prop, ColHerm, Allocator>& A,
11044  Vector<complex<double>, VectFull, Allocator2>& X,
11045  LapackInfo& info)
11046  {
11047 #ifdef SELDON_CHECK_BOUNDS
11048  if (X.GetM() != A.GetM())
11049  throw WrongDim("MltCholesky",
11050  "The vector should have a dimension compatible "
11051  "with the matrix.");
11052 #endif
11053 
11054  // matrix-vector product with a triangular matrix
11055  if (TransA.ConjTrans())
11056  {
11057  cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
11058  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
11059  }
11060  else if (TransA.Trans())
11061  {
11062  Conjugate(X);
11063  cblas_ztrmv(CblasColMajor, CblasUpper, CblasNoTrans, CblasNonUnit,
11064  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
11065  Conjugate(X);
11066  }
11067  else
11068  {
11069  Conjugate(X);
11070  cblas_ztrmv(CblasColMajor, CblasUpper, CblasTrans, CblasNonUnit,
11071  A.GetM(), A.GetData(), A.GetM(), X.GetData(), 1);
11072  Conjugate(X);
11073  }
11074 
11075  }
11076 
11077 
11078  // MltCholesky //
11080 
11081 
11082  // Generic method, which factorizes a matrix and solve the linear system
11083  // b is overwritten by the solution
11084  template<class T, class Prop, class Storage, class Allocator,
11085  class Allocator1, class Allocator2>
11086  void GetAndSolveLU(Matrix<T, Prop, Storage, Allocator>& A,
11087  Vector<int, VectFull, Allocator1>& P,
11088  Vector<T, VectFull, Allocator2>& b,
11089  LapackInfo& info)
11090  {
11091  GetLU(A, P, info);
11092  SolveLuVector(A, P, b, info);
11093  }
11094 
11095 
11096 } // namespace Seldon.
11097 
11098 #define SELDON_FILE_LAPACK_LINEAREQUATIONS_CXX
11099 #endif
Seldon::GetAndSolveLU
void GetAndSolveLU(Matrix< T0, Prop0, Storage0, Allocator0 > &M, Vector< T1, Storage1, Allocator1 > &Y)
Solves a linear system using LU factorization.
Definition: Functions_MatVect.cxx:1841
Seldon::Conjugate
void Conjugate(Matrix< T, Prop, Storage, Allocator > &A)
A is replaced by its conjugate.
Definition: Functions_Matrix.cxx:2915
Seldon::GetLU
void GetLU(Matrix< T0, Prop0, Storage0, Allocator0 > &A)
Returns the LU factorization of a matrix.
Definition: Functions_Matrix.cxx:2073
Seldon::CheckDim
void CheckDim(const Matrix< T0, Prop0, Storage0, Allocator0 > &A, const Matrix< T1, Prop1, Storage1, Allocator1 > &B, const Matrix< T2, Prop2, Storage2, Allocator2 > &C, string function)
Checks the compatibility of the dimensions.
Definition: Functions_Matrix.cxx:2132
Seldon::SolveLuVector
void SolveLuVector(const Matrix< T0, Prop0, Storage0, Allocator0 > &M, Vector< T1, Storage1, Allocator1 > &Y)
Solves a linear system whose matrix has been LU-factorized.
Definition: Functions_MatVect.cxx:1782
Seldon
Seldon namespace.
Definition: Array.cxx:24