# source:git/kernel/f5data.cc@fcb8022

jengelh-datetimespielwiese
Last change on this file since fcb8022 was fcb8022, checked in by Christian Eder, 14 years ago
• Property mode set to `100644`
File size: 2.7 KB
Line
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/* \$Id: f5data.cc,v 1.4 2009-02-08 19:17:54 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) {
33    set(t,i,p);
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
48poly LPoly::getPoly() {
49    return polynomial;
50}
51
52poly LPoly::getTerm() {
53    return term;
54}
55
56int LPoly::getIndex() {
57    return index;
58}
59
60void LPoly::set(poly t, int i, poly p) {
61    this->setTerm(t);
62    this->setIndex(i);
63    this->setPoly(p);
64}
65
66LPoly* LPoly::get() {
67    return this;
68}
69
70/*
71====================================
72functions working on the class CPair
73====================================
74*/
75CPair::CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2) {
76   deg              =   degree;
77   t1               =   term1;
78   lp1              =   lpoly1;
79   t2               =   term2;
80   lp2              =   lpoly2;
81   lastRuleTested   =   NULL;
82}
83
84long CPair::getDeg() {
85    return deg;
86}
87
88poly CPair::getT1() {
89    return t1;
90}
91
93    return &t1;
94}
95
97    return &t2;
98}
99
100poly CPair::getT2() {
101    return t2;
102}
103
105    return lp1;
106}
107
109    return lp2;
110}
111
112poly CPair::getLp1Poly() {
113    return lp1->getPoly();
114}
115
116poly CPair::getLp2Poly() {
117    return lp2->getPoly();
118}
119
120poly CPair::getLp1Term() {
121    return lp1->getTerm();
122}
123
124poly CPair::getLp2Term() {
125    return lp2->getTerm();
126}
127
128int CPair::getLp1Index() {
129    return lp1->getIndex();
130}
131
132int CPair::getLp2Index() {
133    return lp2->getIndex();
134}
135
136Rule* CPair::getLastRuleTested() {
137    return lastRuleTested;
138}
139
140/*
141===================================
142functions working on the class Rule
143===================================
144*/
145Rule::Rule(int i, poly t, LPoly* l) {
146    index   =   i;
147    term    =   t;
148    origin  =   l;
149}
150
151int Rule::getIndex() {
152    return index;
153}
154
155poly Rule::getTerm() {
156    return term;
157}
158
159LPoly* Rule::getOrigin() {
160    return origin;
161}
162
163void Rule::setOrigin(LPoly* l) {
164    origin  =   l;
165}
166#endif
Note: See TracBrowser for help on using the repository browser.