# source:git/kernel/f5data.cc@61d32c

jengelh-datetimespielwiese
Last change on this file since 61d32c was 61d32c, checked in by Christian Eder, 14 years ago
still searching errors in reduction() git-svn-id: file:///usr/local/Singular/svn/trunk@11400 2c84dea3-7e68-4137-9b89-c4e89433aadc
• Property mode set to `100644`
File size: 2.9 KB
Line
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/* \$Id: f5data.cc,v 1.6 2009-02-15 20:33:56 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    //poly _p     =   pInit();
38    //_p          =   pCopy(p);
39    polynomial = p;
40}
41
42void LPoly::setTerm(poly t) {
43    //poly _t     =   pInit();
44    //_t          =   pCopy(t);
45    term = t;
46}
47
48void LPoly::setIndex(int i) {
49    index = i;
50}
51
52void LPoly::setRule(Rule* r) {
53    _rule   =   r;
54}
55
56poly LPoly::getPoly() {
57    return polynomial;
58}
59
60poly LPoly::getTerm() {
61    return term;
62}
63
64int LPoly::getIndex() {
65    return index;
66}
67
68Rule* LPoly::getRule() {
69    return _rule;
70}
71void LPoly::set(poly t, int i, poly p, Rule* r) {
72    this->setTerm(t);
73    this->setIndex(i);
74    this->setPoly(p);
75    this->setRule(r);
76}
77
78LPoly* LPoly::get() {
79    return this;
80}
81
82/*
83====================================
84functions working on the class CPair
85====================================
86*/
87CPair::CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2) {
88   deg              =   degree;
89   t1               =   term1;
90   lp1              =   lpoly1;
91   t2               =   term2;
92   lp2              =   lpoly2;
93   lastRuleTested   =   NULL;
94}
95
96long CPair::getDeg() {
97    return deg;
98}
99
100poly CPair::getT1() {
101    return t1;
102}
103
105    return &t1;
106}
107
109    return &t2;
110}
111
112poly CPair::getT2() {
113    return t2;
114}
115
117    return lp1;
118}
119
121    return lp2;
122}
123
124poly CPair::getLp1Poly() {
125    return lp1->getPoly();
126}
127
128poly CPair::getLp2Poly() {
129    return lp2->getPoly();
130}
131
132poly CPair::getLp1Term() {
133    return lp1->getTerm();
134}
135
136poly CPair::getLp2Term() {
137    return lp2->getTerm();
138}
139
140int CPair::getLp1Index() {
141    return lp1->getIndex();
142}
143
144int CPair::getLp2Index() {
145    return lp2->getIndex();
146}
147
148Rule* CPair::getLastRuleTested() {
149    return lastRuleTested;
150}
151
152/*
153===================================
154functions working on the class Rule
155===================================
156*/
157Rule::Rule(int i, poly t) {
158    index   =   i;
159    term    =   t;
160}
161
162int Rule::getIndex() {
163    return index;
164}
165
166poly Rule::getTerm() {
167    return term;
168}
169#endif
Note: See TracBrowser for help on using the repository browser.