This file is indexed.

/usr/include/singular/singular/kernel/GBEngine/f5lists.h is in libsingular4-dev-common 1:4.1.0-p3+ds-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
/****************************************
*  Computer Algebra System SINGULAR     *
****************************************/
/*
* ABSTRACT: list interface
*/
#include <kernel/GBEngine/f5data.h>
#ifndef F5LISTS_HEADER
#define F5LISTS_HEADER

#ifdef HAVE_F5
/*
============================
============================
classes for lists used in F5
============================
============================
*/
class PNode;
class PList;
class LNode;
class LList;
class LTagNode;
class LTagList;
class CNode;
class CListOld;
class RList;
class RNode;
class RTagNode;
class RTagList;


/**
 * class PNode of nodes of polynomials
 */
class PNode {
  private:
    poly   data;
    PNode*  next;
  public:
    PNode(poly p, PNode* n);
    poly getPoly();
    PNode* getNext();
    PNode* insert(poly p);
};

/**
 * class PList of lists of PNodes
 */
class PList {
  private:
    PNode* first;
  public:
    PList();
    void insert(poly p);
    bool check(poly p);
    void print();
};

/*
=======================================
class LNode (nodes for lists of LPolyOlds)
=======================================
*/
class LNode {
    private:
        LPolyOld*  data;
        LNode*  next;
    public:
        // generating new list elements from the labeled / classical polynomial view
                LNode();
                LNode(LPolyOld* lp);
                LNode(LPolyOld* lp, LNode* l);
                LNode(poly t, int i, poly p, RuleOld* r=NULL);
                LNode(poly t, int i, poly p, RuleOld* r, LNode* l);
                LNode(LNode* ln);
                ~LNode();
        void    deleteAll();
        // insert new elements to the list at the end from the labeled / classical polynomial view
        // needed for gPrev
        LNode*  insert(LPolyOld* lp);
        LNode*  insert(poly t, int i, poly p, RuleOld* r);
        LNode*  insertByDeg(LPolyOld* lp);
        // insert new elements to the list in front from the labeled / classical polynomial view
        // needed for sPolyList
        LNode*  insertSP(LPolyOld* lp);
        LNode*  insertSP(poly t, int i, poly p, RuleOld* r);
        // insert new elements to the list with resp. to increasing labels
        // only used for the S-polys to be reduced (TopReduction building new S-polys with higher label)
        LNode*  insertByLabel(poly t, int i, poly p, RuleOld* r);
        LNode*  insertByLabel(LNode* l);
        LNode*  insertFirst(LNode* l);
        // deletes the first elements of the list with the same degree
        // get next & prev from current LNode
        LNode*  getNext();
        LNode*  getPrev();
        // only used for the S-polys, which are already sorted by increasing degree by CListOld
        LNode*  deleteByDeg();
        // get the LPolyOld* out of LNode*
        LPolyOld*  getLPolyOld();
        // get the data from the LPolyOld saved in LNode
        poly    getPoly();
        poly    getTerm();
        int     getIndex();
        RuleOld*   getRuleOld();
        bool    getDel();
        // set the data from the LPolyOld saved in LNode
        void    setPoly(poly p);
        void    setTerm(poly t);
        void    setIndex(int i);
        void    setNext(LNode* l);
        void    setRuleOld(RuleOld* r);
        void    setDel(bool d);
        // test if for any list element the polynomial part of the data is equal to *p
        bool    polyTest(poly* p);
        LNode*  getNext(LNode* l);
        void    print();
        int     count(LNode* l);
};


/*
============================
class LList(lists of LPolyOlds)
============================
*/
class LList {
    private:
        LNode*  first;
        LNode*  last;
        int     length;
    public:
                LList();
                LList(LPolyOld* lp);
                LList(poly t,int i,poly p, RuleOld* r = NULL);
                ~LList();
        // insertion at the end of the list
        // needed for gPrev
        void    insert(LPolyOld* lp);
        void    insert(poly t,int i, poly p, RuleOld* r = NULL);
        void    insertByDeg(LPolyOld* lp);
        // insertion in front of the list
        // needed for sPolyList
        void    insertSP(LPolyOld* lp);
        void    insertSP(poly t,int i, poly p, RuleOld* r = NULL);
        void    insertByLabel(poly t, int i, poly p, RuleOld* r = NULL);
        void    insertByLabel(LNode* l);
        void    insertFirst(LNode* l);
        void    deleteByDeg();
        bool    polyTest(poly* p);
        LNode*  getFirst();
        LNode*  getLast();
        int     getLength();
        void    setFirst(LNode* l);
        void    print();
        int     count(LNode* l);
};



/*
==============================================
class LtagNode (nodes for lists of LPolyOld tags)
==============================================
*/
class LTagNode {
    private:
        LNode*      data;
        LTagNode*   next;
    public:
        LTagNode();
        LTagNode(LNode* l);
        LTagNode(LNode* l, LTagNode* n);
        ~LTagNode();
        // declaration with first as parameter due to sorting of LTagList
        LTagNode*   insert(LNode* l);
        LNode*      getLNode();
        LTagNode*   getNext();
        LNode*      get(int i, int length);
};


