ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/REPOS_ERICCA/magic/lib/solveur/src/matpleine.h
Revision: 108
Committed: Tue Jun 17 13:01:28 2008 UTC (16 years, 11 months ago) by souaissa
Content type: text/plain
Original Path: magic/lib/solveur/solveur/src/matpleine.h
File size: 4444 byte(s)
Log Message:
solveur version du 17 juin 2008

File Contents

# User Rev Content
1 souaissa 108
2     //---------------------------------------------------------------------------
3    
4     #ifndef sl_matpleineH
5     #define sl_matpleineH
6     //---------------------------------------------------------------------------
7     #include <iostream>
8     #include <vector.h>
9     #include <assert>
10    
11     #include "vecteur.h"
12    
13     #ifdef WINDOWS_VERSION
14     #ifdef BUILT_DLL_SOLVEUR
15     #define DLLPORTSOLVEUR __declspec(dllexport)
16     #else
17     #define DLLPORTSOLVEUR __declspec(dllimport)
18     #endif
19     #else
20     #define DLLPORTSOLVEUR
21     #endif
22    
23     class Vecteur;
24    
25    
26     class DLLPORTSOLVEUR Matrice
27     {
28     private:
29     double** Data;
30     int NbCols;
31     int NbRows;
32    
33    
34     public:
35     friend class Vecteur;
36     Matrice();
37     Matrice(int Rows, int Cols,double InitVal);
38     Matrice(double* Data, int Rows, int Cols);
39     Matrice(double** Data, int Rows, int Cols);
40    
41     Matrice(const Matrice& obj);
42     ~Matrice();
43     Matrice& operator =(const Matrice& obj);
44     Matrice& operator +(const Matrice& obj) const;
45     Matrice& operator -(const Matrice& obj) const;
46     Matrice& operator *(const Matrice& obj) const;
47     Matrice& operator *(const double _d) const;
48     Matrice& operator /(const double _d) const;
49     Matrice& operator +=(const Matrice& obj);
50     Matrice& operator -=(const Matrice& obj);
51     Matrice& operator *=(const Matrice& obj);
52     Matrice& operator *=(const double _d);
53     Matrice& operator /=(const double _d);
54     bool operator ==(const Matrice& obj) const;
55     bool operator !=(const Matrice& obj) const;
56     double* operator [](const int _i) const;
57     double& operator ()(const int _i, const int _j) const;
58     bool IsIdentity() const;
59     bool IsZeroMatrice() const;
60     double Get_SumAll() const;
61     double Get_SumRow(const int Row) const;
62     double Get_SumColumn(const int Col) const;
63     double Get_Max() const;
64     double Get_Min() const;
65     double Get_AbMax() const;
66     double Get_RowMax(const int Row) const;
67     double Get_RowMin(const int Row) const;
68     double Get_ColumnMax(const int Col) const;
69     double Get_ColumnMin(const int Col) const;
70     double* Get_DataOneDimen() const;
71     double** Get_DataTwoDimen() const;
72     int Get_NbRows() const;
73     int Get_NbCols() const;
74     Matrice& Clear();
75     Matrice& ClearRow(const int Row);
76     Matrice& ClearColumn(const int Col);
77     Matrice& Fill(const double _d);
78     Matrice& FillRow(const int Row, const double _d);
79     Matrice& FillColumn(const int Col, const double _d);
80     Matrice& Get_SubMatrice(const int RowSpot, const int ColSpot, const int RowLen, const int ColLen) const ;
81     Matrice& Set_SubMatrice(const int RowSpot, const int ColSpot, const int RowLen, const int ColLen);
82     Matrice& Get_SwapRows(const int Row1, const int Row2);
83     Matrice& Get_SwapCols(const int Col1, const int Col2);
84     Matrice& Get_Transposed() const ;
85     Matrice& Transpose();
86     Matrice& Get_ConMatAsRow(const Matrice& obj);
87     Matrice& Get_ConMatAsCol(const Matrice& obj);
88     Matrice& GetCMAR(const Matrice& obj) const ;
89     Matrice& GetCMAC(const Matrice& obj) const ;
90     Matrice& ConcatenateRow(const double* RowData);
91     Matrice& ConcatenateColumn(const double* ColumnData);
92     Matrice& Add_Row(const double* RowData, const int RowSpot);
93     Matrice& Add_Column(const double* ColumnData, const int ColumnSpot);
94     Matrice& RemoveRow(const int Row);
95     Matrice& RemoveColumn(const int Column);
96     Matrice& Get_Covariant() const;
97     Matrice& Set_Covariant();
98     Matrice& IdentityMatrice(int Diagonal);
99     Matrice& Get_LU(int*perm,double&d);
100     Vecteur Get_Solution(int* perm,const Vecteur&b);
101     void Get_Solution(int* perm, double* b, double* x);
102     friend std::ostream& operator <<(std::ostream& ostr, const Matrice& obj);
103     Vecteur Multiply (const Vecteur&);
104     void affiche();
105     friend Vecteur operator * (const Matrice&,const Vecteur&);
106     // void convert_Mat(const Matrice&,double,MatCr&);
107    
108     };
109    
110    
111     DLLPORTSOLVEUR Vecteur operator * (const Matrice&,const Vecteur&);
112     DLLPORTSOLVEUR std::ostream& operator <<(std::ostream& ostr, const Matrice& obj);
113    
114    
115     #endif
116    
117