source: git/kernel/f5data.cc @ d51339

spielwiese
Last change on this file since d51339 was d51339, checked in by Christian Eder, 15 years ago
new written reduction process, still problems getting the right rules in criterion2() ->lastRuleTested shouldnt be part of the CPair as it is a characteristic of an LPoly git-svn-id: file:///usr/local/Singular/svn/trunk@11406 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.7 2009-02-18 20:43:05 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
104poly* CPair::getAdT1() {
105    return &t1;
106}
107
108poly* CPair::getAdT2() {
109    return &t2;
110}
111
112poly CPair::getT2() {
113    return t2;
114}
115
116LPoly* CPair::getAdLp1() {
117    return lp1;
118}
119
120LPoly* CPair::getAdLp2() {
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
152void CPair::setLastRuleTested(Rule* r) {
153    lastRuleTested   =   r;
154}
155
156/*
157===================================
158functions working on the class Rule
159===================================
160*/
161Rule::Rule(int i, poly t) {
162    index   =   i;
163    term    =   t;
164}
165
166int Rule::getIndex() {
167    return index;
168}
169
170poly Rule::getTerm() {
171    return term;
172}
173#endif
Note: See TracBrowser for help on using the repository browser.