source: git/factory/cfCharSetsUtil.h @ 8d1432e

spielwiese
Last change on this file since 8d1432e was 70e277, checked in by Doug Torrance <dtorrance@…>, 8 years ago
factory: make Prem public It is used by Macaulay2. Currently, factory is patched so that Prem is public [1] and built from source by the M2 build system. However, if factory already exists on the system, it would be nice to be able to use it (see [2]). [1] https://github.com/Macaulay2/M2/blob/4af5a55/M2/libraries/factory/patch-4.0.2 [2] https://github.com/Macaulay2/M2/issues/384
  • Property mode set to 100644
File size: 2.9 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
72/*BEGINPUBLIC*/
73
74CanonicalForm
75Prem (const CanonicalForm& F, const CanonicalForm& G);
76
77/*ENDPUBLIC*/
78
79CanonicalForm
80Premb (const CanonicalForm &f, const CFList &L);
81
82CanonicalForm
83Prem (const CanonicalForm &f, const CFList &L);
84
85CFList uniGcd (const CFList& L);
86
87CFList
88factorsOfInitials(const CFList & L);
89
90void
91removeContent (CanonicalForm& F, CanonicalForm& cF);
92
93CFList
94factorPSet (const CFList& PS);
95
96void
97removeFactors (CanonicalForm& r, StoreFactors& StoredFactors,
98               CFList& removedFactors);
99
100CFList
101removeContent (const CFList & PS, StoreFactors & StoredFactors);
102
103ListCFList
104contract (const ListCFList& cs);
105
106bool
107isSubset (const CFList &PS, const CFList& Cset);
108
109ListCFList
110adjoin (const CFList& is, const CFList& qs, const ListCFList& qh);
111
112ListCFList
113adjoinb (const CFList & is, const CFList & qs, const ListCFList & qh,
114         const CFList & cs);
115
116void
117inplaceUnion (const ListCFList& a, ListCFList& b);
118
119void
120select (const ListCFList& ppi, int length, ListCFList& ppi1, ListCFList& ppi2);
121
122CanonicalForm normalize (const CanonicalForm& F);
123
124#endif
Note: See TracBrowser for help on using the repository browser.