Changeset 750e70 in git


Ignore:
Timestamp:
May 5, 2011, 7:20:56 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
eb72ba1a1a50ca741a3113bf9b8bc34d414a678a
Parents:
1f9a84fc8a205c643ce861d9e20c25dc687aa193
Message:
ADD: new option(notSyzMinim) should switch off all resolution minimizations (lres/nres/mres)

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@14204 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    r1f9a84 r750e70  
    380380          #ifdef NDEBUG
    381381            TEST_FOR("ndebug");
    382           #endif           
     382          #endif
    383383            ;
    384384          return FALSE;
     
    36923692      ideal I=((ideal)h->Data());
    36933693      #ifndef USE_ZFAN
    3694         #define USE_ZFAN   
     3694        #define USE_ZFAN
    36953695      #endif
    36963696      #ifndef USE_ZFAN
  • Singular/ipshell.cc

    r1f9a84 r750e70  
    25672567     (*weights) -= add_row_shift;
    25682568  }
    2569  
     2569
    25702570  res->data=(void *)syBettiOfComputation(syzstr,minim,&row_shift,weights);
    25712571  //row_shift += add_row_shift;
     
    25972597  {
    25982598    if (syzstr->hilb_coeffs==NULL)
    2599     {
     2599    { // La Scala
    26002600      fullres = syReorder(syzstr->res, length, syzstr);
    26012601    }
    26022602    else
    2603     {
     2603    { // HRES
    26042604      minres = syReorder(syzstr->orderedRes, length, syzstr);
    26052605      syKillEmptyEntres(minres, length);
     
    26142614  else
    26152615    tr = fullres;
    2616  
     2616
    26172617  resolvente trueres=NULL; intvec ** w=NULL;
    26182618
     
    26382638    }
    26392639  }
    2640  
     2640
    26412641  lists li = liMakeResolv(trueres, length, syzstr->list_length,typ0,
    26422642                          w, add_row_shift);
    26432643
    26442644  if (w != NULL) omFreeSize(w, length*sizeof(intvec*));
    2645  
     2645
    26462646  if (toDel)
    26472647    syKillComputation(syzstr);
     
    26542654      syzstr->minres = minres;
    26552655  }
    2656  
     2656
    26572657  return li;
    26582658
    2659  
     2659
    26602660}
    26612661
     
    46144614          case ringorder_s: // no 'rank' params!
    46154615          {
    4616            
     4616
    46174617            if(iv->length() > 3)
    46184618              return TRUE;
     
    46214621            {
    46224622              const int s = (*iv)[2];
    4623               R->block0[n] = s;           
     4623              R->block0[n] = s;
    46244624              R->block1[n] = s;
    46254625            }
    4626             break;           
     4626            break;
    46274627          }
    46284628          case ringorder_IS:
    46294629          {
    46304630            if(iv->length() != 3) return TRUE;
    4631            
     4631
    46324632            const int s = (*iv)[2];
    46334633
    46344634            if( 1 < s || s < -1 ) return TRUE;
    4635              
    4636             R->block0[n] = s;           
     4635
     4636            R->block0[n] = s;
    46374637            R->block1[n] = s;
    46384638            break;
    4639           }           
     4639          }
    46404640          case ringorder_S:
    46414641          case ringorder_c:
     
    47184718
    47194719  assume( n >= 0 );
    4720  
     4720
    47214721  if (R->block1[n] != R->N)
    47224722  {
  • Singular/misc_ip.cc

    r1f9a84 r750e70  
    513513  {"interrupt",    Sy_bit(OPT_INTERRUPT),      ~Sy_bit(OPT_INTERRUPT)   },
    514514  {"sugarCrit",    Sy_bit(OPT_SUGARCRIT),      ~Sy_bit(OPT_SUGARCRIT)   },
    515   {"teach",     Sy_bit(OPT_DEBUG),          ~Sy_bit(OPT_DEBUG)  },
     515  {"teach",        Sy_bit(OPT_DEBUG),          ~Sy_bit(OPT_DEBUG)  },
     516  {"notSyzMinim",  Sy_bit(OPT_NO_SYZ_MINIM),   ~Sy_bit(OPT_NO_SYZ_MINIM)  },
    516517  /* 9 return SB in syz, quotient, intersect */
    517518  {"returnSB",     Sy_bit(OPT_RETURN_SB),      ~Sy_bit(OPT_RETURN_SB)  },
  • kernel/kstd1.cc

    r1f9a84 r750e70  
    2424#endif /* ifndef NDEBUG */
    2525
    26 #if MYTEST 
     26#if MYTEST
    2727#ifdef HAVE_TAIL_RING
    2828#undef HAVE_TAIL_RING
     
    7575                |Sy_bit(6)
    7676//                |Sy_bit(7) obachman 11/00 tossed: 12/00 used for redThrough
    77   |Sy_bit(OPT_REDTHROUGH)
    78 //                |Sy_bit(8) obachman 11/00 tossed
     77                |Sy_bit(7) // OPT_REDTHROUGH
     78                |Sy_bit(8) // obachman 11/00 tossed -> motsak 2011 experimental: OPT_NO_SYZ_MINIM
    7979                |Sy_bit(9)
    8080                |Sy_bit(10)
     
    18011801#endif
    18021802#ifdef HAVE_RINGS
    1803   if (rField_is_Ring(currRing)) 
    1804     r=bba(F,Q,NULL,hilb,strat); 
     1803  if (rField_is_Ring(currRing))
     1804    r=bba(F,Q,NULL,hilb,strat);
    18051805  else
    18061806#endif
  • kernel/options.h

    r1f9a84 r750e70  
    7272#define OPT_DEBUG          6
    7373#define OPT_REDTHROUGH     7
     74#define OPT_NO_SYZ_MINIM   8
    7475#define OPT_RETURN_SB      9
    7576#define OPT_FASTHC        10
     
    111112#define TEST_OPT_REDTHROUGH        BTEST1(OPT_REDTHROUGH)
    112113#define TEST_OPT_OLDSTD            BTEST1(OPT_OLDSTD)
     114#define TEST_OPT_NO_SYZ_MINIM      BTEST1(OPT_NO_SYZ_MINIM)
     115
     116
    113117#define TEST_OPT_CONTENTSB         BVERBOSE(V_CONTENTSB)
    114118#define TEST_OPT_CANCELUNIT        BVERBOSE(V_CANCELUNIT)
  • kernel/syz.cc

    r1f9a84 r750e70  
    463463#ifdef HAVE_PLURAL
    464464  if (rIsPluralRing(currRing) && !rIsSCA(currRing) )
    465   { 
     465  {
    466466// quick solution; need theory to apply homog GB stuff for G-Algebras
    467467    hom = isNotHomog;
     
    516516      rSetSyzComp(rkI);
    517517    }
     518    if(! TEST_OPT_NO_SYZ_MINIM )
    518519    if (minim || (syzIndex!=0))
    519520    {
     
    537538    syzIndex++;
    538539    if (TEST_OPT_PROT) Print("[%d]\n",syzIndex);
    539     if ((minim)||(syzIndex>1))
    540       syMinStep(res[syzIndex-1],res[syzIndex],!completeMinim,NULL,hom);
    541     if (!completeMinim)
    542     /*minim is TRUE, we are in the module: maxlength, maxlength <>0*/
    543     {
    544       idDelete(&res[syzIndex]);
     540
     541    if(! TEST_OPT_NO_SYZ_MINIM )
     542    {
     543      if ((minim)||(syzIndex>1))
     544        syMinStep(res[syzIndex-1],res[syzIndex],!completeMinim,NULL,hom);
     545      if (!completeMinim)
     546      /*minim is TRUE, we are in the module: maxlength, maxlength <>0*/
     547      {
     548        idDelete(&res[syzIndex]);
     549      }
    545550    }
    546551/*---creating the iterated weights for module components ---------*/
     
    634639    const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
    635640    const unsigned int m_iLastAltVar  = scaLastAltVar(currRing);
    636    
     641
    637642    arg = id_KillSquares(arg, m_iFirstAltVar, m_iLastAltVar, currRing, false); // kill suares in input!
    638643  }
    639644#endif
    640  
     645
    641646  int typ0;
    642647  syStrategy result=(syStrategy)omAlloc0(sizeof(ssyStrategy));
     
    681686    if( ncExtensions(TESTSYZSCAMASK) )
    682687    {
    683       currQuotient     = idSaveCurrQuotient; 
     688      currQuotient     = idSaveCurrQuotient;
    684689      currRing->qideal = idSaveCurrRingQuotient;
    685690    }
  • kernel/syz.h

    r1f9a84 r750e70  
    7878                        intvec *** weights, BOOLEAN minim);
    7979
    80 resolvente syReorder(resolvente res,int length,
    81         syStrategy syzstr,BOOLEAN toCopy/*=TRUE*/,resolvente totake/*=NULL*/);
    82 
    8380syStrategy syResolution(ideal arg, int maxlength,intvec * w, BOOLEAN minim);
    8481
     
    138135resolvente syReorder(resolvente res,int length,
    139136        syStrategy syzstr,BOOLEAN toCopy=TRUE,resolvente totake=NULL);
     137resolvente syReorder(resolvente res,int length,
     138        syStrategy syzstr,BOOLEAN toCopy/*=TRUE*/,resolvente totake/*=NULL*/);
    140139
    141140#endif
  • kernel/syz1.cc

    r1f9a84 r750e70  
    16421642      if(syzstr->syRing->typ[1].ord_typ == ro_syzcomp)
    16431643        rNChangeSComps(NULL, NULL, syzstr->syRing);
    1644      
     1644
    16451645      rKill(syzstr->syRing);
    16461646    }
     
    17971797  resolvente minres = syzstr->minres;
    17981798  const int length = syzstr->length;
    1799  
     1799
    18001800  if ((fullres==NULL) && (minres==NULL))
    18011801  {
    18021802     if (syzstr->hilb_coeffs==NULL)
    1803      {
     1803     { // LA SCALA
    18041804        fullres = syReorder(syzstr->res, length, syzstr);
    18051805     }
    18061806     else
    1807      {
     1807     { //  HRES
    18081808        minres = syReorder(syzstr->orderedRes, length, syzstr);
    18091809        syKillEmptyEntres(minres, length);
    18101810     }
    18111811  }
    1812  
     1812
    18131813  intvec *result=NULL;
    1814  
     1814
    18151815  if (fullres!=NULL)
    18161816    result = syBetti(fullres,length,&dummy,weights,minim,row_shift);
     
    18331833    syzstr->betti = ivCopy(result); // cache the result...
    18341834  }
    1835  
     1835
    18361836  return result;
    18371837}
     
    19571957
    19581958  intvec* resolution = syzstr->resolution;
    1959  
     1959
    19601960  if (resolution==NULL)
    19611961  {
     
    20432043  }
    20442044
    2045   if (syzstr->resolution == NULL) syzstr->resolution = resolution; 
     2045  if (syzstr->resolution == NULL) syzstr->resolution = resolution;
    20462046}
    20472047
     
    24112411      if (syzstr->hilb_coeffs==NULL)
    24122412      {
     2413        // La Scala Resolution
    24132414        syzstr->minres = syReadOutMinimalRes(syzstr);
    24142415      }
    24152416      else
    2416       {
     2417      { // HRES
    24172418        syzstr->minres = syReorder(syzstr->orderedRes,syzstr->length,syzstr);
    24182419      }
     
    25382539  if (temp!=NULL) idDelete(&temp);
    25392540  kBucketDestroy(&(syzstr->bucket));
     2541
    25402542  if (origR != syzstr->syRing)
    25412543    rChangeCurrRing(origR);
     
    25442546  if (TEST_OPT_PROT) PrintLn();
    25452547
    2546   if (syzstr->minres==NULL)
    2547       if (syzstr->resPairs!=NULL)
    2548         if (syzstr->hilb_coeffs==NULL)
    2549           syzstr->minres = syReadOutMinimalRes(syzstr);
    2550  
     2548  assume(syzstr->minres==NULL); assume(syzstr->fullres ==NULL);
     2549  assume(syzstr->resPairs!=NULL);  assume(syzstr->hilb_coeffs==NULL);
     2550  assume(syzstr->res!=NULL);
     2551
     2552  if(! TEST_OPT_NO_SYZ_MINIM )
     2553    syzstr->minres = syReadOutMinimalRes(syzstr);
     2554  else
     2555    syzstr->fullres = syReorder(syzstr->res, syzstr->length, syzstr); // buggy? (betti...?)
     2556
    25512557  return syzstr;
    25522558}
     
    25702576  ring origR = currRing;
    25712577
    2572   if(weights!= NULL) 
     2578  if(weights!= NULL)
    25732579    syzstr->cw = new intvec(weights);
    25742580  else
     
    25882594  //euler = -1;
    25892595  redpol = pInit();
    2590  
     2596
    25912597  if( maxlength > 0 )
    25922598    syzstr->length = maxlength; //  = pVariables+2;
    25932599  else
    2594     syzstr->length = maxlength = pVariables+2; 
     2600    syzstr->length = maxlength = pVariables+2;
    25952601
    25962602  // Creare dp,S ring and change to it
    25972603  syzstr->syRing = rCurrRingAssure_dp_S();
    25982604  assume(syzstr->syRing != origR);
    2599   assume(syzstr->syRing->typ[1].ord_typ == ro_syzcomp); 
     2605  assume(syzstr->syRing->typ[1].ord_typ == ro_syzcomp);
    26002606
    26012607
     
    26272633  omFreeSize((ADDRESS)currcomponents,(arg->rank+1)*sizeof(int));
    26282634  omFreeSize((ADDRESS)currShiftedComponents,(arg->rank+1)*sizeof(long));
    2629  
     2635
    26302636  syzstr->res = (resolvente)omAlloc0((maxlength+1)*sizeof(ideal));
    26312637  syzstr->orderedRes = (resolvente)omAlloc0((maxlength+1)*sizeof(ideal));
     
    26412647
    26422648  assume( syzstr->length == maxlength );
    2643  
     2649
    26442650  syzstr->bucket = kBucketCreate();
    26452651  int len0=idRankFreeModule(temp)+1;
Note: See TracChangeset for help on using the changeset viewer.