source: git/factory/ExtensionInfo.h @ e4fe2b

jengelh-datetimespielwiese
Last change on this file since e4fe2b was e4fe2b, checked in by Oleksandr Motsak <motsak@…>, 11 years ago
FIX: Fixed huge BUG in cf_gmp.h CHG: starting to cleanup factory
  • Property mode set to 100644
File size: 5.8 KB
Line 
1/*****************************************************************************\
2 * Computer Algebra System SINGULAR
3\*****************************************************************************/
4/** @file ExtensionInfo.h
5 *
6 * This file provides a class to store information about finite fields and
7 * extensions thereof.
8 *
9 *
10 * @author Martin Lee
11 *
12 * @internal @version \$Id$
13 *
14 **/
15/*****************************************************************************/
16
17#ifndef EXTENSION_INFO_H
18#define EXTENSION_INFO_H
19
20// #include "config.h"
21
22#include "canonicalform.h"
23
24/** @class ExtensionInfo ExtensionInfo.h "factory/ExtensionInfo.h"
25 *  ExtensionInfo contains information about extension.
26 *  If @a m_extension is true we are in an extension of some initial field.
27 *  If the initial field is \f$ F_p \f$ and we pass to \f$ F_p (\alpha) \f$
28 *  then @a m_alpha is an algebraic variable, @a m_beta= Variable(1),
29 *  @a m_gamma= @a m_delta= 1, @a m_GFDegree= 0, @a m_GFName= 'Z'. If we pass
30 *  to some GF (p^k) then @a m_alpha= Variable (1), @a m_beta= Variable(1),
31 *  @a m_gamma= @a m_delta= 1, @a m_GFDegree= 1, @a m_GFName= 'Z'.
32 *  @n If the initial field is \f$ F_p (\epsilon) \f$, then @a m_beta=
33 *  \f$ \epsilon \f$, @a m_alpha an algebraic variable defining an extension of
34 *  \f$ F_p (\epsilon) \f$, @a m_gamma is a primitive element of
35 *  \f$ F_p (\alpha) \f$, @a m_delta is a primitive element of
36 *  \f$ F_p (\beta) \f$, @a m_GFDegree= 0, @a m_GFName= 'Z'.
37 *  @n If the initial field is GF(p^k), then @a m_alpha= Variable (1),
38 *  @a m_beta= Variable (1), @a m_gamma= 1, @a m_delta= 1, @a m_GFDegree()= k,
39 *  @a m_GFName= gf_name of the initial field.
40 *  @n If @a m_extension is false and the current field is \f$ F_p \f$ then
41 *  @a m_alpha= Variable (1), @a m_beta= Variable (1), @a m_gamma= 1,
42 *  @a m_delta= 1, @a m_GFDegree= 1, @a m_GFName= 'Z'.
43 *  @n If the current field is \f$ F_p (\alpha) \f$ then
44 *  @a m_alpha is some algebraic variable, @a m_beta= Variable (1),
45 *  @a m_gamma= 1, @a m_delta= 1, @a m_GFDegree= 0, @a m_GFName= 'Z'.
46 *  @n If the current field is GF then @a m_alpha= Variable (1),
47 *  @a m_beta= Variable (1),  @a m_gamma= 1, @a m_delta= 1,
48 *  @a m_GFDegree= getGFDegree(), @a m_GFName= gf_name.
49 *
50 *  @sa facFqBivar.h, facFqFactorize.h
51 */
52class ExtensionInfo
53{
54private:
55  /// an algebraic variable or Variable (1)
56  Variable m_alpha;
57  /// an algebraic variable or Variable (1)
58  Variable m_beta;
59  /// a primitive element of \f$ F_p (\alpha) \f$ or 1
60  CanonicalForm m_gamma;
61  /// a primitive element of \f$ F_p (\beta) \f$ or 1
62  CanonicalForm m_delta;
63  /// GF degree or 1
64  int m_GFDegree;
65  /// name of GF variable
66  char m_GFName;
67  /// indicates if we are in an extension of some initial field
68  bool m_extension;
69public:
70  /// \f$ F_p \f$ as initial field, if @a extension is true we are in some GF
71  ExtensionInfo (const bool extension  ///< [in] some bool
72                );
73  /// Construct an @a ExtensionInfo
74  ExtensionInfo (const Variable& alpha,      ///< [in] some algebraic variable
75                 const Variable& beta,       ///< [in] some algebraic variable
76                 const CanonicalForm& gamma, ///< [in] some primitive element
77                                             ///< of \f$ F_p (\alpha) \f$
78                 const CanonicalForm& delta, ///< [in] some primitive element
79                                             ///< of \f$ F_p (\beta) \f$
80                 const int nGFDegree,        ///< [in] GFDegree of initial field
81                 const char cGFName,         ///< [in] name of GF variable of
82                                             ///< initial field
83                 const bool extension        ///< [in] some bool
84                );
85  /// \f$ F_p (\beta) \f$ as initial field and switch to an extension given by
86  /// @a alpha, needs primitive elements @a gamma and @a delta for maps
87  /// between \f$ F_p (\alpha) \subset F_p (\beta) \f$
88  ExtensionInfo (const Variable& alpha,      ///< [in] some algebraic variable
89                 const Variable& beta,       ///< [in] some algebraic variable
90                 const CanonicalForm& gamma, ///< [in] some primitive element
91                                             ///< of \f$ F_p (\alpha) \f$
92                 const CanonicalForm& delta  ///< [in] some primitive element
93                                             ///< of \f$ F_p (\beta) \f$
94                );
95  /// \f$ F_p (\alpha) \f$ as initial field, if @a extension is false.
96  /// Else initial field is \f$ F_p \f$
97  ExtensionInfo (const Variable& alpha, ///< [in] some algebraic variable
98                 const bool extension   ///< [in] some bool
99                );
100
101  ExtensionInfo (const Variable& alpha ///< [in] some algebraic variable
102                );
103
104  /// GF as initial field
105  ExtensionInfo (const int nGFDegree,   ///< [in] GF degree of initial field
106                 const char cGFName,    ///< [in] name of GF variable
107                 const bool extension   ///< [in] some bool
108                );
109
110  /// getter
111  ///
112  /// @return @a getAlpha() returns @a m_alpha
113  Variable getAlpha () const
114  {
115    return m_alpha;
116  }
117  /// getter
118  ///
119  /// @return @a getBeta() returns @a m_beta
120  Variable getBeta () const
121  {
122    return m_beta;
123  }
124  /// getter
125  ///
126  /// @return @a getGamma() returns @a m_gamma
127  CanonicalForm getGamma() const
128  {
129    return m_gamma;
130  }
131  /// getter
132  ///
133  /// @return @a getDelta() returns @a m_delta
134  CanonicalForm getDelta() const
135  {
136    return m_delta;
137  }
138  /// getter
139  ///
140  /// @return @a getGFDegree() returns @a m_GFDegree
141  int getGFDegree() const
142  {
143    return m_GFDegree;
144  }
145  /// getter
146  ///
147  /// @return @a getGFName() returns @a m_GFName
148  char getGFName() const
149  {
150    return m_GFName;
151  }
152  /// getter
153  ///
154  /// @return @a isInextension() returns @a m_extension
155  bool isInExtension() const
156  {
157    return m_extension;
158  }
159};
160
161#endif
162/* EXTENSION_INFO_H */
163
Note: See TracBrowser for help on using the repository browser.