1 | /*****************************************************************************\ |
---|
2 | * Computer Algebra System SINGULAR |
---|
3 | \*****************************************************************************/ |
---|
4 | /** @file cfCharSetsUtil.h |
---|
5 | * |
---|
6 | * This file provides utility functions to compute characteristic sets |
---|
7 | * |
---|
8 | * @note some of the code is code from libfac or derived from code from libfac. |
---|
9 | * Libfac is written by M. Messollen. See also COPYING for license information |
---|
10 | * and README for general information on characteristic sets. |
---|
11 | * |
---|
12 | * ABSTRACT: Descriptions can be found in Wang "On the Parallelization of |
---|
13 | * characteristic-set based algorithms" or Greuel/Pfister "A Singular |
---|
14 | * Introduction to Commutative Algebra". |
---|
15 | * |
---|
16 | * @author Martin Lee |
---|
17 | * |
---|
18 | **/ |
---|
19 | /*****************************************************************************/ |
---|
20 | |
---|
21 | #ifndef CF_CHARSETS_UTIL |
---|
22 | #define CF_CHARSETS_UTIL |
---|
23 | |
---|
24 | /*BEGINPUBLIC*/ |
---|
25 | /** |
---|
26 | * class to store factors that get removed during char set computation |
---|
27 | **/ |
---|
28 | class StoreFactors |
---|
29 | { |
---|
30 | public: |
---|
31 | CFList FS1; ///< factors that were removed |
---|
32 | CFList FS2; ///< candidate factors that might get removed |
---|
33 | inline StoreFactors& operator= (const StoreFactors& value) |
---|
34 | { |
---|
35 | if ( this != &value ) |
---|
36 | { |
---|
37 | FS1 = value.FS1; |
---|
38 | FS2 = value.FS2; |
---|
39 | } |
---|
40 | return *this; |
---|
41 | } |
---|
42 | }; |
---|
43 | /*ENDPUBLIC*/ |
---|
44 | |
---|
45 | Variable |
---|
46 | get_max_var (const CFList & PS); |
---|
47 | |
---|
48 | CFList |
---|
49 | only_in_one (const CFList & PS, const Variable & x); |
---|
50 | |
---|
51 | Varlist |
---|
52 | reorderb (const Varlist & difference, const CFList & PS, |
---|
53 | const int highest_level); |
---|
54 | |
---|
55 | CFList |
---|
56 | swapvar (const CFList & PS, const Variable & x, const Variable & y); |
---|
57 | |
---|
58 | CFFList |
---|
59 | swapvar (const CFFList & PS, const Variable & x, const Variable & y); |
---|
60 | |
---|
61 | CanonicalForm |
---|
62 | lowestRank (const CFList & L); |
---|
63 | |
---|
64 | CFList initials (const CFList& L); |
---|
65 | |
---|
66 | void |
---|
67 | sortListCFList (ListCFList& list); |
---|
68 | |
---|
69 | void |
---|
70 | sortCFListByLevel (CFList& list); |
---|
71 | |
---|
72 | /*BEGINPUBLIC*/ |
---|
73 | |
---|
74 | CanonicalForm |
---|
75 | Prem (const CanonicalForm& F, const CanonicalForm& G); |
---|
76 | |
---|
77 | /*ENDPUBLIC*/ |
---|
78 | |
---|
79 | CanonicalForm |
---|
80 | Premb (const CanonicalForm &f, const CFList &L); |
---|
81 | |
---|
82 | CanonicalForm |
---|
83 | Prem (const CanonicalForm &f, const CFList &L); |
---|
84 | |
---|
85 | CFList uniGcd (const CFList& L); |
---|
86 | |
---|
87 | CFList |
---|
88 | factorsOfInitials(const CFList & L); |
---|
89 | |
---|
90 | void |
---|
91 | removeContent (CanonicalForm& F, CanonicalForm& cF); |
---|
92 | |
---|
93 | CFList |
---|
94 | factorPSet (const CFList& PS); |
---|
95 | |
---|
96 | void |
---|
97 | removeFactors (CanonicalForm& r, StoreFactors& StoredFactors, |
---|
98 | CFList& removedFactors); |
---|
99 | |
---|
100 | CFList |
---|
101 | removeContent (const CFList & PS, StoreFactors & StoredFactors); |
---|
102 | |
---|
103 | ListCFList |
---|
104 | contract (const ListCFList& cs); |
---|
105 | |
---|
106 | bool |
---|
107 | isSubset (const CFList &PS, const CFList& Cset); |
---|
108 | |
---|
109 | ListCFList |
---|
110 | adjoin (const CFList& is, const CFList& qs, const ListCFList& qh); |
---|
111 | |
---|
112 | ListCFList |
---|
113 | adjoinb (const CFList & is, const CFList & qs, const ListCFList & qh, |
---|
114 | const CFList & cs); |
---|
115 | |
---|
116 | void |
---|
117 | inplaceUnion (const ListCFList& a, ListCFList& b); |
---|
118 | |
---|
119 | void |
---|
120 | select (const ListCFList& ppi, int length, ListCFList& ppi1, ListCFList& ppi2); |
---|
121 | |
---|
122 | CanonicalForm normalize (const CanonicalForm& F); |
---|
123 | |
---|
124 | #endif |
---|