source: git/factory/facFqFactorizeUtil.h @ 16055bd

spielwiese
Last change on this file since 16055bd was 72bfc8, checked in by Martin Lee <martinlee84@…>, 12 years ago
chg: deleted @internal
  • Property mode set to 100644
File size: 5.7 KB
Line 
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 **/
11/*****************************************************************************/
12
13#ifndef FAC_FQ_FACTORIZE_UTIL_H
14#define FAC_FQ_FACTORIZE_UTIL_H
15
16// #include "config.h"
17#include "canonicalform.h"
18#include "cf_map.h"
19
20/// append @a factors2 to @a factors1 and decompress
21///
22static inline
23void decompressAppend (CFList& factors1,       ///< [in,out] a list of polys,
24                                               ///< returns @a factors2 appended
25                                               ///< to it and everything is
26                                               ///< decompressed
27                       const CFList& factors2, ///< [in] a list of polys
28                       const CFMap& N          ///< [in] a map
29                      )
30{
31  for (CFListIterator i= factors1; i.hasItem(); i++)
32    i.getItem()= N (i.getItem());
33  for (CFListIterator i= factors2; i.hasItem(); i++)
34    factors1.append (N (i.getItem()));
35}
36
37
38/// swap elements in @a factors2 and append them to @a factors1
39///
40void appendSwap (CFList& factors1,       ///< [in,out] a list of polys,
41                                         ///< returns swapped elements of @a
42                                         ///< factors2 appended to it
43                 const CFList& factors2, ///< [in] a list of polys
44                 const int swapLevel1,   ///< [in] level of variable to be
45                                         ///< swapped with x, 0 if no swapping
46                 const int swapLevel2,   ///< [in] level of variable to be
47                                         ///< swapped with x, 0 if no swapping
48                 const Variable& x       ///< [in] a variable
49                );
50
51/// swap elements in @a factors
52void swap (CFList& factors,       ///< [in] a list of polys, returns swapped
53                                  ///< elements of factors
54           const int swapLevel1, ///< [in] level of variable to be
55                                  ///< swapped with x, 0 if no swapping
56           const int swapLevel2, ///< [in] level of variable to be
57                                  ///< swapped with x, 0 if no swapping
58           const Variable& x      ///< [in] a variable
59          );
60
61/// swap elements of @a factors2, append them to @a factors1 and decompress
62void appendSwapDecompress (
63                  CFList& factors1,       ///< [in,out] a list of polys,
64                                          ///< returns swapped elements of @a
65                                          ///< factors2 appended to it and
66                                          ///< everything is decompressed
67                  const CFList& factors2, ///< [in] a list of polys
68                  const CFMap& N,         ///< [in] a map
69                  const int swapLevel,    ///< [in] level of variable to be
70                                          ///< swapped with x, 0 if no swapping
71                  const Variable& x       ///< [in] a variable
72                          );
73
74/// swap elements of @a factors2, append them to @a factors1 and decompress
75void appendSwapDecompress (
76                  CFList& factors1,       ///< [in,out] a list of polys,
77                                          ///< returns swapped elements of @a
78                                          ///< factors2 appended to it and
79                                          ///< everything is decompressed
80                  const CFList& factors2, ///< [in] a list of polys
81                  const CFMap& N,         ///< [in] a map
82                  const int swapLevel1,   ///< [in] level of variable to be
83                                          ///< swapped with x, 0 if no swapping
84                  const int swapLevel2,   ///< [in] level of variable to be
85                                          ///< swapped with x, 0 if no swapping
86                  const Variable& x       ///< [in] a variable
87                          );
88
89
90/// compute lifting bounds
91///
92/// @return @a liftingBounds returns an array containing the lift bounds for A
93int* liftingBounds (const CanonicalForm& A,    ///< [in] a compressed poly
94                    const int& bivarLiftBound  ///< [in] lift bound for
95                                               ///< @a biFactorizer()
96                   );
97
98/// shift evaluation point to zero
99/// @return @a shift2Zero returns @a F shifted by @a evaluation s.t. 0 is a
100///         valid evaluation point
101/// @sa evalPoints(), reverseShift()
102CanonicalForm
103shift2Zero (const CanonicalForm& F,  ///< [in] a compressed poly
104            CFList& Feval,           ///< [in,out] an empty list, returns
105                                     ///< @a F successively evaluated
106                                     ///< at 0
107            const CFList& evaluation,///< [in] a valid evaluation point
108            int l= 2                 ///< [in] level at which the evaluation
109                                     ///< starts
110           );
111
112/// reverse shifting the evaluation point to zero
113///
114/// @return @a reverseShift returns a poly whose shift to zero is reversed
115/// @sa shift2Zero(), evalPoints()
116CanonicalForm reverseShift (const CanonicalForm& F,  ///< [in] a compressed poly
117                            const CFList& evaluation,///< [in] a valid
118                                                     ///< evaluation point
119                            int l= 2                 ///< [in] level at which
120                                                     ///< the evaluation starts
121                           );
122
123#endif
124/* FAC_FQ_FACTORIZE_UTIL_H */
125
Note: See TracBrowser for help on using the repository browser.