Changeset cd7c3e1 in git
- Timestamp:
- Dec 26, 2008, 2:52:15 PM (14 years ago)
- Branches:
- (u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
- Children:
- db0c26499ac93c779f02182a98792ec615793f61
- Parents:
- d72b11bc8b23f633cdb4f322bbbbab31c23597cb
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/lpolynomial.cc
rd72b11 rcd7c3e1 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: lpolynomial.cc,v 1. 2 2008-11-27 17:18:45ederc Exp $ */4 /* $Id: lpolynomial.cc,v 1.3 2008-12-26 13:51:50 ederc Exp $ */ 5 5 /* 6 6 * ABSTRACT: lpolynomial definition … … 24 24 #include "f5gb.h" 25 25 #include "lpolynomial.h" 26 #include "l plist.h"26 #include "lists.h" 27 27 /* 28 28 ================================================================ … … 30 30 ================================================================ 31 31 */ 32 void LPoly::setPoly(poly p)32 void LPoly::setPoly(poly* p) 33 33 { 34 polynomial = p;34 polynomial = *p; 35 35 } 36 36 37 void LPoly::setTerm(poly t) {38 term = t;37 void LPoly::setTerm(poly* t) { 38 term = *t; 39 39 } 40 40 41 void LPoly::setIndex(long i) {42 index = i;41 void LPoly::setIndex(long* i) { 42 index = *i; 43 43 } 44 44 … … 48 48 } 49 49 50 void LPoly::setNext(LPoly* l) { 51 next = l; 52 } 53 54 poly LPoly::getPoly() { 50 poly LPoly::getPoly() const { 55 51 return polynomial; 56 52 } 57 53 58 poly LPoly::getTerm() {54 poly LPoly::getTerm() const { 59 55 return term; 60 56 } 61 57 62 long LPoly::getIndex() {58 long LPoly::getIndex() const { 63 59 return index; 64 60 } 65 61 66 bool LPoly::getDel() {62 bool LPoly::getDel() const { 67 63 return del; 68 64 } 69 65 70 LPoly* LPoly::getNext() { 71 return next; 66 void LPoly::set(poly* t, long* i, poly* p) { 67 this->setTerm(t); 68 this->setIndex(i); 69 this->setPoly(p); 72 70 } 73 71 … … 77 75 ===================================================== 78 76 */ 79 int LPoly::compare(const LPoly& lp) {77 int LPoly::compare(const LPoly& lp) const { 80 78 if(index > lp.index) { 81 79 return 1; … … 87 85 } 88 86 89 void LPoly::get() { 90 Print("Label: "); 91 pWrite(getTerm()); 92 Print(" %d\n",getIndex()); 87 LPoly* LPoly::get() { 88 return this; 93 89 } 94 90 #endif -
kernel/lpolynomial.h
rd72b11 rcd7c3e1 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: lpolynomial.h,v 1. 2 2008-11-27 17:19:22ederc Exp $ */4 /* $Id: lpolynomial.h,v 1.3 2008-12-26 13:52:15 ederc Exp $ */ 5 5 /* 6 6 * ABSTRACT: labeled polynomial interface … … 12 12 13 13 14 // class of a labeled polynomial 14 /* 15 ============================= 16 class of a labeled polynomial 17 ============================= 18 */ 15 19 class LPoly 16 20 { … … 20 24 poly polynomial; //standard polynomial data 21 25 bool del; //for deletion in TopReduction Subalgorithm 22 LPoly *next; //pointer on the next labeled polynomial in the list23 26 public: 24 void setPoly(poly p);25 poly getPoly() ;26 void setTerm(poly t);27 poly getTerm() ;28 void setIndex(long i);29 long getIndex() ;27 void setPoly(poly* p); 28 poly getPoly() const; 29 void setTerm(poly* t); 30 poly getTerm() const; 31 void setIndex(long* i); 32 long getIndex() const; 30 33 void setDel(bool b); 31 bool getDel(); 32 void setNext(LPoly *l); 33 LPoly *getNext(); 34 int compare(const LPoly& lp); 35 void get(); 34 bool getDel() const; 35 int compare(const LPoly& lp) const; 36 void set(poly* t, long* i, poly* p); 37 LPoly* get(); 36 38 }; 37 39 38 40 39 // structure of the critical pairs, just the addresses of the corresponding generator labeled polynomials 40 struct critpair 41 /* 42 =============================== 43 structure of the critical pairs 44 =============================== 45 */ 46 struct CPair 41 47 { 42 LPoly *cp1; // first component 43 LPoly *cp2; // second component 44 critpair *next; // next critical pair 48 LPoly* cp1; // first component 49 LPoly* cp2; // second component 45 50 }; 46 51 … … 48 53 #endif 49 54 #endif 50 51
Note: See TracChangeset
for help on using the changeset viewer.