source: git/kernel/f5data.cc @ 9bb97e

spielwiese
Last change on this file since 9bb97e was 9bb97e, checked in by Christian Eder, 15 years ago
implementation of computeSPols, start of reduction and topReduction git-svn-id: file:///usr/local/Singular/svn/trunk@11353 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.8 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/* $Id: f5data.cc,v 1.3 2009-02-06 20:12:35 ederc Exp $ */
5/*
6* ABSTRACT: lpolynomial definition
7*/
8#include "mod2.h"
9
10#ifdef HAVE_F5
11#include "kutil.h"
12#include "structs.h"
13#include "omalloc.h"
14#include "polys.h"
15#include "p_polys.h"
16#include "ideals.h"
17#include "febase.h"
18#include "kstd1.h"
19#include "khstd.h"
20#include "kbuckets.h"
21#include "weight.h"
22#include "intvec.h"
23#include "pInline1.h"
24#include "f5gb.h"
25#include "f5data.h"
26#include "f5lists.h"
27/*
28================================================================
29all functions working on the class LPoly for labeled polynomials
30================================================================
31*/
32LPoly::LPoly(poly t,int i,poly p,bool d) {
33    set(t,i,p,d);
34}
35
36void LPoly::setPoly(poly p)  {
37    polynomial = p;
38}
39
40void LPoly::setTerm(poly t) {
41    term = t;
42}
43
44void LPoly::setIndex(int i) {
45    index = i;
46}
47
48void LPoly::setDel(bool b) {
49    del = b;
50}
51
52poly LPoly::getPoly() {
53    return polynomial;
54}
55
56poly LPoly::getTerm() {
57    return term;
58}
59
60int LPoly::getIndex() {
61    return index;
62}
63
64bool LPoly::getDel() const {
65    return del;
66}
67
68void LPoly::set(poly t, int i, poly p, bool d) {
69    this->setTerm(t);
70    this->setIndex(i);
71    this->setPoly(p);
72    this->setDel(d);
73}
74
75LPoly* LPoly::get() {
76    return this;
77}
78
79/*
80====================================
81functions working on the class CPair
82====================================
83*/
84CPair::CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2) {
85   deg              =   degree;
86   t1               =   term1;
87   lp1              =   lpoly1;
88   t2               =   term2;
89   lp2              =   lpoly2;
90   lastRuleTested   =   NULL;
91}
92
93long CPair::getDeg() {
94    return deg;
95}
96
97poly CPair::getT1() {
98    return t1;
99}
100
101poly* CPair::getAdT1() {
102    return &t1;
103}
104
105poly* CPair::getAdT2() {
106    return &t2;
107}
108
109poly CPair::getT2() {
110    return t2;
111}
112
113LPoly* CPair::getAdLp1() {
114    return lp1;
115}
116
117LPoly* CPair::getAdLp2() {
118    return lp2;
119}
120
121poly CPair::getLp1Poly() {
122    return lp1->getPoly();
123}
124
125poly CPair::getLp2Poly() {
126    return lp2->getPoly();
127}
128
129poly CPair::getLp1Term() {
130    return lp1->getTerm();
131}
132
133poly CPair::getLp2Term() {
134    return lp2->getTerm();
135}
136
137int CPair::getLp1Index() {
138    return lp1->getIndex();
139}
140
141int CPair::getLp2Index() {
142    return lp2->getIndex();
143}
144
145Rule* CPair::getLastRuleTested() {
146    return lastRuleTested;
147}
148
149/*
150===================================
151functions working on the class Rule
152===================================
153*/
154Rule::Rule(int i, poly t, LPoly* l) {
155    index   =   i;
156    term    =   t;
157    origin  =   l;
158}
159
160int Rule::getIndex() {
161    return index;
162}
163
164poly Rule::getTerm() {
165    return term;
166}
167
168LPoly* Rule::getOrigin() {
169    return origin;
170}
171#endif
Note: See TracBrowser for help on using the repository browser.