Changeset 2c6535 in git
- Timestamp:
- Feb 9, 2009, 4:32:07 PM (14 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- 361be1faaba387dc324a02dbae511da1cda4aeec
- Parents:
- 35d0d1a7256e75184cea2fe4d2e02762b243b544
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r35d0d1a r2c6535 6 6 #include "kstd1.h" 7 7 #include "intvec.h" 8 #include "polys.h" 9 #include "ideals.h" 8 10 9 11 #ifndef gfan_DEBUG … … 11 13 #endif 12 14 13 ideal getGB(ideal inputIdeal){ 14 ideal gb; 15 gb=kStd(inputIdeal,NULL,testHomog,NULL); //Possible to call without testHomog/isHomog? 16 // Why are 64 "results" printed? 15 ideal getGB(ideal inputIdeal) 16 { 17 17 #ifdef gfan_DEBUG 18 18 printf("Now in getGB\n"); 19 19 #endif 20 21 ideal gb; 22 gb=kStd(inputIdeal,NULL,testHomog,NULL); //Possible to call without testHomog/isHomog? 23 idSkipZeroes(gb); //Get rid of zero entries 24 20 25 return gb; 21 26 } 22 27 23 ideal gfan(ideal inputIdeal){ 28 /****** getWallIneq computes the inequalities ***/ 29 /*INPUT_TYPE: ideal */ 30 /*RETURN_TYPE: matrix */ 31 /************************************************/ 32 void getWallIneq(ideal I) 33 { 34 #ifdef gfan_DEBUG 35 printf("Computing Inequalities...\n"); 36 #endif 37 38 // Exponentenvektor 39 Exponent_t leadexp,aktexp,diffexp; 40 poly aktpoly; 41 42 int lengthGB=IDELEMS(I); 43 printf("The Gröbner basis has %i elements\n",lengthGB); 44 45 // We loop through each g\in GB 46 for (int i=0; i<IDELEMS(I); i++) 47 { 48 aktpoly=(poly)I->m[i]; 49 leadexp = pGetExp(aktpoly,1); //get the exp.vect of leading monomial 50 for (int j=2;j<=pLength(aktpoly);j++) 51 { 52 aktexp=pGetExp(aktpoly,j); 53 //diffexp=pSubExp(aktpoly, leadexp,aktexp); //Dang! => runtime error 54 //printf("Exponentenvektor=%i\n",expmark); 55 //printf("Diff=%i\n",expmark-pGetExp(aktpoly,j)); 56 } 57 int pCompCount; 58 pCompCount=pLength(aktpoly); 59 printf("Poly No. %i has %i components\n",i,pCompCount); 60 } //for 61 //res=(ideal)aktpoly; 62 //return res; 63 } 64 65 ideal gfan(ideal inputIdeal) 66 { 24 67 #ifdef gfan_DEBUG 25 68 printf("Now in subroutine gfan\n"); 26 69 #endif 27 70 ideal res; 71 matrix ineq; //Matrix containing the boundary inequalities 72 28 73 res=getGB(inputIdeal); 74 getWallIneq(res); 29 75 return res; 30 76 }
Note: See TracChangeset
for help on using the changeset viewer.