Changeset 1adb76 in git for kernel


Ignore:
Timestamp:
Sep 25, 2021, 3:12:28 PM (3 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
3586d91e2c2266ac9093d8f200ff040122e65211
Parents:
a178ae5229393bf22d9dd493679de1c14137e994
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-09-25 15:12:28+02:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2021-09-25 15:17:38+02:00
Message:
use n_..(,cf) instead of n_..(,R)
Location:
kernel/GBEngine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kspoly.cc

    ra178ae r1adb76  
    514514
    515515  p_ExpVectorSub(lm, p2, tailRing); // Calculate the Monomial we must multiply to p2
    516   p_SetCoeff(lm, n_Init(1, tailRing), tailRing);
     516  p_SetCoeff(lm, n_Init(1, tailRing->cf), tailRing);
    517517  while (PW->max_exp != NULL && !p_LmExpVectorAddIsOk(lm, PW->max_exp, tailRing))
    518518  {
     
    629629  {                       // just cancel the leading term
    630630    PR->LmDeleteAndIter();
    631     if (coef != NULL) *coef = n_Init(1, tailRing);
     631    if (coef != NULL) *coef = n_Init(1, tailRing->cf);
    632632    return 0;
    633633  }
     
    665665
    666666  // take care of coef buisness
    667   if (! n_IsOne(pGetCoeff(p2), tailRing))
     667  if (! n_IsOne(pGetCoeff(p2), tailRing->cf))
    668668  {
    669669    number bn = pGetCoeff(lm);
     
    674674      PR->Tail_Mult_nn(an);
    675675    if (coef != NULL) *coef = an;
    676     else n_Delete(&an, tailRing);
     676    else n_Delete(&an, tailRing->cf);
    677677  }
    678678  else
    679679  {
    680     if (coef != NULL) *coef = n_Init(1, tailRing);
     680    if (coef != NULL) *coef = n_Init(1, tailRing->cf);
    681681  }
    682682
     
    13861386  if (!ret)
    13871387  {
    1388     if (! n_IsOne(coef, currRing))
     1388    if (! n_IsOne(coef, currRing->cf))
    13891389    {
    13901390      pNext(Current) = NULL;
     
    13941394    }
    13951395
    1396     n_Delete(&coef, currRing);
     1396    n_Delete(&coef, currRing->cf);
    13971397    pNext(Current) = Red.GetLmTailRing();
    13981398    if (Current == PR->p && PR->t_p != NULL)
  • kernel/GBEngine/kstd2.cc

    ra178ae r1adb76  
    159159        {
    160160            mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    161             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     161            if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    162162            {
    163163                return 0;
     
    168168        {
    169169            mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    170             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     170            if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    171171            {
    172172                return 0;
     
    186186        {
    187187            mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    188             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     188            if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    189189            {
    190190                return 0;
     
    195195        {
    196196            mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T0p), &rest, r->cf);
    197             if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     197            if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    198198            {
    199199                return 0;
     
    229229      {
    230230        mult= n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf);
    231         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     231        if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    232232        {
    233233          o = j;
     
    239239      {
    240240        mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].p), &rest, r->cf);
    241         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     241        if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    242242        {
    243243          o = j;
     
    262262      {
    263263        mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf);
    264         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     264        if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    265265        {
    266266          o = j;
     
    272272      {
    273273        mult = n_QuotRem(pGetCoeff(p), pGetCoeff(T[j].t_p), &rest, r->cf);
    274         if (!n_IsZero(mult, r) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
     274        if (!n_IsZero(mult, r->cf) && n_Greater(n_EucNorm(orest, r->cf), n_EucNorm(rest, r->cf), r->cf))
    275275        {
    276276          o = j;
  • kernel/GBEngine/syz4.cc

    ra178ae r1adb76  
    141141        p_SetComp(q, v[i].comp, r);
    142142        p_Setm(q, r);
    143         number n = n_Div(p_GetCoeff(multiplier, r), p_GetCoeff(v[i].lt, r), r);
    144         n_InpMult(n, p_GetCoeff(t, r), r);
    145         p_SetCoeff0(q, n_InpNeg(n, r), r);
     143        number n = n_Div(p_GetCoeff(multiplier, r), p_GetCoeff(v[i].lt, r), r->cf);
     144        n_InpMult(n, p_GetCoeff(t, r), r->cf);
     145        p_SetCoeff0(q, n_InpNeg(n, r->cf), r);
    146146        return q;
    147147    }
     
    267267    const ring r = currRing;
    268268    poly p = p_Copy(itr->second, r);
    269     if (LIKELY(!n_Equal(pGetCoeff(multiplier), pGetCoeff(itr->first), r)))
    270     {
    271         number n = n_Div(pGetCoeff(multiplier), pGetCoeff(itr->first), r);
     269    if (LIKELY(!n_Equal(pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf)))
     270    {
     271        number n = n_Div(pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf);
    272272        p = p_Mult_nn(p, n, r);
    273         n_Delete(&n, r);
     273        n_Delete(&n, r->cf);
    274274    }
    275275    return p;
Note: See TracChangeset for help on using the changeset viewer.