source: git/kernel/lists.h @ a0350e9

spielwiese
Last change on this file since a0350e9 was a0350e9, checked in by Christian Eder, 15 years ago
added lists for critical pairs git-svn-id: file:///usr/local/Singular/svn/trunk@11321 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 3.4 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/* $Id: lists.h,v 1.3 2009-01-15 17:44:24 ederc Exp $ */
5/*
6* ABSTRACT: list interface
7*/
8#include "lpolynomial.h"
9#ifndef LISTS_HEADER
10#define LISTS_HEADER
11
12#ifdef HAVE_F5
13/*
14============================
15============================
16classes for lists used in F5
17============================
18============================
19*/
20class LNode;
21class LList;
22class PrevNode;
23class PrevList;
24class CNode;
25class CList;
26
27
28/*
29=======================================
30LNode class (nodes for lists of LPolys)
31=======================================
32*/
33class LNode {
34    private:
35        LPoly* data;
36        LNode* next;
37    public:
38        // generating new list elements from the labeled / classical polynomial view
39                LNode(LPoly* lp);
40                LNode(poly* t, int* i, poly* p);
41                LNode(LNode* ln);
42                ~LNode();
43        // append new elements to the list from the labeled / classical polynomial view
44        LNode*  insert(LPoly* lp);
45        LNode*  insert(poly* t, int* i, poly* p);
46        // get next from current LNode
47        LNode*  getNext();
48       
49        // get the LPoly* out of LNode*
50        LPoly*  getLPoly();
51        // get the address of the polynomial part of LPoly* of LNode*
52        poly*   getPoly();
53        // test if for any list element the polynomial part of the data is equal to *p
54        bool    polyTest(poly* p);
55};
56
57
58/*
59============================
60class LList(lists of LPolys)
61============================
62*/
63class LList {
64    private:
65        LNode*  first;
66        int     length;
67    public:
68                LList(LPoly* lp);
69                LList(poly* t,int* i,poly* p);
70                ~LList();
71        void    insert(LPoly* lp);
72        // insertion in front of the list
73        void    insert(poly* t,int* i, poly* p);
74        bool    polyTest(poly* p);
75        int     getLength() const;
76        LNode*  getFirst();
77};
78
79
80/*
81=============================================
82PrevNode class (nodes for lists of gPrevLast)
83=============================================
84*/
85class PrevNode {
86    private:
87        LNode*      data;
88        PrevNode*   next;
89    public:
90        PrevNode(LNode* l);
91        ~PrevNode();
92        PrevNode*   append(LNode* l);
93        LNode*      getLNode();
94        LNode*      getPrevLast(int i);
95};
96
97
98/*
99====================================================
100class PrevList(lists of last node elements in gPrev)
101====================================================
102*/
103class PrevList {
104    private:
105        PrevNode*   first;
106        PrevNode*   last;
107    public:
108                PrevList(LNode* l);
109                ~PrevList();
110        void    append(LNode* l);
111        LNode*  getPrevLast(int i);
112};
113
114
115/*
116=======================================
117CNode class (nodes for lists of CPairs)
118=======================================
119*/
120class CNode {
121    private:
122        CPair* data;
123        CNode* next;
124    public:
125                CNode(CPair* c);
126                ~CNode(); 
127        CNode*  insert(CPair* c); 
128        CNode*  getLPoly() const; 
129};
130
131
132/*
133=============================
134class CPList(lists of CPairs)
135=============================
136*/
137class CList {
138    private:
139        CNode*  first;
140    public:
141                CList(CPair* c); 
142                ~CList(); 
143        void    insert(CPair* c); 
144};
145#endif
146#endif
Note: See TracBrowser for help on using the repository browser.