1 | /*****************************************************************************\ |
---|
2 | * Computer Algebra System SINGULAR |
---|
3 | \*****************************************************************************/ |
---|
4 | /** @file facFqFactorizeUtil.h |
---|
5 | * |
---|
6 | * This file provides utility functions for multivariate factorization |
---|
7 | * |
---|
8 | * @author Martin Lee |
---|
9 | * |
---|
10 | * @internal @version \$Id$ |
---|
11 | * |
---|
12 | **/ |
---|
13 | /*****************************************************************************/ |
---|
14 | |
---|
15 | #ifndef FAC_FQ_FACTORIZE_UTIL_H |
---|
16 | #define FAC_FQ_FACTORIZE_UTIL_H |
---|
17 | |
---|
18 | #include <config.h> |
---|
19 | |
---|
20 | #include "canonicalform.h" |
---|
21 | #include "cf_map.h" |
---|
22 | |
---|
23 | /// append @a factors2 to @a factors1 and decompress |
---|
24 | /// |
---|
25 | void decompressAppend (CFList& factors1, ///< [in,out] a list of polys, |
---|
26 | ///< returns @a factors2 appended |
---|
27 | ///< to it and everything is |
---|
28 | ///< decompressed |
---|
29 | const CFList& factors2, ///< [in] a list of polys |
---|
30 | const CFMap& N ///< [in] a map |
---|
31 | ); |
---|
32 | |
---|
33 | /// swap elements in @a factors2 and append them to @a factors1 |
---|
34 | /// |
---|
35 | void appendSwap (CFList& factors1, ///< [in,out] a list of polys, |
---|
36 | ///< returns swapped elements of @a |
---|
37 | ///< factors2 appended to it |
---|
38 | const CFList& factors2, ///< [in] a list of polys |
---|
39 | const int swapLevel1, ///< [in] level of variable to be |
---|
40 | ///< swapped with x, 0 if no swapping |
---|
41 | const int swapLevel2, ///< [in] level of variable to be |
---|
42 | ///< swapped with x, 0 if no swapping |
---|
43 | const Variable& x ///< [in] a variable |
---|
44 | ); |
---|
45 | |
---|
46 | /// swap elements in @a factors |
---|
47 | void swap (CFList& factors, ///< [in] a list of polys, returns swapped |
---|
48 | ///< elements of factors |
---|
49 | const int swapLevel1, ///< [in] level of variable to be |
---|
50 | ///< swapped with x, 0 if no swapping |
---|
51 | const int swapLevel2, ///< [in] level of variable to be |
---|
52 | ///< swapped with x, 0 if no swapping |
---|
53 | const Variable& x ///< [in] a variable |
---|
54 | ); |
---|
55 | |
---|
56 | /// swap elements of @a factors2, append them to @a factors1 and decompress |
---|
57 | void appendSwapDecompress ( |
---|
58 | CFList& factors1, ///< [in,out] a list of polys, |
---|
59 | ///< returns swapped elements of @a |
---|
60 | ///< factors2 appended to it and |
---|
61 | ///< everything is decompressed |
---|
62 | const CFList& factors2, ///< [in] a list of polys |
---|
63 | const CFMap& N, ///< [in] a map |
---|
64 | const int swapLevel, ///< [in] level of variable to be |
---|
65 | ///< swapped with x, 0 if no swapping |
---|
66 | const Variable& x ///< [in] a variable |
---|
67 | ); |
---|
68 | |
---|
69 | /// swap elements of @a factors2, append them to @a factors1 and decompress |
---|
70 | void appendSwapDecompress ( |
---|
71 | CFList& factors1, ///< [in,out] a list of polys, |
---|
72 | ///< returns swapped elements of @a |
---|
73 | ///< factors2 appended to it and |
---|
74 | ///< everything is decompressed |
---|
75 | const CFList& factors2, ///< [in] a list of polys |
---|
76 | const CFMap& N, ///< [in] a map |
---|
77 | const int swapLevel1, ///< [in] level of variable to be |
---|
78 | ///< swapped with x, 0 if no swapping |
---|
79 | const int swapLevel2, ///< [in] level of variable to be |
---|
80 | ///< swapped with x, 0 if no swapping |
---|
81 | const Variable& x ///< [in] a variable |
---|
82 | ); |
---|
83 | |
---|
84 | |
---|
85 | /// compute lifting bounds |
---|
86 | /// |
---|
87 | /// @return @a liftingBounds returns an array containing the lift bounds for A |
---|
88 | int* liftingBounds (const CanonicalForm& A, ///< [in] a compressed poly |
---|
89 | const int& bivarLiftBound ///< [in] lift bound for |
---|
90 | ///< @a biFactorizer() |
---|
91 | ); |
---|
92 | |
---|
93 | /// shift evaluation point to zero |
---|
94 | /// @return @a shift2Zero returns @a F shifted by @a evaluation s.t. 0 is a |
---|
95 | /// valid evaluation point |
---|
96 | /// @sa evalPoints(), reverseShift() |
---|
97 | CanonicalForm |
---|
98 | shift2Zero (const CanonicalForm& F, ///< [in] a compressed poly |
---|
99 | CFList& Feval, ///< [in,out] an empty list, returns |
---|
100 | ///< @a F successively evaluated |
---|
101 | ///< at 0 |
---|
102 | const CFList& evaluation ///< [in] a valid evaluation point |
---|
103 | ); |
---|
104 | |
---|
105 | /// reverse shifting the evaluation point to zero |
---|
106 | /// |
---|
107 | /// @return @a reverseShift returns a poly whose shift to zero is reversed |
---|
108 | /// @sa shift2Zero(), evalPoints() |
---|
109 | CanonicalForm reverseShift (const CanonicalForm& F, ///< [in] a compressed poly |
---|
110 | const CFList& evaluation ///< [in] a valid |
---|
111 | ///< evaluation point |
---|
112 | ); |
---|
113 | |
---|
114 | #endif |
---|
115 | /* FAC_FQ_FACTORIZE_UTIL_H */ |
---|
116 | |
---|