source: git/factory/cfCharSetsUtil.h @ 864320

spielwiese
Last change on this file since 864320 was ffb732, checked in by Martin Lee <martinlee84@…>, 10 years ago
replaced isSame, isMember, MyUnion, minus by new templates
  • Property mode set to 100644
File size: 2.8 KB
Line 
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**/
28class 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
45Variable
46get_max_var (const CFList & PS);
47
48CFList
49only_in_one (const CFList & PS, const Variable & x);
50
51Varlist
52reorderb (const Varlist & difference, const CFList & PS,
53          const int highest_level);
54
55CFList
56swapvar (const CFList & PS, const Variable & x, const Variable & y);
57
58CFFList
59swapvar (const CFFList & PS, const Variable & x, const Variable & y);
60
61CanonicalForm
62lowestRank (const CFList & L);
63
64CFList initials (const CFList& L);
65
66void
67sortListCFList (ListCFList& list);
68
69void
70sortCFListByLevel (CFList& list);
71
72CanonicalForm
73Prem (const CanonicalForm& F, const CanonicalForm& G);
74
75CanonicalForm
76Premb (const CanonicalForm &f, const CFList &L);
77
78CanonicalForm
79Prem (const CanonicalForm &f, const CFList &L);
80
81CFList uniGcd (const CFList& L);
82
83CFList
84factorsOfInitials(const CFList & L);
85
86void
87removeContent (CanonicalForm& F, CanonicalForm& cF);
88
89CFList
90factorPSet (const CFList& PS);
91
92void
93removeFactors (CanonicalForm& r, StoreFactors& StoredFactors,
94               CFList& removedFactors);
95
96CFList
97removeContent (const CFList & PS, StoreFactors & StoredFactors);
98
99ListCFList
100contract (const ListCFList& cs);
101
102bool
103isSubset (const CFList &PS, const CFList& Cset);
104
105ListCFList
106adjoin (const CFList& is, const CFList& qs, const ListCFList& qh);
107
108ListCFList
109adjoinb (const CFList & is, const CFList & qs, const ListCFList & qh,
110         const CFList & cs);
111
112void
113inplaceUnion (const ListCFList& a, ListCFList& b);
114
115void
116select (const ListCFList& ppi, int length, ListCFList& ppi1, ListCFList& ppi2);
117
118CanonicalForm normalize (const CanonicalForm& F);
119
120#endif
Note: See TracBrowser for help on using the repository browser.