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

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
Line 
1#ifndef IntfLapack_H_SEEN
2#define IntfLapack_H_SEEN
3
4#include "machdefs.h"
5#include "tarray.h"
6
7namespace SOPHYA {
8
9template <class T>
10class LapackServer {
11public:
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;
29};
30
31template <class T>
32inline int LapackLinSolve(TArray<T>& a, TArray<T> & b)
33{ LapackServer<T> lps; return( lps.LinSolve(a, b) ); }
34
35template <class T>
36inline int LapackSVD(TArray<T>& a, TArray<T> & s)
37{ LapackServer<T> lps; return( lps.SVD(a, s) ); }
38
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
44} // Fin du namespace
45
46void rztest_lapack(TArray<r_4>& a, TArray<r_4>& b);
47
48#endif
Note: See TracBrowser for help on using the repository browser.