Changeset 9cb4078 in git for kernel/f5data.h
- Timestamp:
- Mar 4, 2009, 9:23:05 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- fe880793d1fe5f78cc5038ae512e18c6cbaab42c
- Parents:
- fcef59fcd75c37051211c94b3423f0d319602d9d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/f5data.h
rfcef59 r9cb4078 1 //! \file f5data.cc 1 2 /**************************************** 2 3 * Computer Algebra System SINGULAR * 3 4 ****************************************/ 4 /* $Id: f5data.h,v 1. 7 2009-02-19 14:52:34ederc Exp $ */5 /* $Id: f5data.h,v 1.8 2009-03-04 20:23:05 ederc Exp $ */ 5 6 /* 6 7 * ABSTRACT: labeled polynomial interface … … 9 10 #define F5DATA_HEADER 10 11 #ifdef HAVE_F5 11 /* 12 /*! 12 13 ========================================================= 13 14 ========================================================= … … 21 22 22 23 23 /* 24 /*! 24 25 ============================ 25 26 class of labeled polynomials … … 33 34 Rule* _rule; 34 35 public: 35 LPoly(poly t, int i, poly p, Rule* r=NULL);36 void setPoly(poly p);37 poly getPoly();38 void setTerm(poly t);39 poly getTerm();40 void setIndex(int i);41 in t getIndex();42 void setRule(Rule* r);43 Rule* getRule();44 void set(poly t, int i, poly p, Rule* r);45 LPoly* get();36 inline LPoly(poly t, int i, poly p, Rule* r=NULL); 37 inline void setPoly(poly p); 38 inline poly getPoly(); 39 inline void setTerm(poly t); 40 inline poly getTerm(); 41 inline void setIndex(int i); 42 inline int getIndex(); 43 inline void setRule(Rule* r); 44 inline Rule* getRule(); 45 inline void set(poly t, int i, poly p, Rule* r); 46 inline LPoly* get(); 46 47 }; 47 48 48 /* 49 LPoly::LPoly(poly t,int i,poly p, Rule* r) { 50 set(t,i,p,r); 51 } 52 53 void LPoly::setPoly(poly p) { 54 //poly _p = pInit(); 55 //_p = pCopy(p); 56 polynomial = p; 57 } 58 59 void LPoly::setTerm(poly t) { 60 //poly _t = pInit(); 61 //_t = pCopy(t); 62 term = t; 63 } 64 65 void LPoly::setIndex(int i) { 66 index = i; 67 } 68 69 void LPoly::setRule(Rule* r) { 70 _rule = r; 71 } 72 73 poly LPoly::getPoly() { 74 return polynomial; 75 } 76 77 poly LPoly::getTerm() { 78 return term; 79 } 80 81 int LPoly::getIndex() { 82 return index; 83 } 84 85 Rule* LPoly::getRule() { 86 return _rule; 87 } 88 89 void LPoly::set(poly t, int i, poly p, Rule* r) { 90 this->setTerm(t); 91 this->setIndex(i); 92 this->setPoly(p); 93 this->setRule(r); 94 } 95 96 LPoly* LPoly::get() { 97 return this; 98 } 99 100 101 /*! 49 102 =================================== 50 103 structure of labeled critical pairs … … 60 113 Rule* testedRule; // already tested by rules up to lastRuleTested 61 114 public: 62 CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2, Rule* r = NULL);63 long getDeg();64 poly getT1();65 poly* getAdT1();66 LPoly* getAdLp1();67 poly getLp1Poly();68 poly getLp1Term();69 in t getLp1Index();70 poly getT2();71 poly* getAdT2();72 LPoly* getAdLp2();73 poly getLp2Poly();74 poly getLp2Term();75 in t getLp2Index();76 Rule* getTestedRule();77 void setTestedRule(Rule* r);115 inline CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2, Rule* r = NULL); 116 inline long getDeg(); 117 inline poly getT1(); 118 inline poly* getAdT1(); 119 inline LPoly* getAdLp1(); 120 inline poly getLp1Poly(); 121 inline poly getLp1Term(); 122 inline int getLp1Index(); 123 inline poly getT2(); 124 inline poly* getAdT2(); 125 inline LPoly* getAdLp2(); 126 inline poly getLp2Poly(); 127 inline poly getLp2Term(); 128 inline int getLp2Index(); 129 inline Rule* getTestedRule(); 130 inline void setTestedRule(Rule* r); 78 131 }; 79 132 80 81 /* 133 CPair::CPair(long degree, poly term1, LPoly* lpoly1, poly term2, LPoly* lpoly2, Rule* r) { 134 deg = degree; 135 t1 = term1; 136 lp1 = lpoly1; 137 t2 = term2; 138 lp2 = lpoly2; 139 testedRule = r; 140 } 141 142 long CPair::getDeg() { 143 return deg; 144 } 145 146 poly CPair::getT1() { 147 return t1; 148 } 149 150 poly* CPair::getAdT1() { 151 return &t1; 152 } 153 154 poly* CPair::getAdT2() { 155 return &t2; 156 } 157 158 poly CPair::getT2() { 159 return t2; 160 } 161 162 LPoly* CPair::getAdLp1() { 163 return lp1; 164 } 165 166 LPoly* CPair::getAdLp2() { 167 return lp2; 168 } 169 170 poly CPair::getLp1Poly() { 171 return lp1->getPoly(); 172 } 173 174 poly CPair::getLp2Poly() { 175 return lp2->getPoly(); 176 } 177 178 poly CPair::getLp1Term() { 179 return lp1->getTerm(); 180 } 181 182 poly CPair::getLp2Term() { 183 return lp2->getTerm(); 184 } 185 186 int CPair::getLp1Index() { 187 return lp1->getIndex(); 188 } 189 190 int CPair::getLp2Index() { 191 return lp2->getIndex(); 192 } 193 194 Rule* CPair::getTestedRule() { 195 return testedRule; 196 } 197 198 void CPair::setTestedRule(Rule* r) { 199 testedRule = r; 200 } 201 202 203 /*! 82 204 ======================================================== 83 205 structure of rules(i.e. already computed / known labels) … … 89 211 poly term; // term of the labeled polynomial the rule comes from 90 212 public: 91 Rule(int i, poly term);92 in t getIndex();93 poly getTerm();213 inline Rule(int i, poly term); 214 inline int getIndex(); 215 inline poly getTerm(); 94 216 }; 217 218 Rule::Rule(int i, poly t) { 219 index = i; 220 term = t; 221 } 222 223 int Rule::getIndex() { 224 return index; 225 } 226 227 poly Rule::getTerm() { 228 return term; 229 } 95 230 #endif 96 231 #endif
Note: See TracChangeset
for help on using the changeset viewer.