Changeset 96e408 in git
- Timestamp:
- Mar 18, 2011, 8:29:55 AM (12 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- 2c27b13aa751a2f194c05d380d39be638b834d19
- Parents:
- bb08d5b1bb68c30edc7e32f68fe823249cbc3c63
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gfan.cc
rbb08d5 r96e408 13 13 #include <kernel/kstd1.h> 14 14 #include <kernel/kutil.h> 15 // #include "int64vec.h"16 15 #include <kernel/polys.h> 17 16 #include <kernel/ideals.h> … … 20 19 21 20 #include "ring.h" //apparently not needed 22 // #include "structs.h"23 21 #include <Singular/lists.h> 24 22 #include <kernel/prCopy.h> 25 23 #include <kernel/stairc.h> 26 // #include <bitset>27 24 #include <fstream> //read-write cones to files 28 // #include <gmp.h>29 25 #include <string> 30 26 #include <sstream> 31 // #include <time.h>32 27 #include <stdlib.h> 33 28 #include <assert.h> 34 // #include <Singular/bbfan.h>35 // #include <Singular/bbcone.h>36 29 #include <gfanlib/gfanlib.h> 37 30 … … 61 54 // #define gfanp 62 55 #ifdef gfanp 63 #include <sys/time.h> 64 #include <iostream> 65 #endif 66 56 #include <sys/time.h> 57 #include <iostream> 58 #endif 59 60 //NOTE DO NOT REMOVE THIS 67 61 #ifndef SHALLOW 68 #define SHALLOW62 #define SHALLOW 69 63 #endif 70 64 71 65 #ifndef USE_ZFAN 72 #define USE_ZFAN66 #define USE_ZFAN 73 67 #endif 74 68 … … 195 189 void facet::shallowDelete() 196 190 { 197 #if def gfan_DEBUG191 #ifndef NDEBUG 198 192 // printf("shallowdel@UCN %i\n", this->getUCN()); 199 193 #endif … … 213 207 facet::~facet() 214 208 { 215 #if def gfan_DEBUG209 #ifndef NDEBUG 216 210 // printf("~facet@UCN %i\n",this->getUCN()); 217 211 #endif … … 989 983 // delete gamma; 990 984 int offset=0;//needed for correction of redRowsArray[ii] 991 #if def gfan_DEBUG985 #ifndef NDEBUG 992 986 printf("Removed %i of %i in preprocessing step\n",num_elts,ddineq->rowsize); 993 987 #endif … … 1121 1115 fAct->setFacetNormal(load); 1122 1116 fAct->setUCN(this->getUCN()); 1123 #if def gfan_DEBUG1117 #ifndef NDEBUG 1124 1118 printf("Marking facet (");load->show(1,0);printf(") as non flippable\n"); 1125 1119 #endif … … 1699 1693 int64vec *fNormal;// = new int64vec(this->numVars); //facet normal, check for parallelity 1700 1694 fNormal = f->getFacetNormal(); //read this->fNormal; 1701 #if def gfan_DEBUG1695 #ifndef NDEBUG 1702 1696 // std::cout << "running gcone::flip" << std::endl; 1703 1697 printf("flipping UCN %i over facet",this->getUCN()); … … 1716 1710 computeInv(gb,initialForm,*fNormal); 1717 1711 1718 #if def gfan_DEBUG1712 #ifndef NDEBUG 1719 1713 /* cout << "Initial ideal is: " << endl; 1720 1714 idShow(initialForm); … … 1834 1828 for (int kk=1;kk<=this->numVars;kk++) 1835 1829 { 1836 #if def gfan_DEBUG1830 #ifndef NDEBUG 1837 1831 // cout << src_ExpV[kk] << "," << dst_ExpV[kk] << endl; 1838 1832 #endif … … 1845 1839 { 1846 1840 markingsAreCorrect=TRUE; //everything is fine 1847 #if def gfan_DEBUG1841 #ifndef NDEBUG 1848 1842 // cout << "correct markings" << endl; 1849 1843 #endif … … 2009 2003 test|=Sy_bit(OPT_REDSB); 2010 2004 test|=Sy_bit(OPT_REDTAIL); 2011 #if def gfan_DEBUG2005 #ifndef NDEBUG 2012 2006 // test|=Sy_bit(6); //OPT_DEBUG 2013 2007 #endif … … 2037 2031 // idDelete(&dstRing_I); 2038 2032 f->flipRing=rCopy(dstRing); //store the ring on the other side 2039 #if def gfan_DEBUG2033 #ifndef NDEBUG 2040 2034 printf("Flipped GB is UCN %i:\n",counter+1); 2041 2035 idDebugPrint(dstRing_I); … … 2074 2068 const int64vec *fNormal; 2075 2069 fNormal = f->getRef2FacetNormal();/*->getFacetNormal();*/ //read this->fNormal; 2076 #if def gfan_DEBUG2070 #ifndef NDEBUG 2077 2071 printf("flipping UCN %i over facet(",this->getUCN()); 2078 2072 fNormal->show(1,0); … … 2268 2262 }//while 2269 2263 // omFree(v); 2270 #if def gfan_DEBUG2264 #ifndef NDEBUG 2271 2265 // cout << "Initial Form="; 2272 2266 // pWrite(initialFormElement[ii]); … … 2505 2499 if (err!=dd_NoError){WerrorS("Error during dd_Matrix2LP in gcone::interiorPoint");} 2506 2500 if (lp==NULL){WerrorS("LP is NULL");} 2507 #if def gfan_DEBUG2501 #ifndef NDEBUG 2508 2502 // dd_WriteLP(stdout,lp); 2509 2503 #endif … … 2511 2505 lpInt=dd_MakeLPforInteriorFinding(lp); 2512 2506 if (err!=dd_NoError){WerrorS("Error during dd_MakeLPForInteriorFinding in gcone::interiorPoint");} 2513 #if def gfan_DEBUG2507 #ifndef NDEBUG 2514 2508 // dd_WriteLP(stdout,lpInt); 2515 2509 #endif … … 2524 2518 lpSol=dd_CopyLPSolution(lpInt); 2525 2519 // if (err!=dd_NoError){WerrorS("Error during dd_CopyLPSolution");} 2526 #if def gfan_DEBUG2520 #ifndef NDEBUG 2527 2521 printf("Interior point: "); 2528 2522 for (int ii=1; ii<(lpSol->d)-1;ii++) … … 2556 2550 mpq_clear(product); 2557 2551 } 2558 #if def gfan_DEBUG2552 #ifndef NDEBUG 2559 2553 // iv.show(); 2560 2554 // cout << endl; … … 2591 2585 // void gcone::interiorPoint2() 2592 2586 // {//idPrint(this->gcBasis); 2593 // #if def gfan_DEBUG2587 // #ifndef NDEBUG 2594 2588 // if(this->ivIntPt!=NULL) 2595 2589 // WarnS("Interior point already exists - ovrewriting!"); … … 3000 2994 rAct = currRing; 3001 2995 int UCNcounter=gcAct->getUCN(); 3002 #if def gfan_DEBUG2996 #ifndef NDEBUG 3003 2997 printf("NoRevs\n"); 3004 2998 printf("Facets are:\n"); … … 3161 3155 //gcTmp->ddFacets should not be needed anymore, so 3162 3156 dd_FreeMatrix(gcTmp->ddFacets); 3163 #if def gfan_DEBUG3157 #ifndef NDEBUG 3164 3158 // gcTmp->showFacets(1); 3165 3159 #endif 3166 3160 /*add facets to SLA here*/ 3167 3161 #ifdef SHALLOW 3168 #if def gfan_DEBUG3162 #ifndef NDEBUG 3169 3163 printf("fActUCN before enq2: %i\n",fAct->getUCN()); 3170 3164 #endif 3171 3165 facet *tmp; 3172 3166 tmp=gcTmp->enqueue2(SearchListRoot); 3173 #if def gfan_DEBUG3167 #ifndef NDEBUG 3174 3168 printf("\nheadUCN=%i\n",tmp->getUCN()); 3175 3169 printf("fActUCN after enq2: %i\n",fAct->getUCN()); … … 3187 3181 rDelete(gcTmp->baseRing); 3188 3182 } 3189 #if def gfan_DEBUG3183 #ifndef NDEBUG 3190 3184 if(SearchListRoot!=NULL) 3191 3185 showSLA(*SearchListRoot); … … 3500 3494 removalOccured=FALSE; 3501 3495 slNormal = slAct->getFacetNormal(); 3502 #if def gfan_DEBUG3496 #ifndef NDEBUG 3503 3497 printf("Checking facet (");fNormal->show(1,1);printf(") against (");slNormal->show(1,1);printf(")\n"); 3504 3498 #endif … … 3531 3525 // deleteMarker=NULL; 3532 3526 } 3533 #if def gfan_DEBUG3527 #ifndef NDEBUG 3534 3528 printf("Removing (");fNormal->show(1,1);printf(") from list\n"); 3535 3529 #endif … … 3553 3547 if(removalOccured==FALSE) 3554 3548 { 3555 #if def gfan_DEBUG3549 #ifndef NDEBUG 3556 3550 // cout << "Adding facet (";fNormal->show(1,0);cout << ") to SLA " << endl; 3557 3551 #endif … … 3680 3674 { 3681 3675 removalOccured=FALSE; 3682 #if def gfan_DEBUG3676 #ifndef NDEBUG 3683 3677 printf("Checking facet (");fAct->fNormal->show(1,1);printf(") against (");slAct->fNormal->show(1,1);printf(")\n"); 3684 3678 #endif … … 3716 3710 removalOccured=TRUE; 3717 3711 gcone::lengthOfSearchList--; 3718 #if def gfan_DEBUG3712 #ifndef NDEBUG 3719 3713 printf("Removing (");fAct->fNormal->show(1,1);printf(") from list\n"); 3720 3714 #endif
Note: See TracChangeset
for help on using the changeset viewer.