Changeset e9e0aa in git


Ignore:
Timestamp:
Feb 27, 2024, 1:50:50 PM (3 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
151235c5cde328c4cdd1396dba145495b2dd9110
Parents:
772cf3b042bab767d4d359d27fd798e0b7e48179
Message:
scDegree via hFirstSeries0
Location:
kernel/combinatorics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/combinatorics/hdegree.cc

    r772cf3b re9e0aa  
    922922  else
    923923    Print("// dimension (local)   = %d\n// multiplicity = %d\n", di, mu);
    924 }
    925 
    926 void scDegree(ideal S, intvec *modulweight, ideal Q)
    927 {
    928   id_Test(S, currRing);
    929   if( Q!=NULL ) id_Test(Q, currRing);
    930 
    931   int co, mu, l;
    932   intvec *hseries2;
    933   intvec *hseries1 = hFirstSeries(S, modulweight, Q);
    934   if (errorreported) return;
    935   l = hseries1->length()-1;
    936   if (l > 1)
    937     hseries2 = hSecondSeries(hseries1);
    938   else
    939     hseries2 = hseries1;
    940   hDegreeSeries(hseries1, hseries2, &co, &mu);
    941   if ((l == 1) &&(mu == 0))
    942     scPrintDegree((currRing->N)+1, 0);
    943   else
    944     scPrintDegree(co, mu);
    945   if (l>1)
    946     delete hseries1;
    947   delete hseries2;
    948924}
    949925
  • kernel/combinatorics/hilb.cc

    r772cf3b re9e0aa  
    21542154}
    21552155
     2156intvec* hFirstSeries0wm(ideal A,ideal Q, intvec *wdegree, intvec *shifts, const ring src, const ring Qt)
     2157{
     2158  poly s=hFirstSeries0m(A,Q,wdegree,shifts,src,Qt);
     2159  intvec *ss;
     2160  if (s==NULL)
     2161    ss=new intvec(2);
     2162  else
     2163  {
     2164    ss=new intvec(p_Totaldegree(s,Qt)+2);
     2165    while(s!=NULL)
     2166    {
     2167      int i=p_Totaldegree(s,Qt);
     2168      long l=n_Int(pGetCoeff(s),Qt->cf);
     2169      (*ss)[i]=n_Int(pGetCoeff(s),Qt->cf);
     2170      if((l==0)||(l<=-INT_MAX)||(l>INT_MAX))
     2171      {
     2172        if(!errorreported) Werror("overflow at t^%d\n",i);
     2173      }
     2174      else (*ss)[i]=(int)l;
     2175      p_LmDelete(&s,Qt);
     2176    }
     2177  }
     2178  return ss;
     2179}
     2180
    21562181static ideal getModuleComp(ideal A, int c, const ring src)
    21572182{
     
    27072732  return biv;
    27082733}
     2734
     2735void scDegree(ideal S, intvec *modulweight, ideal Q)
     2736{
     2737  id_Test(S, currRing);
     2738  if( Q!=NULL ) id_Test(Q, currRing);
     2739
     2740  int co, mu, l;
     2741  intvec *hseries2;
     2742  if (hilb_Qt==NULL) hilb_Qt=makeQt();
     2743  intvec *hseries1 = hFirstSeries0wm(S,Q,NULL, modulweight,currRing,hilb_Qt);
     2744  l = hseries1->length()-1;
     2745  if (l > 1)
     2746    hseries2 = hSecondSeries(hseries1);
     2747  else
     2748    hseries2 = hseries1;
     2749  hDegreeSeries(hseries1, hseries2, &co, &mu);
     2750  if ((l == 1) &&(mu == 0))
     2751    scPrintDegree((currRing->N)+1, 0);
     2752  else
     2753    scPrintDegree(co, mu);
     2754  if (l>1)
     2755    delete hseries2;
     2756  delete hseries1;
     2757}
     2758
  • kernel/combinatorics/hilb.h

    r772cf3b re9e0aa  
    2222bigintmat* hSecondSeries0b(ideal I, ideal Q, intvec *wdegree, intvec *shifts,const ring src, const coeffs biv_cf);
    2323poly hFirstSeries0m(ideal A,ideal Q, intvec *wdegree, intvec *shifts, const ring src, const ring Qt);
     24intvec* hFirstSeries0wm(ideal A,ideal Q, intvec *wdegree, intvec *shifts, const ring src, const ring Qt);
    2425
    2526intvec * hSecondSeries(intvec *hseries1);
Note: See TracChangeset for help on using the changeset viewer.