Changeset 3d3597 in git for kernel


Ignore:
Timestamp:
Jun 26, 2017, 3:41:52 PM (7 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
7fda45ac2dedfa5f3f63688f3e79a0306b5a5551
Parents:
ca93d326c083b4ef2a586a00a4029f30b376882c
Message:
chg: intersect(I,J,"slimgb")
Location:
kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    rca93d3 r3d3597  
    202202* h3 := h1 intersect h2
    203203*/
    204 ideal idSect (ideal h1,ideal h2)
     204ideal idSect (ideal h1,ideal h2, GbVariant alg)
    205205{
    206206  int i,j,k,length;
     
    276276  }
    277277  intvec *w=NULL;
    278   temp1 = kStd(temp,currRing->qideal,testHomog,&w,NULL,length);
    279   if (w!=NULL) delete w;
    280   idDelete(&temp);
     278  if (alg==GbDefault) alg=GbStd;
     279  if (alg==GbStd)
     280  {
     281    if (TEST_OPT_PROT) { PrintS("std:"); mflush(); }
     282    temp1 = kStd(temp,currRing->qideal,testHomog,&w,NULL,length);
     283    if (w!=NULL) delete w;
     284    idDelete(&temp);
     285  }
     286  else if (alg==GbSlimgb)
     287  {
     288    if (TEST_OPT_PROT) { PrintS("slimgb:"); mflush(); }
     289    temp1 = t_rep_gb(currRing, temp, temp->rank);
     290    idDelete(&temp);
     291  }
     292  else if (alg==GbGroebner)
     293  {
     294    if (TEST_OPT_PROT) { PrintS("groebner:"); mflush(); }
     295    BOOLEAN err;
     296    temp1=(ideal)iiCallLibProc1("groebner",temp,MODUL_CMD,err);
     297    if (err)
     298    {
     299      Werror("error %d in >>groebner<<",err);
     300      temp1=idInit(1,1);
     301    }
     302  }
     303
    281304  if(syz_ring!=orig_ring)
    282305    rChangeCurrRing(orig_ring);
     
    342365* given as 'resolvente'
    343366*/
    344 ideal idMultSect(resolvente arg, int length)
     367ideal idMultSect(resolvente arg, int length, GbVariant alg)
    345368{
    346369  int i,j=0,k=0,syzComp,l,maxrk=-1,realrki;
     
    417440  }
    418441  /* std computation --------------------------------------------*/
    419   tempstd = kStd(bigmat,currRing->qideal,testHomog,&w,NULL,syzComp);
    420   if (w!=NULL) delete w;
    421   idDelete(&bigmat);
     442  if (alg==GbDefault) alg=GbStd;
     443  if (alg==GbStd)
     444  {
     445    if (TEST_OPT_PROT) { PrintS("std:"); mflush(); }
     446    tempstd = kStd(bigmat,currRing->qideal,testHomog,&w,NULL,syzComp);
     447    if (w!=NULL) delete w;
     448    idDelete(&bigmat);
     449  }
     450  else if (alg==GbSlimgb)
     451  {
     452    if (TEST_OPT_PROT) { PrintS("slimgb:"); mflush(); }
     453    tempstd = t_rep_gb(currRing, bigmat, syzComp);
     454    idDelete(&bigmat);
     455  }
     456  else if (alg==GbGroebner)
     457  {
     458    if (TEST_OPT_PROT) { PrintS("groebner:"); mflush(); }
     459    BOOLEAN err;
     460    tempstd=(ideal)iiCallLibProc1("groebner",bigmat,MODUL_CMD,err);
     461    if (err)
     462    {
     463      Werror("error %d in >>groebner<<",err);
     464      tempstd=idInit(1,1);
     465    }
     466  }
     467//  else if (alg==GbModstd): requires ideal, not module
     468//  {
     469//    if (TEST_OPT_PROT) { PrintS("modstd:"); mflush(); }
     470//    BOOLEAN err;
     471//    tempstd=(ideal)iiCallLibProc1("modStd",bigmat,MODUL_CMD,err);
     472//    if (err)
     473//    {
     474//      Werror("error %d in >>modStd<<",err);
     475//      tempstd=idInit(1,1);
     476//    }
     477//  }
     478  //else if (alg==GbSba): requires order C,...
     479  //{
     480  //  if (TEST_OPT_PROT) { PrintS("sba:"); mflush(); }
     481  //  tempstd = kSba(bigmat,currRing->qideal,hom,w,1,0,NULL,syzComp);
     482  //  idDelete(&bigmat);
     483  //}
     484  else
     485  {
     486    tempstd=idInit(1,1);
     487    Werror("wrong algorith %d for SB",(int)alg);
     488  }
    422489
    423490  if(syz_ring!=orig_ring)
     
    26832750       return GbSlimgb;
    26842751    }
     2752    if (TEST_OPT_PROT) PrintS("slimgb not possible here\n");
    26852753  }
    26862754  else if (alg==GbSba) // cond. for sba
     
    26922760      return GbSba;
    26932761    }
     2762    if (TEST_OPT_PROT) PrintS("sba not possible here\n");
    26942763  }
    26952764  else if (alg==GbGroebner) // cond. for groebner
  • kernel/ideals.h

    rca93d3 r3d3597  
    114114}
    115115
    116 
    117 ideal   idSect (ideal h1,ideal h2);
    118 ideal   idMultSect(resolvente arg, int length);
    119116
    120117// GB algorithm for syz computaions:
     
    134131};
    135132
     133ideal   idSect (ideal h1,ideal h2, GbVariant a=GbDefault);
     134ideal   idMultSect(resolvente arg, int length, GbVariant a=GbDefault);
     135
    136136//ideal   idSyzygies (ideal h1, tHomog h,intvec **w);
    137137ideal   idSyzygies (ideal h1, tHomog h,intvec **w, BOOLEAN setSyzComp=TRUE,
Note: See TracChangeset for help on using the changeset viewer.