1 | // Header file for libfac.a |
---|
2 | // Created by -- makeheader -- |
---|
3 | /////////////////////////////////////// |
---|
4 | #ifndef FACTOR_H |
---|
5 | #define FACTOR_H |
---|
6 | |
---|
7 | #include <factory.h> |
---|
8 | |
---|
9 | // Set this to a nonzero value to interrupt the computation |
---|
10 | extern int libfac_interruptflag; |
---|
11 | |
---|
12 | // some values you can ask for: |
---|
13 | extern const char * libfac_name; |
---|
14 | extern const char * libfac_version; |
---|
15 | extern const char * libfac_date; |
---|
16 | extern const char * libfac_author; |
---|
17 | |
---|
18 | //// Note: second argument for Factorize is for internal use only. |
---|
19 | CFFList Factorize( const CanonicalForm & F, int is_SqrFree=0 ) ; |
---|
20 | |
---|
21 | //// Note: InternalSqrFree does only the work needed for factorization. |
---|
22 | // CFFList SqrFree( const CanonicalForm & f ) ; |
---|
23 | |
---|
24 | typedef List<CFList> ListCFList; |
---|
25 | typedef List<int> IntList ; |
---|
26 | typedef ListIterator<int> IntListIterator ; |
---|
27 | typedef List<Variable> Varlist; |
---|
28 | typedef ListIterator<Variable> VarlistIterator; |
---|
29 | |
---|
30 | //////////////////////////////////////// |
---|
31 | /// from charsets: |
---|
32 | |
---|
33 | class PremForm { |
---|
34 | public: |
---|
35 | CFList FS1; |
---|
36 | CFList FS2; |
---|
37 | inline PremForm& operator=( const PremForm& value ){ |
---|
38 | if ( this != &value ){ |
---|
39 | FS1 = value.FS1; |
---|
40 | FS2 = value.FS2; |
---|
41 | } |
---|
42 | return *this; |
---|
43 | } |
---|
44 | }; |
---|
45 | |
---|
46 | CanonicalForm Prem( const CanonicalForm &f, const CanonicalForm &g ); |
---|
47 | CanonicalForm Prem( const CanonicalForm &f, const CFList &L ); |
---|
48 | CFList Prem( const CFList &AS, const CFList &L ); |
---|
49 | CFList MCharSetN( const CFList &PS, PremForm & Remembern ); |
---|
50 | ListCFList IrrCharSeries( const CFList &PS, int opt=0 ); |
---|
51 | |
---|
52 | // the next three give you a heuristically optimal reorderd list of the |
---|
53 | // variables. For internal and external (e.g. Singular/Macaulay2) library use. |
---|
54 | // This is really experimental! |
---|
55 | // See the comments in reorder.cc. |
---|
56 | // |
---|
57 | // this gives you a heuristically optimal ordering for the ring variables |
---|
58 | // if you use the irreducible characteristic series. |
---|
59 | Varlist neworder( const CFList & PolyList ); |
---|
60 | // the same as neworder(...) only returning a list of CanonicalForm 's |
---|
61 | // (i.e. the variables as CanonicalForms) |
---|
62 | CFList newordercf(const CFList & PolyList ); |
---|
63 | // the same as neworder(...) only returning a list of int 's (i.e. the levels) |
---|
64 | IntList neworderint(const CFList & PolyList ); |
---|
65 | |
---|
66 | // for library internal use only: |
---|
67 | // next function reorders the variables in PS: |
---|
68 | // a code segment to use: |
---|
69 | // ... |
---|
70 | // #include <tmpl_inst.h> // for typedef's |
---|
71 | // CFList PS= <setup-your-list-of-CanonicalForms>; |
---|
72 | // Varlist betterorder= neworder(PS); |
---|
73 | // PS= reorder(betterorder,PS); // reorder variables in PS from oldorder |
---|
74 | // to betterorder |
---|
75 | // ListCFList Q= IrrCharSeries( PS ); |
---|
76 | // Q= reorder(betterorder,Q); // revert ordering to oldorder |
---|
77 | // |
---|
78 | CFList reorder( const Varlist & betterorder, const CFList & PS); |
---|
79 | CFFList reorder( const Varlist & betterorder, const CFFList & PS); |
---|
80 | ListCFList reorder(const Varlist & betterorder, const ListCFList & Q); |
---|
81 | |
---|
82 | |
---|
83 | #endif /* FACTOR_H */ |
---|