# source:git/kernel/f5data.cc@87beab7

jengelh-datetimespielwiese
Last change on this file since 87beab7 was 87beab7, checked in by Christian Eder, 14 years ago
lots of stuff debugged, lots of wrong loop terminations improved, still problems with reduction subalgorithms reduction(), topReduction() & findReductor() git-svn-id: file:///usr/local/Singular/svn/trunk@11370 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.cc,v 1.5 2009-02-11 21:24:07 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, Rule* r) {
33    set(t,i,p,r);
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::setRule(Rule* r) {
49    _rule   =   r;
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
64Rule* LPoly::getRule() {
65    return _rule;
66}
67void LPoly::set(poly t, int i, poly p, Rule* r) {
68    this->setTerm(t);
69    this->setIndex(i);
70    this->setPoly(p);
71    this->setRule(r);
72}
73
74LPoly* LPoly::get() {
75    return this;
76}
77
78/*
79====================================
80functions working on the class CPair
81====================================
82*/
83CPair::CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2) {
84   deg              =   degree;
85   t1               =   term1;
86   lp1              =   lpoly1;
87   t2               =   term2;
88   lp2              =   lpoly2;
89   lastRuleTested   =   NULL;
90}
91
92long CPair::getDeg() {
93    return deg;
94}
95
96poly CPair::getT1() {
97    return t1;
98}
99
101    return &t1;
102}
103
105    return &t2;
106}
107
108poly CPair::getT2() {
109    return t2;
110}
111
113    return lp1;
114}
115
117    return lp2;
118}
119
120poly CPair::getLp1Poly() {
121    return lp1->getPoly();
122}
123
124poly CPair::getLp2Poly() {
125    return lp2->getPoly();
126}
127
128poly CPair::getLp1Term() {
129    return lp1->getTerm();
130}
131
132poly CPair::getLp2Term() {
133    return lp2->getTerm();
134}
135
136int CPair::getLp1Index() {
137    return lp1->getIndex();
138}
139
140int CPair::getLp2Index() {
141    return lp2->getIndex();
142}
143
144Rule* CPair::getLastRuleTested() {
145    return lastRuleTested;
146}
147
148/*
149===================================
150functions working on the class Rule
151===================================
152*/
153Rule::Rule(int i, poly t) {
154    index   =   i;
155    term    =   t;
156}
157
158int Rule::getIndex() {
159    return index;
160}
161
162poly Rule::getTerm() {
163    return term;
164}
165#endif
Note: See TracBrowser for help on using the repository browser.