source: Sophya/trunk/SophyaPI/PIext/nomtmatvecadapter.h@ 4005

Last change on this file since 4005 was 2999, checked in by ansari, 19 years ago

1/ Ajout methode Services2NObjMgr::DisplayPoints3DW() et commande plot3dw
2/ Ajout et utilisation methode de verification de nom NamedObjMgr::CheckName()
3/ Changement methode NObjMgrAdapter::GetInfoString() et son utilisation
a travers la methdoe PIACmd::GetVarApp() pour acces de type $objname
4/ Ajout methode NObjMgrAdapter::PerformOperation() , implemente pour
adaptateur TMatrix<T> et TArray<T> pour extraction de ligne/colonne
(des matrices) et plan (slice) des TArray pour Rank()>3 Et mise en place
de la commande objaoper pour appel a PerformOperation()
5/ Petites corrections pour ntline2var vec2var

Reza 2 Juillet 2006

File size: 2.3 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Adaptateur d objets (pour NamedObjMgr)
3// pour les classes TMatrix<T>, TVector<T> de Sophya
4// Reza 11/99
5// LAL-IN2P3/CNRS CEA-DAPNIA
6
7#ifndef NOMTMATVECADAPTER_H_SEEN
8#define NOMTMATVECADAPTER_H_SEEN
9
10#include "nomgadapter.h"
11#include "tmatrix.h"
12#include "generaldata.h"
13
14//---------------------------------------------------------------
15// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet TMatrix
16//---------------------------------------------------------------
17
18template <class T>
19class NOMAdapter_TMatrix : public NObjMgrAdapter {
20public:
21 NOMAdapter_TMatrix(TMatrix<T>* m = NULL);
22 virtual ~NOMAdapter_TMatrix();
23
24 virtual NObjMgrAdapter* Clone(AnyDataObj* o);
25
26 virtual string GetDataObjType();
27
28 virtual AnyDataObj* CloneDataObj(bool share=false);
29
30// Returns a string with synthetic information about the object
31// opts : additional optional argument
32 virtual string GetInfoString(vector<string>& opts);
33// Perform an operation on the object definded
34// opts : operation definition
35 virtual int PerformOperation(vector<string>& opts);
36
37 virtual void SavePPF(POutPersist& s, string const & nom);
38
39 virtual void Print(ostream& os, int lev=0);
40 virtual PIDrawer* GetDrawer(string& dopt);
41 virtual P2DArrayAdapter* Get2DArray(string& dopt);
42 virtual NTupleInterface* GetNTupleInterface(bool& adel);
43
44 virtual GeneralFitData* GetGeneralFitData(bool& adel
45 ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError
46 ,double errscale=1.,double errmin=0.
47 ,int i1=0,int i2=-1,int j1=0,int j2=-1);
48 virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);
49 virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);
50
51protected:
52 TMatrix<T>* mMtx;
53};
54
55// Class Interface NTuple pour TMatrix<T>
56
57template <class T>
58class NTupInt_TMatrix : public NTupleInterface {
59public:
60 NTupInt_TMatrix(TMatrix<T>* m);
61 virtual ~NTupInt_TMatrix();
62 virtual sa_size_t NbLines() const ;
63 virtual sa_size_t NbColumns() const ;
64 virtual r_8 * GetLineD(sa_size_t n) const ;
65 virtual string VarList_C(const char* nomx=NULL) const ;
66protected:
67 TMatrix<T>* mMtx;
68 mutable r_8 mRet[8];
69};
70
71
72#endif
Note: See TracBrowser for help on using the repository browser.