Changeset 66e7b5 in git for kernel/f5lists.h


Ignore:
Timestamp:
Jan 29, 2009, 6:59:30 PM (15 years ago)
Author:
Christian Eder
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
5d0556d9643aab314fbe86e3ef4cbcd69d864661
Parents:
5376a6afb7e0e9c5e8ba37a9e7964552e94edc3b
Message:
subalgorithms criticalPairs, criterion1 and criterion2 added


git-svn-id: file:///usr/local/Singular/svn/trunk@11343 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/f5lists.h

    r5376a6 r66e7b5  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: f5lists.h,v 1.1 2009-01-27 10:38:08 Singular Exp $ */
     4/* $Id: f5lists.h,v 1.2 2009-01-29 17:59:30 ederc Exp $ */
    55/*
    66* ABSTRACT: list interface
     
    2020class LNode;
    2121class LList;
    22 class PrevNode;
    23 class PrevList;
     22class LTagNode;
     23class LTagList;
    2424class CNode;
    2525class CList;
    2626class RList;
    2727class RNode;
    28 
    29 /*
    30 =======================================
    31 LNode class (nodes for lists of LPolys)
     28class RTagNode;
     29class RTagList;
     30
     31
     32/*
     33=======================================
     34class LNode (nodes for lists of LPolys)
    3235=======================================
    3336*/
     
    3942        // generating new list elements from the labeled / classical polynomial view
    4043                LNode(LPoly* lp);
     44                LNode(LPoly* lp, LNode* l);
    4145                LNode(poly* t, int* i, poly* p);
     46                LNode(poly* t, int* i, poly* p, LNode* l);
    4247                LNode(LNode* ln);
    4348                ~LNode();
     
    5661        LPoly*  getLPoly();
    5762        // get the data from the LPoly saved in LNode
    58         poly*   getPoly();
    59         poly*   getTerm();
    60         int*    getIndex();
     63        poly    getPoly();
     64        poly    getTerm();
     65        int     getIndex();
    6166        // test if for any list element the polynomial part of the data is equal to *p
    6267        bool    polyTest(poly* p);
     
    8994
    9095/*
    91 =============================================
    92 PrevNode class (nodes for lists of gPrevLast)
    93 =============================================
    94 */
    95 class PrevNode {
     96==============================================
     97class LtagNode (nodes for lists of LPoly tags)
     98==============================================
     99*/
     100class LTagNode {
    96101    private:
    97102        LNode*      data;
    98         PrevNode*   next;
    99     public:
    100         PrevNode(LNode* l);
    101         ~PrevNode();
    102         PrevNode*   append(LNode* l);
     103        LTagNode*   next;
     104    public:
     105        LTagNode(LNode* l);
     106        LTagNode(LNode* l, LTagNode* n);
     107        ~LTagNode();
     108        // declaration with first as parameter due to sorting of LTagList
     109        LTagNode*   insert(LNode* l);
    103110        LNode*      getLNode();
    104         LNode*      getPrevLast(int i);
    105 };
    106 
    107 
    108 /*
    109 ====================================================
    110 class PrevList(lists of last node elements in gPrev)
    111 ====================================================
    112 */
    113 class PrevList {
    114     private:
    115         PrevNode*   first;
    116         PrevNode*   last;
    117     public:
    118                 PrevList(LNode* l);
    119                 ~PrevList();
    120         void    append(LNode* l);
    121         LNode*  getPrevLast(int i);
     111        LNode*      get(int i, int length);
     112};
     113
     114
     115/*
     116=========================================================================
     117class LTagList(lists of LPoly tags, i.e. first elements of a given index)
     118=========================================================================
     119*/
     120class LTagList {
     121    private:
     122        LTagNode*   first;
     123        int         length;
     124    public:
     125                LTagList(LNode* l);
     126                ~LTagList();
     127        // declaration with first as parameter in LTagNode due to sorting of LTagList
     128        void    insert(LNode* l);
     129        LNode*  get(int idx);
    122130};
    123131
     
    133141        CNode* next;
    134142    public:
     143                CNode();
    135144                CNode(CPair* c);
     145                CNode(CPair* c, CNode* n);
    136146                ~CNode();
    137         CNode*  insert(CPair* c);
     147        CNode*  insert(CPair* c, CNode* last);
    138148        CNode*  getMinDeg();
    139         //CNode*  getLPoly() const;
     149        poly    getLp1Poly();
     150        poly    getLp2Poly();
     151        poly    getLp1Term();
     152        poly    getLp2Term();
     153        poly    getT1();   
     154        poly    getT2();
     155        int     getLp1Index();
     156        int     getLp2Index();
     157        void    print();
    140158};
    141159
     
    149167    private:
    150168        CNode*  first;
    151     public:
     169        // last alway has data=NULL and next=NULL, for initialization purposes used
     170        CNode*  last;
     171    public:
     172                // for initialization of CLists, last element alwas has data=NULL and next=NULL
     173                CList();
    152174                CList(CPair* c);
    153175                ~CList();
    154176        void    insert(CPair* c);
    155177        CNode*  getMinDeg();
    156 
     178        void    print();
    157179};
    158180
     
    168190        RNode*  next;
    169191    public:
     192                RNode();
    170193                RNode(Rule* r);
    171194                ~RNode();
    172195        RNode*  insert(Rule* r);
     196        RNode*  getNext();
     197        Rule*   getRule();
     198        int     getRuleIndex();
     199        poly    getRuleTerm();
    173200};
    174201
     
    181208    private:
    182209        RNode*  first;
    183     public:
     210        // last alway has data=NULL and next=NULL, for initialization purposes used
     211        RNode*  last;
     212    public:
     213                RList();
    184214                RList(Rule* r);
    185215                ~RList();
    186216        void    insert(Rule* r);
     217        RNode*  getFirst();
     218        Rule*   getRule();
     219};
     220
     221
     222
     223/*
     224=============================================
     225class RtagNode (nodes for lists of Rule tags)
     226=============================================
     227*/
     228class RTagNode {
     229    private:
     230        RNode*      data;
     231        RTagNode*   next;
     232    public:
     233        RTagNode(RNode* r);
     234        RTagNode(RNode* r, RTagNode* n);
     235        ~RTagNode();
     236        // declaration with first as parameter due to sorting of LTagList
     237        RTagNode*   insert(RNode* r);
     238        RNode*      getRNode();
     239        RNode*      get(int idx, int length);
     240};
     241
     242
     243/*
     244========================================================================
     245class RTagList(lists of Rule tags, i.e. first elements of a given index)
     246========================================================================
     247*/
     248class RTagList {
     249    private:
     250        RTagNode*   first;
     251        int         length;
     252    public:
     253                RTagList(RNode* r);
     254                ~RTagList();
     255        // declaration with first as parameter in LTagNode due to sorting of LTagList
     256        void    insert(RNode* r);
     257        RNode*  get(int idx);
    187258};
    188259#endif
Note: See TracChangeset for help on using the changeset viewer.