1 |
francois |
17 |
//---------------------------------------------------------------------------
|
2 |
|
|
|
3 |
|
|
#ifndef ot_tenseurH
|
4 |
|
|
#define ot_tenseurH
|
5 |
|
|
//---------------------------------------------------------------------------
|
6 |
|
|
|
7 |
|
|
#ifdef WINDOWS_VERSION
|
8 |
|
|
#ifdef BUILT_DLL_OUTIL
|
9 |
|
|
#define DLLPORTOUTIL __declspec(dllexport)
|
10 |
|
|
#else
|
11 |
|
|
#define DLLPORTOUTIL __declspec(dllimport)
|
12 |
|
|
#endif
|
13 |
|
|
#else
|
14 |
|
|
#define DLLPORTOUTIL
|
15 |
|
|
#endif
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
#include <iostream.h>
|
19 |
|
|
#include <vector.h>
|
20 |
|
|
#include "ot_doubleprecision.h"
|
21 |
|
|
|
22 |
|
|
using namespace std;
|
23 |
|
|
|
24 |
|
|
class DLLPORTOUTIL OT_TENSEUR
|
25 |
|
|
{
|
26 |
|
|
public:
|
27 |
|
|
OT_TENSEUR();
|
28 |
|
|
OT_TENSEUR(int p, int q);
|
29 |
|
|
OT_TENSEUR(vector<double2>& vct);
|
30 |
|
|
OT_TENSEUR(int p,int q,double2* tab);
|
31 |
|
|
OT_TENSEUR(const OT_TENSEUR& mdd);
|
32 |
|
|
virtual~OT_TENSEUR();
|
33 |
|
|
OT_TENSEUR& operator=(const OT_TENSEUR& mdd);
|
34 |
|
|
double2 operator () (int r,int s) const;
|
35 |
|
|
double2& operator () (int r,int s) ;
|
36 |
|
|
int operator==(const OT_TENSEUR& m);
|
37 |
|
|
int get_nb_lignes();
|
38 |
|
|
int get_nb_colonnes();
|
39 |
|
|
int get_nb_ref();
|
40 |
|
|
void extraire_ligne(int idx,double2* ligne);
|
41 |
|
|
void extraire_colonne(int idx,double2* colonne);
|
42 |
|
|
OT_TENSEUR extraire_sous_tenseur(int i1,int i2,int j1,int j2);
|
43 |
|
|
int trouver_le_terme(int num_lign,double2 term);
|
44 |
|
|
|
45 |
|
|
private:
|
46 |
|
|
int nb_lignes;
|
47 |
|
|
int nb_colonnes;
|
48 |
|
|
int nb_ref;
|
49 |
|
|
double2* tenseur;
|
50 |
|
|
double2* ref;
|
51 |
|
|
|
52 |
|
|
} ;
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
#endif
|