1 | /* ====================================================================== |
---|
2 | Dateiname: lgs.h |
---|
3 | |
---|
4 | Beschreibung: Enthält alle Definition und Funktionen zum |
---|
5 | Umgang mit dem linearen Gleichungssystemen. |
---|
6 | =================================================================== */ |
---|
7 | |
---|
8 | #ifndef lgs__H |
---|
9 | #define lgs__H |
---|
10 | |
---|
11 | |
---|
12 | #ifdef HAVE_BIFAC |
---|
13 | |
---|
14 | #include "factory.h" |
---|
15 | |
---|
16 | |
---|
17 | class LGS |
---|
18 | { |
---|
19 | //////////////////////////////////////////////////////////////// |
---|
20 | public: |
---|
21 | //////////////////////////////////////////////////////////////// |
---|
22 | |
---|
23 | // === KONST-/ DESTRUKTOREN ==== |
---|
24 | LGS (int rows, int columns, bool inverse =false ); // Konstruktor |
---|
25 | virtual ~LGS( void ); // DESTRUKTOR |
---|
26 | |
---|
27 | // === Funktionen ======= |
---|
28 | bool new_row( const CFMatrix Z, const CanonicalForm b =0); |
---|
29 | |
---|
30 | int rank( void ); |
---|
31 | int corank( void ); |
---|
32 | CFMatrix GetSolutionVector( void ); |
---|
33 | CFMatrix GetKernelBasis( void ); |
---|
34 | void reset(void); |
---|
35 | void inverse( CFMatrix& I); |
---|
36 | void print(void); |
---|
37 | |
---|
38 | |
---|
39 | //////////////////////////////////////////////////////////////// |
---|
40 | private: |
---|
41 | //////////////////////////////////////////////////////////////// |
---|
42 | |
---|
43 | // === Funktionen ======= |
---|
44 | bool lin_dep(void); |
---|
45 | void reduce(int fix, int row); |
---|
46 | int ErgCol(int row, int basis[]); |
---|
47 | |
---|
48 | // === Variable ======= |
---|
49 | CFMatrix A, b; // Matrices of the linear equation system |
---|
50 | |
---|
51 | bool KERN; // compute the kernel |
---|
52 | bool INVERSE; // compute at once the inverse matrix |
---|
53 | int max_columns; // Für so viele Spalten wurde Platz alloziiert. |
---|
54 | int max_rows; // Für so viele Zeilen wurde Platz alloziiert. |
---|
55 | int now_row; // Soviele der Zeilen wurden bisher benutzt. |
---|
56 | int* pivot; // pivot column of the i-te row |
---|
57 | }; |
---|
58 | |
---|
59 | #endif |
---|
60 | // =============== Ende der Datei 'lgs.h' ============================ |
---|
61 | |
---|
62 | #endif |
---|