Changeset e2fb7a in git for kernel/gfan.cc
- Timestamp:
- Feb 13, 2009, 4:17:40 PM (15 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- 59f78ae5a870b7808ef48f59619f0aabf5305d9a
- Parents:
- 761f29088f11fe57c7c1312cdf37ac4108f17307
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
r761f29 re2fb7a 1 1 /* 2 2 Compute the Groebner fan of an ideal 3 Author: $Author: Singular$4 Date: $Date: 2009-02-1 2 08:35:05$5 Header: $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.1 1 2009-02-12 08:35:05 SingularExp $6 Id: $Id: gfan.cc,v 1.1 1 2009-02-12 08:35:05 SingularExp $3 Author: $Author: monerjan $ 4 Date: $Date: 2009-02-13 15:17:40 $ 5 Header: $Header: /exports/cvsroot-2/cvsroot/kernel/gfan.cc,v 1.12 2009-02-13 15:17:40 monerjan Exp $ 6 Id: $Id: gfan.cc,v 1.12 2009-02-13 15:17:40 monerjan Exp $ 7 7 */ 8 8 9 9 #include "mod2.h" 10 11 //A hack that hopefully will make compiler happy. Workaround only 12 //do the same in extra.cc and remove it befor committing! 13 //#ifndef HAVE_GFAN 14 //#define HAVE_GFAN 15 //#endif 10 16 11 17 #ifdef HAVE_GFAN … … 80 86 ddcols=cols; 81 87 dd_MatrixPtr ddineq; //Matrix to store the inequalities 82 ddineq=dd_CreateMatrix(ddrows,ddcols );88 ddineq=dd_CreateMatrix(ddrows,ddcols+1); //The first col has to be 0 since cddlib checks for additive consts there 83 89 84 90 // We loop through each g\in GB and compute the resulting inequalities … … 113 119 //printf("aktexpcomp=%i\n",aktexp[kk]); 114 120 //ineq[aktmatrixrow][kk]=leadexp[kk]-aktexp[kk]; //dito 115 dd_set_si(ddineq->matrix[(dd_rowrange)aktmatrixrow][kk ],leadexp[kk]-aktexp[kk]);121 dd_set_si(ddineq->matrix[(dd_rowrange)aktmatrixrow][kk+1],leadexp[kk]-aktexp[kk]); //because of the 1st col being const 0 116 122 } 117 123 aktmatrixrow=aktmatrixrow+1; … … 119 125 120 126 } //for 127 128 #ifdef gfan_DEBUG 129 printf("The inequality matrix is:\n"); 130 dd_WriteMatrix(stdout, ddineq); 131 #endif 121 132 122 133 // The inequalities are now stored in ddineq … … 132 143 }//if dd_Error 133 144 134 #ifdef gfan_DEBUGs 135 printf("Inequalitiy matrix\n"); 136 for (int i=0;i<rows;i++) 137 { 138 for (int j=0;j<cols;j++) 139 { 140 printf("%i ",ineq[i][j]); 141 } 142 printf("\n"); 143 } 144 #endif 145 //Remove reduntant rows here! 146 147 ddineq->representation=dd_Inequality; //We want our LP to be Ax>=0 148 149 //Clean up but don't delete the return value! 150 dd_FreeMatrix(ddineq); 151 //dd_clear(ddrows); 152 //dd_clear(ddcols); 153 //dd_clear(ddredrows); 154 //dd_clear(ddnumb); 155 //dd_clear(dderr); 156 dd_free_global_constants(); 157 145 158 //res=(ideal)aktpoly; 146 159 //return res;
Note: See TracChangeset
for help on using the changeset viewer.