source: git/factory/facFqFactorizeUtil.h @ ab547e2

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