source: git/kernel/F5cData.h @ 9af8d18

spielwiese
Last change on this file since 9af8d18 was 4feee0a, checked in by Christian Eder, 15 years ago
fixed inlining git-svn-id: file:///usr/local/Singular/svn/trunk@11982 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 4.9 KB
Line 
1/*!
2 * \file F5cData.h
3 * \author Christian Eder
4 * \date 07/07/2009
5 * \version 0.01
6 * \brief Declarations of the classes CPair and Rule.
7 * \details This file contains the declarations of the class \c CPair, representing
8 * critical pairs, and the class \c Label, representing the labels, in the F5C
9 * Algorithm. All methods are inlined.
10 */
11
12#ifndef F5CDATA_HEADER
13#define F5CDATA_HEADER
14#ifdef HAVE_F5C
15
16/*!
17 * class definitions of the needed datatypes in the F5C algorithm:
18 * (a) critical pairs
19 * (b) labels
20 */
21class CPair;
22class Label;
23class PolyAndShort;
24
25/*!
26 * \class CPair
27 * \author Christian Eder
28 * \brief This is the data structure of a critical pair in the F5C implementation.
29 * \details
30 */
31class CPair {
32  private:
33 
34  public:
35
36}; // end CPair
37
38
39/*!
40 * \class Label
41 * \author Christian Eder
42 * \brief This is the data structure of a rule, i.e. a label in the F5C
43 * Algorithm.
44 * \details
45 */
46class Label {
47  private:
48    int* m_pExpVec;
49    unsigned long m_nShortExpVec;
50  public:
51    /*!
52     * \fn Label(int* expVec);
53     * \param[in] expVec The exponent vector of some monomial defining a label
54     * \brief Constructor of an object of class \c Label
55     */
56    Label(int* expVec);
57    /*!
58     * \fn ~Label();
59     * \brief Destructor of an object of class \c Label
60     */
61    ~Label();
62    /*!
63     * \fn static inline int getExpVec();
64     * \return The first entry of the \c integer vector at the address \c m_pExpVec
65     * \brief Getter of the \c integer vector at the address \c m_pExpVec
66     */
67    inline int* getExpVec(); 
68    /*!
69     * \fn static inline long getShortExpVec();
70     * \return The short exponent vector \c m_nShortExpVec of the label
71     * \brief Getter of the \code unsigned long m_nShortExpVec \endcode
72     *
73     */
74    inline unsigned long getShortExpVec(); 
75    /*!
76     * \fn static inline unsigned long computeShortExpVec(int* expVec);
77     * \param[in] expVec The exponent vector of some monomial defining a label
78     * \return Short exponent vector of type \code unsigned long \endcode
79     * \brief Computation of the short exponent vector of type \code unsigned
80     * long \endcode of the exponent vector \c expVec
81     * \note This method is originally in polys-impl.cc, in this version here it
82     * is optimized for the case of working with exponent vectors and not with
83     * polys as input data.
84     */
85    unsigned long computeShortExpVec(int* expVec);
86    /*!
87     * \fn static inline unsigned long getBitFields(int e, unsigned int s,
88     * unsigned int n);
89     * \param[in] e Entry of the exponent vector
90     * \param[in] s Integer smaller than the bitsize of \c long
91     * \param[in] n Integer representing the number of bits per entry of the
92     * exponent vector \c expVec
93     * \return \code unsigned long \endcode the bitfield for the input data
94     * \brief Computation of the bitfield of type \code unsigned long \endcode
95     * for an entry \c e of the given exponent vector \c expVec at an iteration
96     * step where \c s iterates over all \c integers smaller than the bitsize of
97     * \c long, and \c n iterates over the number of bits per entry of the
98     * exponent vector \c expVec
99     * \note This method is originally in polys-impl.cc, in this version here it
100     * is optimized for the case of working with exponent vectors and not with
101     * polys as input data.
102     */
103    unsigned long getBitFields(int e, unsigned int s, unsigned int n);
104}; // end Label
105
106/*!
107 * \class PolyAndShort
108 * \author Christian Eder
109 * \brief This is the data structure of a polynomial together with the short
110 * exponent vector of its leading monomial in F5C
111 * \details
112 */
113class PolyAndShort {
114  private:
115    poly          m_poly;
116    unsigned long m_nShortExpVec;
117  public:
118    /*!
119     * \fn PolyAndShort(poly p);
120     * \param[in] p The polynomial to be stored
121     * \brief Constructor of an object of class \c PolyAndShort
122     * \details Constructor of an object of class \c PolyAndShort used when
123     * inserting an element generating the input ideal \c I of the F5C Algorithm
124     */
125    PolyAndShort(poly p);
126    /*!
127     * \fn ~Label();
128     * \brief Destructor of an object of class \c Label
129     */
130    ~PolyAndShort();
131    /*!
132     * \fn static inline int getExpVec();
133     * \return The first entry of the \c integer vector at the address \c m_pExpVec
134     * \brief Getter of the \c integer vector at the address \c m_pExpVec
135     */
136    inline unsigned int* getExpVec(); 
137    /*!
138     * \fn static inline long getShortExpVec();
139     * \return The short exponent vector \c m_nShortExpVec of the label
140     * \brief Getter of the \code unsigned long m_nShortExpVec \endcode
141     *
142     */
143
144}; // end LPoly
145
146
147// ---INLINE IMPLEMENTATIONS OF LABEL---
148
149// GETTER of class Label
150int* Label::getExpVec() {
151  return m_pExpVec;
152}
153
154unsigned long Label::getShortExpVec() {
155  return m_nShortExpVec;
156}
157
158
159// SETTER of class Label
160
161// ---END LABEL IMPLEMENTATIONS---
162
163#endif
164// HAVE_F5C
165#endif
166// F5CDATA_HEADER
Note: See TracBrowser for help on using the repository browser.