1 | /* ====================================================================== |
---|
2 | Dateiname: bifac.h |
---|
3 | Autor: Holger L. Cröni |
---|
4 | Bearbeitung: 29. August 2002 |
---|
5 | |
---|
6 | |
---|
7 | Beschreibung: Klasse zur Faktorisierung bivariater Polynome |
---|
8 | =================================================================== */ |
---|
9 | |
---|
10 | #ifndef bifac__H |
---|
11 | #define bifac__H |
---|
12 | |
---|
13 | |
---|
14 | #include <time.h> |
---|
15 | |
---|
16 | // #include <factoryconf.h> |
---|
17 | |
---|
18 | #ifdef HAVE_BIFAC |
---|
19 | |
---|
20 | #include "lgs.h" |
---|
21 | #include "bifacConfig.h" |
---|
22 | |
---|
23 | // === IO-Streams === |
---|
24 | #ifndef NOSTREAMIO |
---|
25 | #ifdef HAVE_CSTDIO |
---|
26 | #include <cstdio> |
---|
27 | #else |
---|
28 | #include <stdio.h> |
---|
29 | #endif |
---|
30 | #ifdef HAVE_IOSTREAM |
---|
31 | #include <fstream> |
---|
32 | #include <iostream> |
---|
33 | #elif defined(HAVE_IOSTREAM_H) |
---|
34 | #include <fstream.h> |
---|
35 | #include <iostream.h> |
---|
36 | #endif |
---|
37 | #include <iomanip.h> |
---|
38 | #endif |
---|
39 | |
---|
40 | /*BEGINPUBLIC*/ |
---|
41 | |
---|
42 | CFFList AbsFactorize( const CanonicalForm & a ); |
---|
43 | |
---|
44 | class BIFAC |
---|
45 | { |
---|
46 | //////////////////////////////////////////////////////////////// |
---|
47 | public: |
---|
48 | //////////////////////////////////////////////////////////////// |
---|
49 | |
---|
50 | // === KONST-/ DESTRUKTOREN ==== |
---|
51 | BIFAC ( void ); // Konstruktor |
---|
52 | virtual ~BIFAC( void ); // DESTRUKTOR |
---|
53 | |
---|
54 | // === Funktionen ======= |
---|
55 | void bifac(CanonicalForm f, bool absolute=true); |
---|
56 | CFFList getFactors( void ){ return gl_RL; }; |
---|
57 | |
---|
58 | |
---|
59 | //////////////////////////////////////////////////////////////// |
---|
60 | private: |
---|
61 | //////////////////////////////////////////////////////////////// |
---|
62 | |
---|
63 | // === Funktionen ======= |
---|
64 | void passedTime(); |
---|
65 | void biGanzMachen( CanonicalForm & f ); |
---|
66 | void biNormieren( CanonicalForm & f ) ; |
---|
67 | void convertResult( CanonicalForm & f, int ch, int sw); |
---|
68 | int findCharacteristic(CanonicalForm f); |
---|
69 | // void matrix_drucken( CFMatrix M ); |
---|
70 | long int anz_terme( CanonicalForm & f ); |
---|
71 | |
---|
72 | CFList matrix2basis(CFMatrix A, int dim, int m, int n, CanonicalForm f); |
---|
73 | CFList basisOfG(CanonicalForm f); |
---|
74 | CFMatrix createA (CFList G, CanonicalForm f); |
---|
75 | CanonicalForm create_g (CFList G); |
---|
76 | CFList createRg (CFList G, CanonicalForm f); |
---|
77 | CFList createEg (CFList G, CanonicalForm f); |
---|
78 | CFList createEgUni (CFList G, CanonicalForm f); |
---|
79 | |
---|
80 | void unifac(CanonicalForm f, int grad); |
---|
81 | CanonicalForm RationalFactor (CanonicalForm phi, CanonicalForm f, \ |
---|
82 | CanonicalForm fx, CanonicalForm g); |
---|
83 | void RationalFactorizationOnly (CFFList Phis, CanonicalForm f, CanonicalForm g); |
---|
84 | CFList getAbsoluteFactors (CanonicalForm f1, CanonicalForm phi); |
---|
85 | void AbsoluteFactorization (CFFList Phis, CanonicalForm f, CanonicalForm g); |
---|
86 | void bifacSqrFree( CanonicalForm f ); |
---|
87 | void bifacMain(CanonicalForm f); |
---|
88 | |
---|
89 | |
---|
90 | // === Variable ======= |
---|
91 | CFFList gl_RL; // where to store the rational factorization |
---|
92 | CFList gl_AL; // where to store the absolute factorization |
---|
93 | bool absolute; // Compute an absolute factorization as well? |
---|
94 | int exponent; // |
---|
95 | }; |
---|
96 | |
---|
97 | /*ENDPUBLIC*/ |
---|
98 | |
---|
99 | #endif |
---|
100 | // =============== Ende der Datei 'bifac.h' ============================ |
---|
101 | |
---|
102 | #endif |
---|