source: Sophya/trunk/SophyaPI/PIext/pitvmaad.h@ 3736

Last change on this file since 3736 was 3713, checked in by ansari, 16 years ago

Ajout options afichage cdreal,cdimag,cdphas,cdmod,cdmod2 pour tableaux complexes, Reza 11/12/2009

File size: 1.6 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Adaptateurs pour TMatrix TVector du package Sophya
3// R. Ansari 1/99
4// LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA
5
6#ifndef PITVMAAD_H_SEEN
7#define PITVMAAD_H_SEEN
8
9#include "machdefs.h"
10#include "parradapter.h"
11
12#include "tmatrix.h"
13#include "tvector.h"
14
15// Definition d'enum pour choix de la quantite affichee pour les tableaux de complexes.
16enum PICmplxDispOption { PICDO_Module, PICDO_Real, PICDO_Imag, PICDO_Phase, PICDO_Module2 };
17// Decode la presence d'une chaine opt contenant cdreal , cdimag , cdphase , cdmod , cdmod2
18PICmplxDispOption StringToCmplxDispOption( string & opt );
19
20// Adaptateur de vecteurs SOPHYA a P1DArrayAdapter
21template <class T>
22class POTVectorAdapter : public P1DArrayAdapter {
23public :
24 POTVectorAdapter(TVector<T>* v, bool ad=false, PICmplxDispOption dopt=PICDO_Module);
25 virtual ~POTVectorAdapter();
26 virtual double Value(int i);
27
28protected:
29 PICmplxDispOption dOpt;
30 bool aDel;
31 TVector<T>* mVec;
32};
33
34typedef POTVectorAdapter<r_8> POVectorAdapter;
35
36
37// Adaptateur de matrice SOPHYA a P2DArrayAdapter
38// Attention MatrixAdapter(X=Colonne, Y= Row) = Matrix(row, col)
39template <class T>
40class POTMatrixAdapter : public P2DArrayAdapter {
41public :
42 POTMatrixAdapter(TMatrix<T>* mtx, bool ad=false, PICmplxDispOption dopt=PICDO_Module);
43 virtual ~POTMatrixAdapter();
44 virtual double Value(int ix, int iy);
45 virtual double MeanVal(int ix1, int ix2, int jy1, int jy2);
46
47protected:
48 PICmplxDispOption dOpt;
49 bool aDel;
50 TMatrix<T>* mMtx;
51};
52
53typedef POTMatrixAdapter<r_8> POMatrixAdapter;
54
55#endif
Note: See TracBrowser for help on using the repository browser.