source: git/kernel/f5data.h @ 01e82c8

spielwiese
Last change on this file since 01e82c8 was 01e82c8, checked in by Christian Eder, 15 years ago
these files replace all lpoly stuff in the f5 implementation git-svn-id: file:///usr/local/Singular/svn/trunk@11345 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.7 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/* $Id: f5data.h,v 1.1 2009-01-30 17:27:20 ederc Exp $ */
5/*
6* ABSTRACT: labeled polynomial interface
7*/
8#ifndef F5DATA_HEADER
9#define F5DATA_HEADER
10#ifdef HAVE_F5
11/*
12=========================================================
13=========================================================
14classes for labeled polynomials/pairs/S-polynomials in F5
15=========================================================
16=========================================================
17*/
18class LPoly;
19class CPair;
20class Rule;
21
22
23/*
24============================
25class of labeled polynomials
26============================
27*/
28class LPoly {
29    private:
30        poly    term; //term of signature
31        int     index; //index of signature
32        poly    polynomial; //standard polynomial data
33        bool    del; //for deletion in TopReduction Subalgorithm
34    public:
35                LPoly(poly*t,int* i,poly* p); 
36        void    setPoly(poly* p);
37        poly    getPoly();
38        void    setTerm(poly* t);
39        poly    getTerm();
40        void    setIndex(int* i);
41        int     getIndex();
42        void    setDel(bool b);
43        bool    getDel() const;
44        void    set(poly* t, int* i, poly* p);
45        LPoly*  get();
46};
47
48/*
49========================================================
50structure of rules(i.e. already computed / known labels)
51========================================================
52*/
53class Rule {
54    private:
55        int*     index;    // index of the labeled polynomial the rule comes from
56        poly*    term;     // term of the labeled polynomial the rule comes from
57    public:
58                Rule(int* i, poly* term);
59        int     getIndex();
60        poly    getTerm();
61};
62
63
64/*
65===================================
66structure of labeled critical pairs
67===================================
68*/
69class CPair {
70    private:
71        long    deg;            // total degree of the critical pair
72        poly    t1;             // first term for label
73        LPoly*  lp1;            // first labeled poly
74        poly    t2;             // second term for label
75        LPoly*  lp2;            // second labeled poly
76        Rule*   lastRuleTested; // already tested by rules up to lastRuleTested
77    public:
78                CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2);
79        long    getDeg();
80        poly    getT1();
81        poly    getLp1Poly();
82        poly    getLp1Term();
83        int     getLp1Index();
84        poly    getT2();
85        poly    getLp2Poly();
86        poly    getLp2Term();
87        int     getLp2Index();
88        Rule*   getLastRuleTested();
89};
90
91#endif
92#endif
Note: See TracBrowser for help on using the repository browser.