File: cfCharSetsUtil.h

package info (click to toggle)
singular 1%3A4.1.1-p2%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 35,860 kB
  • sloc: cpp: 288,280; ansic: 17,387; lisp: 4,242; yacc: 1,654; python: 1,608; makefile: 1,424; lex: 1,387; perl: 632; sh: 567; xml: 182
file content (124 lines) | stat: -rw-r--r-- 2,919 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*****************************************************************************\
 * Computer Algebra System SINGULAR
\*****************************************************************************/
/** @file cfCharSetsUtil.h
 *
 * This file provides utility functions to compute characteristic sets
 *
 * @note some of the code is code from libfac or derived from code from libfac.
 * Libfac is written by M. Messollen. See also COPYING for license information
 * and README for general information on characteristic sets.
 *
 * ABSTRACT: Descriptions can be found in Wang "On the Parallelization of
 * characteristic-set based algorithms" or Greuel/Pfister "A Singular
 * Introduction to Commutative Algebra".
 *
 * @author Martin Lee
 *
 **/
/*****************************************************************************/

#ifndef CF_CHARSETS_UTIL
#define CF_CHARSETS_UTIL

/*BEGINPUBLIC*/
/**
 * class to store factors that get removed during char set computation
**/
class StoreFactors
{
  public:
    CFList FS1; ///< factors that were removed
    CFList FS2; ///< candidate factors that might get removed
    inline StoreFactors& operator= (const StoreFactors& value)
    {
      if ( this != &value )
      {
        FS1 = value.FS1;
        FS2 = value.FS2;
      }
      return *this;
    }
};
/*ENDPUBLIC*/

Variable
get_max_var (const CFList & PS);

CFList
only_in_one (const CFList & PS, const Variable & x);

Varlist
reorderb (const Varlist & difference, const CFList & PS,
          const int highest_level);

CFList
swapvar (const CFList & PS, const Variable & x, const Variable & y);

CFFList
swapvar (const CFFList & PS, const Variable & x, const Variable & y);

CanonicalForm
lowestRank (const CFList & L);

CFList initials (const CFList& L);

void
sortListCFList (ListCFList& list);

void
sortCFListByLevel (CFList& list);

/*BEGINPUBLIC*/

CanonicalForm
Prem (const CanonicalForm& F, const CanonicalForm& G);

/*ENDPUBLIC*/

CanonicalForm
Premb (const CanonicalForm &f, const CFList &L);

CanonicalForm
Prem (const CanonicalForm &f, const CFList &L);

CFList uniGcd (const CFList& L);

CFList
factorsOfInitials(const CFList & L);

void
removeContent (CanonicalForm& F, CanonicalForm& cF);

CFList
factorPSet (const CFList& PS);

void
removeFactors (CanonicalForm& r, StoreFactors& StoredFactors,
               CFList& removedFactors);

CFList
removeContent (const CFList & PS, StoreFactors & StoredFactors);

ListCFList
contract (const ListCFList& cs);

bool
isSubset (const CFList &PS, const CFList& Cset);

ListCFList
adjoin (const CFList& is, const CFList& qs, const ListCFList& qh);

ListCFList
adjoinb (const CFList & is, const CFList & qs, const ListCFList & qh,
         const CFList & cs);

void
inplaceUnion (const ListCFList& a, ListCFList& b);

void
select (const ListCFList& ppi, int length, ListCFList& ppi1, ListCFList& ppi2);

CanonicalForm normalize (const CanonicalForm& F);

#endif