/*
=========================================================================
class LTagList(lists of LPolyOld tags, i.e. first elements of a given index)
=========================================================================
*/
class LTagList {
    private:
        LTagNode*   first;
        LNode*      firstCurrentIdx;
        int         length;
    public:
                LTagList();
                LTagList(LNode* l);
                ~LTagList();
        // declaration with first as parameter in LTagNode due to sorting of LTagList
        void    insert(LNode* l);
        void    setFirstCurrentIdx(LNode* l);
        LNode*  get(int idx);
        LNode*  getFirst();
        LNode*  getFirstCurrentIdx();
};

LNode*  getGPrevRedCheck();
LNode*  getcompletedRedCheck();


/*
======================================================================================
class TopRed(return values of subalgorithm TopRed in f5gb.cc), i.e. the first elements
             of the lists LList* completed & LList* sPolyList
======================================================================================
*/
class TopRed {
    private:
        LList*  _completed;
        LList*  _toDo;
    public:
                TopRed();
                TopRed(LList* c, LList* t);
        LList*  getCompleted();
        LList*  getToDo();
};


/*
=======================================
class CNode (nodes for lists of CPairOlds)
=======================================
*/
class CNode {
    private:
        CPairOld* data;
        CNode* next;
    public:
                CNode();
                CNode(CPairOld* c);
                CNode(CPairOld* c, CNode* n);
                ~CNode();
        CNode*  insert(CPairOld* c);
        CNode*  insertWithoutSort(CPairOld* cp);
        CNode*  getMinDeg();
        CPairOld*  getData();
        CNode*  getNext();
        LPolyOld*  getAdLp1();
        LPolyOld*  getAdLp2();
        poly    getLp1Poly();
        poly    getLp2Poly();
        poly    getLp1Term();
        poly    getLp2Term();
        poly    getT1();
        poly*   getAdT1();
        poly    getT2();
        poly*   getAdT2();
        int     getLp1Index();
        int     getLp2Index();
        bool    getDel();
        RuleOld*   getTestedRuleOld();
        void    print();
};


/*
============================
class CListOld(lists of CPairOlds)
============================
*/
class CListOld {
    private:
        CNode*  first;
    public:
                // for initialization of CListOlds, last element alwas has data=NULL and next=NULL
                CListOld();
                CListOld(CPairOld* c);
                ~CListOld();
        CNode*  getFirst();
        void    insert(CPairOld* c);
        void    insertWithoutSort(CPairOld* c);
        CNode*  getMinDeg();
        void    print();
};


/*
======================================
class RNode (nodes for lists of RuleOlds)
======================================
*/
class RNode {
    private:
        RuleOld*   data;
        RNode*  next;
    public:
                RNode();
                RNode(RuleOld* r);
                ~RNode();
        RNode*  insert(RuleOld* r);
        RNode*  insert(int i, poly t);
        RNode*  insertOrdered(RuleOld* r);
        RNode*  getNext();
        RuleOld*   getRuleOld();
        int     getRuleOldIndex();
        poly    getRuleOldTerm();
        void    print();
};

/*
============================
class RList (lists of RuleOlds)
============================
*/
class RList {
    private:
        RNode*  first;
        // last alway has data=NULL and next=NULL, for initialization purposes used
        RNode*  last;
    public:
                RList();
                RList(RuleOld* r);
                ~RList();
        void    insert(RuleOld* r);
        void    insert(int i, poly t);
        void    insertOrdered(RuleOld* r);
        RNode*  getFirst();
        RuleOld*   getRuleOld();
        void    print();
};



/*
=============================================
class RtagNode (nodes for lists of RuleOld tags)
=============================================
*/
class RTagNode {
    private:
        RNode*      data;
        RTagNode*   next;
    public:
                    RTagNode();
                    RTagNode(RNode* r);
                    RTagNode(RNode* r, RTagNode* n);
                    ~RTagNode();
        // declaration with first as parameter due to sorting of LTagList
        RTagNode*   insert(RNode* r);
        RNode*      getRNode();
        RTagNode*   getNext();
        RNode*      get(int idx, int length);
        void        set(RNode*);
        void        print();
};


/*
========================================================================
class RTagList(lists of RuleOld tags, i.e. first elements of a given index)
========================================================================
*/
class RTagList {
    private:
        RTagNode*   first;
        int         length;
    public:
                RTagList();
                RTagList(RNode* r);
                ~RTagList();
        // declaration with first as parameter in LTagNode due to sorting of LTagList
        void    insert(RNode* r);
        RNode*  getFirst();
        RNode*  get(int idx);
        void    setFirst(RNode* r);
        void    print();
        int     getLength();
};
#endif
#endif