Last change
on this file since 1359 was 1342, checked in by ansari, 25 years ago |
Ajout de SVD ds LapackServer - Reza 24/11/2000
|
File size:
1.2 KB
|
Rev | Line | |
---|
[775] | 1 | #ifndef IntfLapack_H_SEEN
|
---|
| 2 | #define IntfLapack_H_SEEN
|
---|
| 3 |
|
---|
| 4 | #include "machdefs.h"
|
---|
| 5 | #include "tarray.h"
|
---|
| 6 |
|
---|
[814] | 7 | namespace SOPHYA {
|
---|
[775] | 8 |
|
---|
[814] | 9 | template <class T>
|
---|
| 10 | class LapackServer {
|
---|
| 11 | public:
|
---|
[1342] | 12 | LapackServer();
|
---|
| 13 | virtual ~LapackServer();
|
---|
| 14 |
|
---|
| 15 | virtual int LinSolve(TArray<T>& a, TArray<T> & b);
|
---|
| 16 | virtual int SVD(TArray<T>& a, TArray<T> & s);
|
---|
| 17 | virtual int SVD(TArray<T>& a, TArray<T> & s, TArray<T> & u, TArray<T> & vt);
|
---|
| 18 |
|
---|
| 19 | inline void SetWorkSpaceSizeFactor(int f = 2)
|
---|
| 20 | { wspace_size_factor = (f > 1) ? f : 1; }
|
---|
| 21 | inline int GetWorkSpaceSizeFactor()
|
---|
| 22 | { return wspace_size_factor; }
|
---|
| 23 |
|
---|
| 24 | private:
|
---|
| 25 | int SVDDriver(TArray<T>& a, TArray<T> & s,
|
---|
| 26 | TArray<T>* up=NULL, TArray<T> * vtp=NULL);
|
---|
| 27 |
|
---|
| 28 | int wspace_size_factor;
|
---|
[814] | 29 | };
|
---|
| 30 |
|
---|
| 31 | template <class T>
|
---|
[1042] | 32 | inline int LapackLinSolve(TArray<T>& a, TArray<T> & b)
|
---|
[1342] | 33 | { LapackServer<T> lps; return( lps.LinSolve(a, b) ); }
|
---|
[814] | 34 |
|
---|
[1342] | 35 | template <class T>
|
---|
| 36 | inline int LapackSVD(TArray<T>& a, TArray<T> & s)
|
---|
| 37 | { LapackServer<T> lps; return( lps.SVD(a, s) ); }
|
---|
[814] | 38 |
|
---|
[1342] | 39 | template <class T>
|
---|
| 40 | inline int LapackSVD(TArray<T>& a, TArray<T> & s, TArray<T> & u, TArray<T> & vt)
|
---|
| 41 | { LapackServer<T> lps; return( lps.SVD(a, s, u, vt) ); }
|
---|
| 42 |
|
---|
| 43 |
|
---|
[814] | 44 | } // Fin du namespace
|
---|
| 45 |
|
---|
[775] | 46 | void rztest_lapack(TArray<r_4>& a, TArray<r_4>& b);
|
---|
| 47 |
|
---|
| 48 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.