Changeset 2cd1ae in git


Ignore:
Timestamp:
Jan 21, 2022, 5:01:08 PM (17 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
7d610fffb54f657df3230000abd69da8db93b03f
Parents:
908d1f167af74acb9bca8213230d13d6c99501f5
Message:
fix rref
Location:
libpolys/polys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/clapsing.cc

    r908d1f1 r2cd1ae  
    20112011      {
    20122012        poly h=MATELEM(m,i,j);
    2013         if ((h!=NULL)
    2014         && (p_Totaldegree(h,R)==0))
     2013        if (h!=NULL)
    20152014        {
    2016           (*NTLM)(i,j)=(long)p_GetCoeff(h,R);
    2017         }
    2018         else
    2019         {
    2020           WerrorS("smatrix for rref is not constant");
    2021           return M;
     2015          if (p_Totaldegree(h,R)==0)
     2016          {
     2017            (*NTLM)(i,j)=(long)p_GetCoeff(h,R);
     2018          }
     2019          else
     2020          {
     2021            WerrorS("smatrix for rref is not constant");
     2022            return M;
     2023          }
    20222024        }
    20232025      }
     
    20322034        {
    20332035          poly p=p_NSet(n,R);
    2034           p_SetComp(p,i,R);
    2035           M->m[j]=p_Add_q(M->m[j],p,R);
     2036          MATELEM(M,i,j)=p;
    20362037        }
    20372038      }
     
    20592060    mat_zz_p *NTLM=new mat_zz_p;
    20602061    NTLM->SetDims(r,c);
    2061     for(j=c;j>0;j--)
     2062    for(j=c-1;j>=0;j--)
    20622063    {
    20632064      poly h=m->m[j];
     
    20852086          poly p=p_NSet(n,R);
    20862087          p_SetComp(p,i,R);
    2087           M->m[j]=p_Add_q(M->m[j],p,R);
     2088          M->m[j-1]=p_Add_q(M->m[j-1],p,R);
    20882089        }
    20892090      }
  • libpolys/polys/flintconv.cc

    r908d1f1 r2cd1ae  
    389389      {
    390390        poly h=MATELEM(m,i,j);
    391         if ((h!=NULL)
    392         && (p_Totaldegree(h,R)==0))
    393           convSingNFlintN(fmpq_mat_entry(FLINTM,i-1,j-1),pGetCoeff(h),R->cf);
    394         else
     391        if (h!=NULL)
    395392        {
    396           WerrorS("matrix for rref is not constant");
    397           return M;
     393          if (p_Totaldegree(h,R)==0)
     394            convSingNFlintN(fmpq_mat_entry(FLINTM,i-1,j-1),pGetCoeff(h),R->cf);
     395          else
     396          {
     397            WerrorS("matrix for rref is not constant");
     398            return M;
     399          }
    398400        }
    399401      }
Note: See TracChangeset for help on using the changeset viewer.