1 | #ifndef MINOR_INTERFACE_H |
---|
2 | #define MINOR_INTERFACE_H |
---|
3 | |
---|
4 | |
---|
5 | struct spolyrec; typedef struct spolyrec polyrec; typedef polyrec* poly; |
---|
6 | struct ip_sring; typedef struct ip_sring* ring; typedef struct ip_sring const* const_ring; |
---|
7 | |
---|
8 | struct sip_sideal; typedef struct sip_sideal * ideal; |
---|
9 | |
---|
10 | class ip_smatrix; typedef ip_smatrix * matrix; |
---|
11 | |
---|
12 | /* all computations are module char, if char <> 0; |
---|
13 | if additionally, an ideal i != NULL is given, then computations are |
---|
14 | modulo i (in this case, i is assumed to be a standard basis); |
---|
15 | if k = 0, then all non-zero minors are requested, otherwise |
---|
16 | if k > 0, then the first k non-zero minors are requested, |
---|
17 | if k < 0, then the first |k| minors (zero is allowed) are requested, |
---|
18 | (note that k <> 0 may result in a smaller number k' of |
---|
19 | minors if there are only k' < |k| minors; |
---|
20 | if an algorithm is provided, it must be one of "Bareiss" or |
---|
21 | "Laplace"; when a cache is used, the underlying algorithm |
---|
22 | is automatically Laplace */ |
---|
23 | |
---|
24 | /** |
---|
25 | * Returns the specified set of minors (= subdeterminantes) of the |
---|
26 | * given matrix. These minors form the set of generators of the ideal |
---|
27 | * which is actually returned.<br> |
---|
28 | * If k == 0, all non-zero minors will be computed. For k > 0, only |
---|
29 | * the first k non-zero minors (to some fixed ordering among all minors) |
---|
30 | * will be computed. Use k < 0 to compute the first |k| minors (including |
---|
31 | * zero minors).<br> |
---|
32 | * algorithm must be one of "Bareiss" and "Laplace".<br> |
---|
33 | * i must be either NULL or an ideal capturing a standard basis. In the |
---|
34 | * later case all minors will be reduced w.r.t. i. |
---|
35 | * If allDifferent is true, each minor will be included as generator |
---|
36 | * in the resulting ideal only once; otherwise as often as it occurs as |
---|
37 | * minor value during the computation. |
---|
38 | * @param m the matrix from which to compute minors |
---|
39 | * @param minorSize the size of the minors to be computed |
---|
40 | * @param k the number of minors to be computed |
---|
41 | * @param algorithm the algorithm to be used for the computation |
---|
42 | * @param i NULL or an ideal which encodes a standard basis |
---|
43 | * @param allDifferent if true each minor is considered only once |
---|
44 | * @return the ideal which has as generators the specified set of minors |
---|
45 | */ |
---|
46 | ideal getMinorIdeal (const matrix m, const int minorSize, const int k, |
---|
47 | const char* algorithm, const ideal i, |
---|
48 | const bool allDifferent); |
---|
49 | |
---|
50 | /** |
---|
51 | * Returns the specified set of minors (= subdeterminantes) of the |
---|
52 | * given matrix. These minors form the set of generators of the ideal |
---|
53 | * which is actually returned.<br> |
---|
54 | * If k == 0, all non-zero minors will be computed. For k > 0, only |
---|
55 | * the first k non-zero minors (to some fixed ordering among all minors) |
---|
56 | * will be computed. Use k < 0 to compute the first |k| minors (including |
---|
57 | * zero minors).<br> |
---|
58 | * The underlying algorithm is Laplace's algorithm with caching of certain |
---|
59 | * subdeterminantes. The caching strategy can be set; see |
---|
60 | * int MinorValue::getUtility () const in Minor.cc. cacheN is the maximum |
---|
61 | * number of cached polynomials (=subdeterminantes); cacheW the maximum |
---|
62 | * weight of the cache during all computations.<br> |
---|
63 | * i must be either NULL or an ideal capturing a standard basis. In the |
---|
64 | * later case all minors will be reduced w.r.t. i. |
---|
65 | * If allDifferent is true, each minor will be included as generator |
---|
66 | * in the resulting ideal only once; otherwise as often as it occurs as |
---|
67 | * minor value during the computation. |
---|
68 | * @param m the matrix from which to compute minors |
---|
69 | * @param minorSize the size of the minors to be computed |
---|
70 | * @param k the number of minors to be computed |
---|
71 | * @param i NULL or an ideal which encodes a standard basis |
---|
72 | * @param cacheStrategy one of {1, .., 5}; see Minor.cc |
---|
73 | * @param cacheN maximum number of cached polynomials (=subdeterminantes) |
---|
74 | * @param cacheW maximum weight of the cache |
---|
75 | * @param allDifferent if true each minor is considered only once |
---|
76 | * @return the ideal which has as generators the specified set of minors |
---|
77 | */ |
---|
78 | ideal getMinorIdealCache (const matrix m, const int minorSize, const int k, |
---|
79 | const ideal i, const int cacheStrategy, |
---|
80 | const int cacheN, const int cacheW, |
---|
81 | const bool allDifferent); |
---|
82 | |
---|
83 | /** |
---|
84 | * Returns the specified set of minors (= subdeterminantes) of the |
---|
85 | * given matrix. These minors form the set of generators of the ideal |
---|
86 | * which is actually returned.<br> |
---|
87 | * If k == 0, all non-zero minors will be computed. For k > 0, only |
---|
88 | * the first k non-zero minors (to some fixed ordering among all minors) |
---|
89 | * will be computed. Use k < 0 to compute the first |k| minors (including |
---|
90 | * zero minors).<br> |
---|
91 | * The algorithm is heuristically chosen among "Bareiss", "Laplace", |
---|
92 | * and Laplace with caching (of subdeterminants).<br> |
---|
93 | * i must be either NULL or an ideal capturing a standard basis. In the |
---|
94 | * later case all minors will be reduced w.r.t. i. |
---|
95 | * If allDifferent is true, each minor will be included as generator |
---|
96 | * in the resulting ideal only once; otherwise as often as it occurs as |
---|
97 | * minor value during the computation. |
---|
98 | * @param m the matrix from which to compute minors |
---|
99 | * @param minorSize the size of the minors to be computed |
---|
100 | * @param k the number of minors to be computed |
---|
101 | * @param i NULL or an ideal which encodes a standard basis |
---|
102 | * @param allDifferent if true each minor is considered only once |
---|
103 | * @return the ideal which has as generators the specified set of minors |
---|
104 | */ |
---|
105 | ideal getMinorIdealHeuristic (const matrix m, const int minorSize, |
---|
106 | const int k, const ideal i, |
---|
107 | const bool allDifferent); |
---|
108 | |
---|
109 | #endif |
---|
110 | /* MINOR_INTERFACE_H */ |
---|