Changeset 4e803e in git
 Timestamp:
 Nov 27, 2008, 6:19:22 PM (15 years ago)
 Branches:
 (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
 Children:
 8c66fb0e0dc173c2eb5aff1e988308a8527bc045
 Parents:
 244ed5b722de4df004fddd3ed09ac68c69199316
 Location:
 kernel
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

kernel/lpolynomial.cc
r244ed5 r4e803e 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: lpolynomial.cc,v 1. 1 20081122 20:46:20ederc Exp $ */4 /* $Id: lpolynomial.cc,v 1.2 20081127 17:18:45 ederc Exp $ */ 5 5 /* 6 6 * ABSTRACT: lpolynomial definition … … 24 24 #include "f5gb.h" 25 25 #include "lpolynomial.h" 26 27 28 /*2 29 * all functions working on the class lpoly for labeled polynomials 26 #include "lplist.h" 27 /* 28 ================================================================ 29 all functions working on the class LPoly for labeled polynomials 30 ================================================================ 30 31 */ 31 32 void lpoly::setPoly(poly p) 32 void LPoly::setPoly(poly p) 33 33 { 34 34 polynomial = p; 35 35 } 36 36 37 void lpoly::setTerm(poly t) 38 { 39 term = t; 37 void LPoly::setTerm(poly t) { 38 term = t; 40 39 } 41 40 42 void lpoly::setIndex(long i) 43 { 44 index = i; 41 void LPoly::setIndex(long i) { 42 index = i; 45 43 } 46 44 47 45 48 void lpoly::setDel(bool b) 49 { 50 del = b; 46 void LPoly::setDel(bool b) { 47 del = b; 51 48 } 52 49 53 void lpoly::setNext(lpoly* l) 54 { 55 next = l; 50 void LPoly::setNext(LPoly* l) { 51 next = l; 56 52 } 57 53 58 poly lpoly::getPoly() 59 { 60 return polynomial; 54 poly LPoly::getPoly() { 55 return polynomial; 61 56 } 62 57 63 poly lpoly::getTerm() 64 { 65 return term; 58 poly LPoly::getTerm() { 59 return term; 66 60 } 67 61 68 long lpoly::getIndex() 69 { 70 return index; 62 long LPoly::getIndex() { 63 return index; 71 64 } 72 65 73 bool lpoly::getDel() 74 { 75 return del; 66 bool LPoly::getDel() { 67 return del; 76 68 } 77 69 78 lpoly *lpoly::getNext() 79 { 80 return next; 70 LPoly* LPoly::getNext() { 71 return next; 81 72 } 82 73 74 /* 75 ===================================================== 76 comparing two labeled polynomials by their signatures 77 ===================================================== 78 */ 79 int LPoly::compare(const LPoly& lp) { 80 if(index > lp.index) { 81 return 1; 82 } 83 if(index < lp.index) { 84 return 1; 85 } 86 return 0; 87 } 88 89 void LPoly::get() { 90 Print("Label: "); 91 pWrite(getTerm()); 92 Print(" %d\n",getIndex()); 93 } 83 94 #endif 
kernel/lpolynomial.h
r244ed5 r4e803e 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: lpolynomial.h,v 1. 1 20081122 20:47:27ederc Exp $ */4 /* $Id: lpolynomial.h,v 1.2 20081127 17:19:22 ederc Exp $ */ 5 5 /* 6 * ABSTRACT: f5gbinterface6 * ABSTRACT: labeled polynomial interface 7 7 */ 8 8 #ifndef LPOLYNOMIAL_HEADER … … 13 13 14 14 // class of a labeled polynomial 15 class lpoly15 class LPoly 16 16 { 17 17 private: … … 20 20 poly polynomial; //standard polynomial data 21 21 bool del; //for deletion in TopReduction Subalgorithm 22 lpoly *next; //pointer on the next labeled polynomial in the list22 LPoly *next; //pointer on the next labeled polynomial in the list 23 23 public: 24 24 void setPoly(poly p); … … 30 30 void setDel(bool b); 31 31 bool getDel(); 32 void setNext(lpoly *l); 33 lpoly *getNext(); 32 void setNext(LPoly *l); 33 LPoly *getNext(); 34 int compare(const LPoly& lp); 35 void get(); 34 36 }; 35 37 … … 38 40 struct critpair 39 41 { 40 lpoly *cp1; // first component41 lpoly *cp2; // second component42 LPoly *cp1; // first component 43 LPoly *cp2; // second component 42 44 critpair *next; // next critical pair 43 45 };
Note: See TracChangeset
for help on using the changeset viewer.