source: Sophya/trunk/SophyaExt/LinAlg/intflapack.h@ 1342

Last change on this file since 1342 was 1342, checked in by ansari, 25 years ago

Ajout de SVD ds LapackServer - Reza 24/11/2000

File size: 1.2 KB
RevLine 
[775]1#ifndef IntfLapack_H_SEEN
2#define IntfLapack_H_SEEN
3
4#include "machdefs.h"
5#include "tarray.h"
6
[814]7namespace SOPHYA {
[775]8
[814]9template <class T>
10class LapackServer {
11public:
[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
24private:
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
31template <class T>
[1042]32inline int LapackLinSolve(TArray<T>& a, TArray<T> & b)
[1342]33{ LapackServer<T> lps; return( lps.LinSolve(a, b) ); }
[814]34
[1342]35template <class T>
36inline int LapackSVD(TArray<T>& a, TArray<T> & s)
37{ LapackServer<T> lps; return( lps.SVD(a, s) ); }
[814]38
[1342]39template <class T>
40inline 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]46void rztest_lapack(TArray<r_4>& a, TArray<r_4>& b);
47
48#endif
Note: See TracBrowser for help on using the repository browser.