Changeset 76df61 in git


Ignore:
Timestamp:
Feb 25, 2014, 2:56:58 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
2a736547267291e5c0fabf6e61d9f626660126b4
Parents:
137883ef0bd378a1afb5d49f2c94c48dc06e8c9cd3158db7c3fe477e710ec83e75fa69fe5a50cc5f
Message:
Merge pull request #521 from steenpass/realclassify_sw

fix: use local degree ordering for highcorner()
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/normal.lib

    rd3158db r76df61  
    27522752        }
    27532753        if(w>=1){"Newton-Polygon is non-degenerated";"";}
     2754        setring R;
    27542755        option(set,save_opt);
    27552756        return(list(d*(mu+nb-1) div 2,d*tau,d*nb));
     
    28062807      }
    28072808      list HNEXP=hnexpansion(f);
    2808       if (typeof(HNEXP[1])=="ring") {
     2809      if (typeof(HNEXP[1])=="ring")
     2810      {
    28092811        def altring = basering;
    28102812        def HNEring = HNEXP[1]; setring HNEring;
     
    28172819        nb=size(HNEXP);
    28182820      }
     2821      setring R;
    28192822      option(set,save_opt);
    28202823      return(list(d*(mu+nb-1) div 2,d*tau,d*nb));
     
    28252828      if(w>=1){"now we have to use Hamburger-Noether (Puiseux) expansion";}
    28262829      delt=delta(f);
     2830      setring R;
    28272831      option(set,save_opt);
    28282832      return(list(d*delt,d*tau,d));
     
    38793883         //{ "module generators are U[i]/U[1], with U:"; U;
    38803884         //  ""; pause(); }
     3885         setring R;
    38813886         option(set,op);
    3882          setring R;
    38833887         ideal U = imap(Q,U);
    38843888         return(U);
     
    42444248      pause();"";
    42454249    }
     4250    setring R;
    42464251    return(lastRing);
    42474252  }
     
    66136618    a = is_injective(Qnormap,QAS);          //a. Test for injectivity of Qnormap
    66146619    dbprint ( prl, "injective: "+string(a) );
    6615     if ( n==1 ) { return (a); }
     6620    if ( n==1 )
     6621    {
     6622     intvec result = intvec(a);
     6623     setring BAS;
     6624     return (result);
     6625   }
    66166626   a;
    66176627
     
    66206630    b = mapIsFinite(normap,BAS,lnorid[2]);  //b. Test for finiteness of normap
    66216631    dbprint ( prl, "finite: "+string(b) );
    6622     if ( n==2 ) { return (intvec(a,b)); }
     6632    if ( n==2 )
     6633    {
     6634       intvec result = intvec(a,b);
     6635       setring BAS;
     6636       return (result);
     6637    }
    66236638   b;
    66246639
     
    66376652    int d1 = (d==0);                           //d1=1 if delta=0
    66386653    dbprint ( prl, "delta: "+string(d) );
    6639     return(intvec(a,b,d1));
     6654    intvec result = intvec(a,b,d1);
     6655    setring BAS;
     6656    return(result);
    66406657}
    66416658example
  • Singular/LIB/realclassify.lib

    r137883e r76df61  
    728728  /* auxiliary variables */
    729729  int i;
     730  def br = basering;
    730731
    731732  /* error check */
    732   if(char(basering) != 0)
     733  if(char(br) != 0)
    733734  {
    734735    ERROR("The characteristic must be zero.");
    735736  }
    736   int n = nvars(basering);
     737  int n = nvars(br);
    737738  for(i = 1; i <= n; i++)
    738739  {
     
    781782  /* highest corner */
    782783  int hc;
     784  if(ordstr(br) != "ds")
     785  {
     786    list lbr = ringlist(br);
     787    lbr[3] = list(list("ds", 1:nvars(br)), list("C", 0));
     788    def br_ds = ring(lbr);
     789    setring(br_ds);
     790    poly f = fetch(br, f);
     791  }
    783792  for(i = 0; i < 3; i++)
    784793  {
    785     f = jet(f, k);
    786794    hc = deg(highcorner(std(maxideal(i)*jacob(f))));
    787795    hc = hc+2-i;
     
    789797    {
    790798      k = hc;
    791     }
     799      f = jet(f, k);
     800    }
     801  }
     802  if(ordstr(br) != "ds")
     803  {
     804    setring(br);
    792805  }
    793806
  • Singular/ipassign.cc

    rd3158db r76df61  
    865865  if (lt==DEF_CMD)
    866866  {
     867    if (TEST_V_ALLWARN
     868    && (rt!=RING_CMD)
     869    && (rt!=QRING_CMD)
     870    && (l->name!=NULL)
     871    && (l->e==NULL)
     872    && (iiCurrArgs==NULL) /* not in proc header */
     873    )
     874    {
     875      Warn("use `%s` instead of `def`",Tok2Cmdname(rt));
     876    }
    867877    if (l->rtyp==IDHDL)
    868878    {
  • Singular/ipshell.cc

    rd3158db r76df61  
    11551155  }
    11561156  leftv h=iiCurrArgs;
     1157  leftv rest=h->next; /*iiCurrArgs is not NULLi here*/
     1158  BOOLEAN is_default_list=FALSE;
    11571159  if (strcmp(p->name,"#")==0)
    11581160  {
     1161    is_default_list=TRUE;
     1162    rest=NULL;
     1163  }
     1164  else
     1165  {
     1166    h->next=NULL;
     1167  }
     1168  BOOLEAN res=iiAssign(p,h);
     1169  if (is_default_list)
     1170  {
    11591171    iiCurrArgs=NULL;
    11601172  }
    11611173  else
    11621174  {
    1163     iiCurrArgs=h->next;
    1164     h->next=NULL;
    1165   }
    1166   BOOLEAN res=iiAssign(p,h);
     1175    iiCurrArgs=rest;
     1176  }
    11671177  h->CleanUp();
    11681178  omFreeBin((ADDRESS)h, sleftv_bin);
     
    21982208    lists v=(lists)L->m[1].Data();
    21992209    R->N = v->nr+1;
    2200     if (R->N<=0) 
     2210    if (R->N<=0)
    22012211    {
    22022212      WerrorS("no ring variables");
     
    50575067      else // (0/p, a, b, ..., z)
    50585068      {
    5059         if ((ch!=0) && (ch!=IsPrime(ch)))
    5060         {
    5061           WerrorS("too many parameters");
    5062           goto rInitError;
    5063         }
     5069        if ((ch!=0) && (ch!=IsPrime(ch)))
     5070        {
     5071          WerrorS("too many parameters");
     5072          goto rInitError;
     5073        }
    50645074
    50655075        char ** names = (char**)omAlloc0(pars * sizeof(char_ptr));
     
    50745084
    50755085        extParam.r = rDefault( ch, pars, names); // Q/Zp [ p_1, ... p_pars ]
    5076         for(int i=pars-1; i>=0;i--)
    5077         {
    5078           omFree(names[i]);
    5079         }
    5080         omFree(names);
     5086        for(int i=pars-1; i>=0;i--)
     5087        {
     5088          omFree(names[i]);
     5089        }
     5090        omFree(names);
    50815091
    50825092        cf = nInitChar(n_transExt, &extParam);
     
    51585168        number p=(number)pn->next->CopyD();
    51595169        nlGMP(p,(number)modBase,coeffs_BIGINT);
    5160         nlDelete(&p,coeffs_BIGINT);
     5170        nlDelete(&p,coeffs_BIGINT);
    51615171      }
    51625172    }
  • Tst/Short/realclassify_s.res.gz.uu

    r137883e r76df61  
    11begin 600 realclassify_s.res.gz
    2 M'XL("),_75(``W)E86QC;&%S<VEF>5]S+G)E<P!=4L%.PS`,O><KK(E#J[55
    3 MFW0#-N@!=ID$N\"M8E/9TBFB3:>D$TF_GM!N22&7.'[VB_WLM_?5>@,`208O
    4 MZR>8M+*-*O8Y6:*W"X(S,,X=XZSU_"7ZO2'+0-"BVE>%E*S4.QEQ^AW)MFAM
    5 M&LG`VFDTD(]S_OTR&X7/(Q",'T'`(\0!>"K00><'<)`N_C:#4U-I*$V,I_"4
    6 MZ!!W_A9/E>Y"3X6:3!7NB+\E+N?N;]5>&<"$LSV=F+;RY&.!3,PJ3S]"E./A
    7 MU1D^K`T9RLG@P<@$]%:*\ME@Q2B?#Y:)NQTL]*Y/%)H2I.GD7!6"M7IQ8=\T
    8 MHBXJ*,VU@.MQ7STWHN!?#ND/1J^LXHT`?JX_J;BB*5IS*EI6`.,'JJ[N&*UH
    9 M2T7->+'7CNGAT51HY;AWDB=QU$M3-T)2>:K,J,N1*-@*$ELAB!6"*!)BI;$E
    10 M2T;$^#)+Z6;Y=Y()&4U2D:E.'91F4/==#TWW-<TM.EJ9Q*Q,3W(<2)1V8T_,
    11 CJAR<&M[1D,PL>#<BN8_Z3?]=X[/T$G]Y@WX`&GCH!1\#````
     2M'XL(""N?#%,``W)E86QC;&%S<VEF>5]S+G)E<P!=4L%.PS`,O><KK(E#J[6E
     3M3;H!&_0`NTP"+G"K!BI;.D6TZ91T(NG7$]HMZ<@ECI_]8C_[[7VU?@6`)(/G
     4M]2-,6ME&%?N:+-';"<$9&.<GXZSU_"7ZNR'+0-"BVE:%E*S4GS+B]">2;=':
     5M-)*!M=-H(!_G_/ME-@J?1R`8WX.`!X@#\%2@@\X/8"==_$T&AZ;24)H83^$I
     6MT2'N_`\\5;H+/15J,E6X(_X'<3FWEU5[90`3SK9T8MK*D\T"F9A5GFY"E./A
     7MU1D^K`T9RLG@P<@$]%:*\ME@Q2B?#Y:)NQDL]*X/%)H2I.GD6!6"M7IQ8G]M
     8M1%U44)IK`>?COGIJ1,&_'=(?C%Y8Q1L!_%A_47%&4[3F5+2L`,9W5)W=,5K1
     9MEHJ:\6*K'=/]@ZG0RG'G)$_BJ)>F;H2D\E"949<C4;`5)+9"$"M$J,@47Q.E
     10ML:5+1M3X-$WIIGDYRX2,9FFX=.J@-(.Z[WMHNZ]J;M'1TB1F:7J2_4"BM!M\
     11D8I9EY_3P]H9D9L';$<E=U._ZWR(?I9?XRROT"^8K:-<A`P``
    1212`
    1313end
  • Tst/Short/realclassify_s.stat

    r137883e r76df61  
    1 1 >> tst_memory_0 :: 1381842835:3160:3-1-6:ix86-Linux:mamawutz:323628
    2 1 >> tst_memory_1 :: 1381842835:3160:3-1-6:ix86-Linux:mamawutz:2322432
    3 1 >> tst_memory_2 :: 1381842835:3160:3-1-6:ix86-Linux:mamawutz:2401344
    4 1 >> tst_timer_1 :: 1381842835:3160:3-1-6:ix86-Linux:mamawutz:15
     11 >> tst_memory_0 :: 1393336107:3170:3-1-7:ix86-Linux:mamawutz:300464
     21 >> tst_memory_1 :: 1393336107:3170:3-1-7:ix86-Linux:mamawutz:2297856
     31 >> tst_memory_2 :: 1393336107:3170:3-1-7:ix86-Linux:mamawutz:2384976
     41 >> tst_timer_1 :: 1393336107:3170:3-1-7:ix86-Linux:mamawutz:17
Note: See TracChangeset for help on using the changeset viewer.